What This Agent Does
This powerful automation agent transforms blog topic ideas into fully-written, SEO-optimized articles and publishes them directly to your Ghost blog—all without manual intervention. Simply submit a topic through a form, and the agent leverages Claude AI to generate comprehensive blog content, intelligently extracts the title and body, then automatically publishes it to your Ghost CMS.
Key benefits: Save 2-4 hours per blog post by eliminating the writing and publishing workflow. Perfect for content marketers, bloggers, and digital agencies who need to maintain consistent publishing schedules without sacrificing quality. This agent ensures your blog stays active even during busy periods, helping you maintain SEO momentum and audience engagement.
Ideal for: Content teams scaling their output, solo entrepreneurs maintaining multiple blogs, marketing agencies managing client content, and anyone looking to streamline their content creation pipeline from ideation to publication.
Required Integrations
Anthropic (Claude AI)
Why it's needed: Anthropic's Claude AI powers the content generation engine of this workflow. Using the advanced Claude Sonnet 4.5 model, it creates comprehensive, well-structured blog posts that are optimized for search engines and reader engagement.
Setup steps:
- Visit Anthropic's Console and create an account or sign in
- Navigate to API Keys in the left sidebar
- Click Create Key and give it a descriptive name like "TaskAGI Blog Generator"
- Copy the API key immediately (it won't be shown again)
- Store the key securely in a password manager
Configuration in TaskAGI:
- Go to Integrations in your TaskAGI dashboard
- Search for "Anthropic" and click Connect
- Paste your API key in the API Key field
- Click Test Connection to verify the integration
- Save the configuration
Important: Anthropic API usage is billed based on tokens processed. The Claude Sonnet 4.5 model offers an excellent balance of quality and cost-effectiveness for blog content generation.
Ghost CMS
Why it's needed: Ghost is your content management system where the generated blog posts will be published. This integration enables the agent to automatically create draft or published posts without manual copy-pasting or CMS login.
Setup steps:
- Log into your Ghost Admin panel (typically at
yourdomain.com/ghost)
- Navigate to Settings → Integrations
- Scroll down to Custom Integrations and click Add custom integration
- Name it "TaskAGI Automation" or similar
- Copy both the Admin API Key and API URL that are generated
- Note your Ghost site URL (e.g.,
https://yourblog.com)
Configuration in TaskAGI:
- Go to Integrations in your TaskAGI dashboard
- Search for "Ghost" and click Connect
- Enter the following details:
-
API URL: Your Ghost API URL (from step 5 above)
-
Admin API Key: Your Ghost Admin API Key (from step 5 above)
-
Site URL: Your Ghost blog's public URL
- Click Test Connection to verify access
- Save the configuration
Permissions note: The Admin API Key provides full access to create, edit, and delete content. Keep it secure and never share it publicly.
Configuration Steps
Step 1: Configure the Blog Topic Input Trigger
This form trigger is your workflow's entry point where you'll submit blog topics.
- Click on the Blog Topic Input node
- Configure the form fields:
-
Form Title: "Blog Topic Submission"
-
Description: "Enter a topic for AI-generated blog content"
- Add a form field:
-
Field Name:
topic
-
Field Type: Text (long text/textarea)
-
Label: "Blog Topic"
-
Placeholder: "Example: The Benefits of Remote Work for Small Businesses"
-
Required: Yes
- Optionally add additional fields:
-
keywords (text): Target SEO keywords
-
tone (dropdown): Professional, Casual, Technical
-
target_length (number): Desired word count
Data output: This node produces a submittedAt timestamp and all form field values that will be passed to the next node.
Step 2: Configure Generate Blog Content
This node uses Claude AI to create your blog post content.
- Click on the Generate Blog Content node
- Verify the Model is set to:
claude-sonnet-4-5-20250929
- Configure the Prompt field with this template:
Write a comprehensive, SEO-optimized blog post about: {{3060.topic}}
Requirements:
- Length: 1200-1500 words
- Include an engaging title (on the first line)
- Use proper heading hierarchy (H2, H3)
- Include actionable takeaways
- Write in a conversational yet professional tone
- Optimize for search engines with natural keyword integration
- Include a compelling introduction and conclusion
Format the output as:
[TITLE]
Your engaging title here
[CONTENT]
The full blog post content with proper markdown formatting
- Set Max Tokens:
4000 (allows for comprehensive content)
- Set Temperature:
0.7 (balances creativity with coherence)
- Map the input: Reference
{{3060.topic}} to pull the topic from the form submission
Pro tip: Adjust the temperature between 0.5-0.9 based on your needs. Lower values (0.5) produce more focused, factual content; higher values (0.9) generate more creative, varied writing.
Step 3: Configure Extract Title & Content
This function node intelligently parses the AI-generated content to separate the title from the body.
- Click on the Extract Title & Content node
- Set the Function Type to: JavaScript
- Add this parsing code:
const fullContent = input.content[0].text;
// Split by [TITLE] and [CONTENT] markers
const titleMatch = fullContent.match(/\[TITLE\]\s*(.+?)\s*\[CONTENT\]/s);
const contentMatch = fullContent.match(/\[CONTENT\]\s*(.+)/s);
return {
title: titleMatch ? titleMatch[1].trim() : "Untitled Post",
content: contentMatch ? contentMatch[1].trim() : fullContent,
excerpt: contentMatch ? contentMatch[1].trim().substring(0, 200) + "..." : ""
};
- Map the input: Set
input.content to {{3061.content}} (the AI response from the previous node)
What this does: The function extracts the title and content using pattern matching, creates an excerpt for SEO purposes, and handles cases where the AI doesn't follow the exact format.
Step 4: Configure Post to Ghost
This final node publishes your generated content to Ghost CMS.
- Click on the Post to Ghost node
- Select your Ghost integration from the dropdown
- Configure the post parameters:
-
Title:
{{3062.result.title}}
-
Content:
{{3062.result.content}}
-
Custom Excerpt:
{{3062.result.excerpt}}
-
Status: Choose between:
-
draft - Creates unpublished draft for review (recommended initially)
-
published - Immediately publishes the post live
-
Tags: Add relevant tags (e.g., "AI-Generated", "Blog")
-
Featured:
false (or true for homepage feature)
- Optional advanced settings:
-
Authors: Specify author IDs if not using default
-
Published At: Leave empty for immediate publishing or set a future date
-
Meta Title:
{{3062.result.title}} (for SEO)
-
Meta Description:
{{3062.result.excerpt}}
Important: Start with draft status until you've verified the content quality meets your standards. You can always change to published once you're confident in the output.
Testing Your Agent
Running Your First Test
- Navigate to your workflow in TaskAGI
- Click the Test button in the top-right corner
- Fill out the form trigger with a test topic:
- Example: "How Artificial Intelligence is Transforming Customer Service"
- Click Submit and watch the execution flow
Verification Checklist
After Blog Topic Input (Node 1):
- ✅ Verify the topic was captured correctly
- ✅ Check the timestamp shows the current time
- ✅ Confirm all form fields populated properly
After Generate Blog Content (Node 2):
- ✅ Review the AI-generated content in the execution log
- ✅ Verify the content includes both [TITLE] and [CONTENT] markers
- ✅ Check that the content length meets your requirements (1200-1500 words)
- ✅ Scan for coherence, proper formatting, and relevant information
After Extract Title & Content (Node 3):
- ✅ Confirm the title was extracted successfully
- ✅ Verify the content is properly separated from the title
- ✅ Check that the excerpt is generated (first 200 characters)
After Post to Ghost (Node 4):
- ✅ Log into your Ghost admin panel
- ✅ Navigate to Posts and find your new draft/published post
- ✅ Open the post and verify:
- Title displays correctly
- Content formatting is preserved
- Excerpt appears in post settings
- Tags are applied
- Status matches your configuration
Expected Results
Success indicators:
- Execution completes with all green checkmarks
- Total execution time: 15-45 seconds (depending on content length)
- Ghost post appears in your CMS within 5 seconds of completion
- Content is well-structured with proper markdown formatting
- Title is compelling and relevant to the topic
Troubleshooting
Common Configuration Issues
Problem: "Anthropic API authentication failed"
-
Cause: Invalid or expired API key
-
Solution:
- Verify your API key in the Anthropic Console
- Check for extra spaces when copying/pasting
- Generate a new API key if needed
- Re-test the integration in TaskAGI
Problem: "Ghost API error: Resource not found"
-
Cause: Incorrect API URL or site URL
-
Solution:
- Verify your Ghost API URL includes
/ghost/api/admin/
- Ensure your site URL doesn't have a trailing slash
- Confirm your Ghost version supports the Admin API (v2.0+)
Problem: Content appears without proper formatting in Ghost
-
Cause: Markdown not being processed correctly
-
Solution:
- In the Post to Ghost node, ensure Content Format is set to
markdown
- Check that your Ghost theme supports markdown rendering
- Verify the extracted content includes proper markdown syntax
Problem: Title extraction fails, shows "Untitled Post"
-
Cause: AI didn't follow the [TITLE]/[CONTENT] format
-
Solution:
- Review the AI prompt to ensure format instructions are clear
- Increase the temperature slightly (to 0.8) for better instruction following
- Modify the extraction function to use alternative parsing methods:
// Fallback: Use first line as title
const lines = fullContent.split('\n');
const title = lines[0].replace(/^#+\s*/, '').trim();
const content = lines.slice(1).join('\n').trim();
Problem: "Token limit exceeded" error
-
Cause: Prompt + response exceeds max tokens
-
Solution:
- Reduce the target word count in your prompt
- Increase Max Tokens to 5000-6000
- Consider using a more efficient prompt structure
Error Message Explanations
"Rate limit exceeded"
- You've hit Anthropic's API rate limits
- Wait 60 seconds and retry
- Consider upgrading your Anthropic plan for higher limits
"Invalid JSON in function output"
- The Extract Title & Content function has a syntax error
- Check for missing commas, brackets, or quotes
- Use the TaskAGI function validator before saving
"Ghost post creation failed: Validation error"
- Required fields are missing or invalid
- Verify title and content are properly mapped
- Check that status is either 'draft' or 'published'
Next Steps
After Successful Setup
Immediate actions:
-
Review your first generated post thoroughly in Ghost to understand the AI's writing style and quality
-
Create a content calendar and schedule regular topic submissions through the form
-
Set up notifications in TaskAGI to alert you when new posts are created
-
Establish a review process if using draft status—assign team members to review and publish
Optimization Suggestions
Enhance content quality:
-
Refine your prompts based on the output quality. Add specific style guidelines, example structures, or brand voice instructions
-
Create topic templates for different content types (how-to guides, listicles, thought leadership)
-
Add a quality check node using another AI call to review and score content before publishing
Improve workflow efficiency:
-
Batch processing: Modify the trigger to accept multiple topics via CSV upload
-
Add conditional logic: Route different topic types to specialized prompts
-
Implement content scheduling: Add a date field to schedule posts for future publication
Scale your content operation:
-
Create topic variations: Add a node that generates 3-5 topic variations before content generation
-
Multi-language support: Duplicate the workflow for different languages with localized prompts
-
SEO enhancement: Add a node that generates meta descriptions, social media snippets, and suggested internal links
Advanced Usage Tips
Content personalization:
Add audience segmentation by including fields for:
- Target persona (e.g., "small business owners", "enterprise CTOs")
- Industry vertical (e.g., "healthcare", "fintech")
- Content stage (awareness, consideration, decision)
Quality assurance workflow:
Insert a human approval step between content generation and publishing:
- Change Ghost node status to
draft
- Add an email notification node with the draft link
- Create a separate workflow triggered by manual approval to publish
Analytics integration:
- Tag AI-generated posts with "ai-content" in Ghost
- Track performance metrics to compare AI vs. human-written content
- Use insights to refine your prompts for better engagement
Content repurposing:
Extend the workflow to automatically:
- Generate social media posts from the blog content
- Create email newsletter versions
- Extract key quotes for graphics
- Build a content summary for internal distribution
Cost optimization:
- Monitor your Anthropic API usage in the console
- Adjust max tokens based on actual needs (you may not need 4000)
- Consider using Claude Haiku for shorter posts to reduce costs
- Implement caching for frequently used prompt components
Ready to transform your content creation process? Start with a simple test topic, review the output carefully, and gradually increase automation as you build confidence in the system. Remember: AI is your co-pilot, not your replacement—use this agent to handle the heavy lifting while you focus on strategy, editing, and audience engagement. Happy automating! 🚀