Writing blog posts
Blog posts work like pages, with a few extras: categories, tags, a featured image, sticky posts and scheduling. A typical request:
Write a post announcing our new opening hours. Put it in News, tag it “store”, and schedule it for Monday at 9 am.
What happens
Section titled “What happens”- It checks what exists.
list-postsandsearch-contentshow the posts already on the site, so it doesn’t repeat one;list-termsreturns your categories and tags with their IDs. - It reuses terms. It picks existing categories and tags. Only if one is missing does it create it with
save-term, which returns the existing term instead of duplicating it if the name is already taken. Creating terms needs an Editor or an Administrator. - It saves the post.
save-postcreates it as a draft unless the AI sets another status. To schedule it, it sets the status tofuturewith a date in the site’s timezone. - You review it. Open the
edit_urlto check the post in the editor.
Updates without overwriting
Section titled “Updates without overwriting”As with pages, updating needs the content_hash from get-post or from the previous save-post. The hash also covers categories, tags, the sticky flag and the date: if someone changed any of them in the meantime, the update is rejected with content_conflict and the AI reads the post again.
Who can use it
Section titled “Who can use it”The post tools need edit_posts, but connecting at all needs a user who can edit pages: an Editor or an Administrator.