Common Workflows
Multi-step workflows that combine multiple tools.
Publish a Post with Feature Image
-
Upload the feature image:
admin_upload_image{
"file_path": "/path/to/feature.jpg",
"purpose": "image"
}The response includes the image URL.
-
Create the post with the uploaded image:
admin_create_post{
"title": "My Post Title",
"html": "<p>Content here...</p>",
"feature_image": "https://myblog.ghost.io/content/images/2024/01/feature.jpg",
"status": "published"
}
Find and Update a Post
-
Find the post by slug:
admin_read_post{
"slug": "my-post-slug"
}Note the
idandupdated_atfrom the response. -
Update the post:
admin_update_post{
"id": "5ddc9141c35e7700383b2937",
"updated_at": "2024-01-15T10:30:00.000Z",
"title": "New Title"
}
Add Tags to Multiple Posts
-
Browse posts to find those needing tags:
admin_browse_posts{
"filter": "status:draft",
"limit": "all"
} -
For each post, update with new tags:
admin_update_post{
"id": "[post ID]",
"updated_at": "[post updated_at]",
"tags": [{ "name": "Review Needed" }]
}
Set Up a Newsletter Workflow
-
Create a newsletter:
admin_create_newsletter{
"name": "Weekly Digest",
"description": "Weekly roundup of the best content",
"status": "active"
} -
Create a post and send to newsletter:
admin_create_post{
"title": "This Week's Highlights",
"html": "<p>Here are this week's top stories...</p>",
"status": "published",
"newsletter": { "id": "[newsletter-id]" }
}
Audit Content by Tag
-
List all tags with post counts:
content_browse_tags{
"include": "count.posts",
"limit": "all"
} -
Browse posts for a specific tag:
content_browse_posts{
"filter": "tag:technology",
"fields": "title,slug,status,published_at",
"limit": "all"
} -
Review and update outdated posts:
admin_update_post{
"id": "[post ID]",
"updated_at": "[post updated_at]",
"tags": [{ "name": "Technology" }, { "name": "#needs-review" }]
}