OpenAI to Ghost, blog posts published with SEO ready
Your blog goes quiet, not because you ran out of ideas, but because turning ideas into published posts is a slog. Drafting, formatting, writing meta, picking tags, logging into Ghost, pasting everything in, fixing weird spacing. It’s a lot for something that should be routine.
This is where OpenAI Ghost publishing pays off. Marketing managers trying to keep a cadence, agency owners juggling client work, and solo founders doing “content on the side” all hit the same wall. You will ship consistent posts without living in your CMS.
This workflow drafts a complete blog post (title, tags, SEO meta included) every 12 hours, then publishes it straight to Ghost. You’ll see how it works, what it replaces, and what you can safely customize without turning it into a tech project.
How This Automation Works
See how this solves the problem:
n8n Workflow Template: OpenAI to Ghost, blog posts published with SEO ready
flowchart LR
subgraph sg0["Schedule Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "Schedule Trigger", pos: "b", h: 48 }
n1@{ icon: "mdi:robot", form: "rounded", label: "OpenAI", pos: "b", h: 48 }
n2["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>HTTP Request1"]
n3["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Code"]
n4["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Code1"]
n3 --> n4
n4 --> n2
n1 --> n3
n0 --> n1
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0 trigger
class n1 ai
class n2 api
class n3,n4 code
classDef customIcon fill:none,stroke:none
class n2,n3,n4 customIcon
The Challenge: Publishing Consistent SEO Posts Without Busywork
Writing the post is only half the job. The rest is the repetitive “publication tax”: rewriting the title, drafting a meta description that fits, choosing tags that stay consistent, converting formatting so Ghost doesn’t mangle it, and then actually hitting publish at the right time. Miss one of those steps and you either ship something sloppy or you postpone it again. Multiply that by two posts a week and it becomes a constant low-grade stress. Honestly, the mental load is what gets you.
It adds up fast. Here’s where it usually breaks down in real teams.
- You spend about 30 minutes per post just moving content into Ghost and cleaning up formatting.
- SEO basics get skipped when you’re rushing, so posts go out without a usable meta description or consistent tags.
- Someone has to remember to publish, which means content becomes a recurring “check-in” instead of a system.
- When you delegate it, quality drifts because everyone writes metadata a little differently.
The Fix: OpenAI Drafts, n8n Packages, Ghost Publishes
This automation runs on a schedule every 12 hours. When it fires, OpenAI generates an original, multi-part blog draft designed to be engaging, plus the pieces people forget: a clear title, a meta description, and five tags. n8n then parses that AI response, separates the content from the metadata, and formats the post into the structure Ghost expects (so you don’t fight copy-paste artifacts). Finally, an authenticated HTTP request sends the finished payload to Ghost’s Admin API and publishes it automatically. No hardcoded keys, no manual posting, no “I’ll do it later.”
The workflow starts with a scheduled trigger. Then OpenAI creates the draft and metadata in one go, and two small code steps reshape it into a Ghost-ready mobiledoc payload. The last step publishes to Ghost via the Admin API.
What Changes: Before vs. After
| What This Eliminates | Impact You’ll See |
|---|---|
|
|
Real-World Impact
Say you publish 4 posts a week. Manually, it’s easy to burn about 30 minutes per post on Ghost formatting, meta description tweaks, and tags, plus another 10 minutes posting and double-checking. That’s roughly 3 hours a week of pure admin. With this workflow, the “hands-on” time can drop to about 15 minutes per post (review, quick edits, approve). You’re buying back around 2 hours most weeks, and the cadence stops being fragile.
Requirements
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- OpenAI for generating drafts and metadata.
- Ghost Admin API to publish posts into Ghost.
- OpenAI API key (get it from your OpenAI dashboard)
Skill level: Intermediate. You’ll connect credentials and paste your Ghost URL, but you won’t be writing an app.
Need help implementing this? Talk to an automation expert (free 15-minute consultation).
The Workflow Flow
Scheduled start (every 12 hours). n8n kicks off on a timer, so publishing is a system, not a calendar reminder you ignore.
AI drafting with SEO fields included. OpenAI generates the post in multiple parts, then also outputs the title, a meta description, and five tags in the same response. That matters because it keeps the pieces consistent.
Packaging for Ghost. Two code steps parse the AI response, extract the right fields, and format the content into a Ghost-compatible mobiledoc payload (so your post renders cleanly).
Publishing via the Ghost Admin API. An HTTP request sends the payload to Ghost using credentials stored in n8n’s Credential Manager, then the post appears in your Ghost site as a published article.
You can easily modify the prompt to target your niche, then keep the same Ghost publishing logic. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Schedule Trigger
Set the automation to run on a fixed schedule so a new draft is generated and published automatically.
- Open Scheduled Automation Start and set the schedule rule to run every
12hours. - Set Trigger At Minute to
34to match the workflow timing. - Verify the execution path: Scheduled Automation Start → Generate AI Draft.
Step 2: Connect OpenAI for Draft Generation
Configure the AI prompt and model so the workflow generates a structured blog draft with metadata.
- Open Generate AI Draft and set the Model to
gpt-4.1-mini-2025-04-14. - Set the Messages content to the provided prompt text to produce the blog content, title, meta description, and tags.
- Credential Required: Connect your
openAiApicredentials in Generate AI Draft.
⚠️ Common Pitfall: If the AI output omits the "Blog Post Title", "Meta Description", or "Tags" headings, Parse Blog Payload will default to Untitled and empty metadata. Keep the prompt structure intact.
Step 3: Set Up Content Parsing and Formatting
Transform the AI response into Ghost-compatible fields and build a Mobiledoc payload.
- Open Parse Blog Payload and confirm the code extracts
title,meta_description, andtagsfrom$json.message.content. - Ensure the HTML wrapper is preserved:
<div style="text-align:center; white-space:pre-line;">...</div>. - Open Assemble Ghost Format and confirm
mobiledocis built with version0.3.1and the HTML card.
Step 4: Configure the Ghost Publishing Action
Send the formatted post to the Ghost Admin API for publishing.
- Open Publish to Ghost API and set URL to
https://yourcustomurl.com/ghost/api/admin/posts/. - Set Method to
POSTand enable Send Body and Send Headers. - Set Body Content Type to
JSONand set JSON Body to{{ JSON.stringify($json) }}. - Credential Required: Connect your
ghostAdminApicredentials in Publish to Ghost API.
Step 5: Test and Activate Your Workflow
Run a manual test to confirm that a post is generated, parsed, formatted, and published to Ghost.
- Click Execute Workflow to run the process from Scheduled Automation Start.
- Check the output of Parse Blog Payload for
title,html,status,tags, andmeta_description. - Verify Publish to Ghost API returns a successful response and confirm the post appears in Ghost.
- When successful, toggle the workflow to Active to enable scheduled publishing.
Watch Out For
- Ghost Admin API credentials can expire or be scoped wrong. If things break, check Ghost’s Integrations settings and the n8n Credential Manager first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Common Questions
Usually in about an hour once you have your Ghost Admin API key.
Yes. You’ll mainly connect accounts and paste in a Ghost URL and API key.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API costs (often just a few dollars a month at low volume).
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Start by editing the OpenAI prompt in the “Generate AI Draft” node to match your niche, structure, and voice. If you want drafts instead of auto-publishing, keep the “Assemble Ghost Format” step and adjust the “Publish to Ghost API” request to create a draft status. You can also tweak the “Parse Blog Payload” code to enforce your tag rules (for example, always include one brand tag). The nice part is you’re not rewriting the whole workflow, just swapping the inputs and a couple output fields.
Usually it’s an invalid or expired Ghost Admin API key, or the Admin API URL is slightly wrong for your install. Update the credentials in n8n’s Credential Manager, then confirm your Ghost Integration is enabled and has the right permissions. If it fails only sometimes, rate limiting or a timeout on the HTTP request can also be the culprit when you run lots of posts back-to-back.
On n8n Cloud Starter, you can run plenty of scheduled posts for a single brand, and self-hosting removes execution limits (your server becomes the constraint). This workflow publishes one post per run, so at the default schedule it can produce up to two posts per day. If you increase frequency, watch your OpenAI usage and Ghost API limits.
Often, yes. n8n makes it easier to do the “messy middle” work like parsing the AI response, reshaping it into Ghost’s mobiledoc format, and handling conditional logic without paying extra for every branch. You also get the option to self-host, which matters when you want lots of executions without your automation bill creeping up. Zapier or Make can still be fine if you only need a simple draft-in, draft-out flow. But if you want reliable publishing with formatting control, n8n is usually the calmer choice. If you want a second opinion on setup or governance, Talk to an automation expert.
Once this is running, content stops being a recurring fire drill. The workflow handles the repetitive publishing work, so you can focus on ideas, editing, and what you want your blog to actually do.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.