Automate LinkedIn Posts with Ghost & n8n AI Agent

Struggling to create engaging LinkedIn posts from your Ghost blog content? This workflow automates extracting blog posts, cleansing HTML, generating tailored LinkedIn promos with AI, and recording them in Google Sheets for easy management.
ghost
agent
googleSheets
+7
Workflow Identifier: 2108
NODES in Use: Manual Trigger, Ghost, Set, SplitInBatches, Code, Merge, AI Agent, OpenAI Chat Model, Google Sheets, Sticky Note
Automate LinkedIn posts with n8n and Ghost

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Automation Does

This workflow takes latest 3 blog posts from a Ghost blog and turns them into LinkedIn posts automatically.
It solves how time-consuming it is to write LinkedIn promotions by hand.
The result is professional LinkedIn messages ready for sharing, saved into Google Sheets for tracking.


Tools and Services Used

  • Ghost Blog API: Fetches latest blog posts.
  • OpenAI Chat Model (GPT 4o-mini) via LangChain: Creates LinkedIn text from blog content.
  • Google Sheets API: Records post data and generated LinkedIn messages.
  • n8n: Workflow automation platform hosting this process.

Inputs → Processing Steps → Output

Inputs

  • Ghost Admin API Key and blog URL
  • OpenAI API Key for ChatGPT model
  • Google Sheets API credentials and target sheet information

Processing Steps

  1. Trigger manually through Manual Trigger node.
  2. Extract Blog Posts node gets latest 3 posts from Ghost API.
  3. Extract Post Content Set node maps fields: id, title, content, excerpt, featured image, link.
  4. Loop Over Posts SplitInBatches node processes posts one by one.
  5. Clean HTML Code node removes HTML tags and extra spaces from content.
  6. Add Clean HTML Merge node combines cleaned text with original metadata.
  7. AI Agent node crafts LinkedIn post text using dynamic blog data.
  8. Merge Linkedin node combines AI text with metadata.
  9. Record the posts Google Sheets node appends all results to the sheet.

Output

  • Google Sheet filled with rows containing blog post info plus AI-generated LinkedIn post text.
  • Consistent, professional social post texts ready for publishing.

Beginner Step-by-Step: How to Use This Workflow in n8n

Import the Workflow

  1. Download the workflow file using the Download button on this page.
  2. Open the n8n editor.
  3. Use the Import from File feature to add the downloaded workflow.

Configure Credentials and Settings

  1. Add Ghost API credentials with the correct Admin API key and blog URL.
  2. Set OpenAI API Key for the Chat Model node, using GPT 4o-mini model.
  3. Configure Google Sheets credentials and select the spreadsheet and worksheet to append data.
  4. Update any IDs, emails, channels, folders, or table names if required.
  5. Copy any code or prompt text from the AI Agent node input for reference if needed.

Test and Activate Workflow

  1. Run the workflow manually by clicking “Execute Workflow” in the editor.
  2. Review each node for successful execution and no errors.
  3. If tests pass, activate the workflow by toggling it to active.

You may want to schedule the workflow or add triggers for automation.
Consider using self-host n8n for better control over workflows.


Customizations

  • Change the Ghost node Limit parameter to fetch more or fewer blog posts.
  • Edit the AI Agent node prompt in systemMessage to adjust tone, signature, or messaging style.
  • Add more metadata fields like tags or categories in the Extract Post Content Set node and update Google Sheets mapping.
  • Switch to different AI models (newer GPT, Claude, Grok) by updating the OpenAI Chat Model node’s model.

Troubleshooting

  • Ghost API returns empty array
    Cause: Wrong or expired API key or wrong blog URL.
    Fix: Check Ghost Admin API key, URL; test API with tools like Postman.
  • AI Agent returns no output or error
    Cause: Invalid OpenAI API key, exceeded quota, or bad prompt.
    Fix: Verify OpenAI key, ensure prompt uses correct expressions.
  • Google Sheets append fails
    Cause: No write permission or incorrect sheet ID.
    Fix: Reauthorize Google credentials, confirm spreadsheet ID and worksheet name.

Pre-Production Checklist

  • Confirm Ghost, OpenAI, and Google Sheets API credentials work.
  • Test Ghost API connection alone to ensure posts retrieval.
  • Run full workflow manually and check Google Sheet rows.
  • Read AI output for good format and tone.
  • Backup Google Sheets data before mass inserts.

Deployment Guide

After successful tests, activate the workflow for automatic runs.
Setup error notifications in n8n for key nodes to catch any failures.
Consider scheduling or connecting with triggers for ongoing use.
If using self-host n8n, find help about setup here.


Summary

✓ Saves hours by automating LinkedIn post creation from Ghost blogs.
✓ Produces consistent, professional LinkedIn messages linked to full articles.
✓ Stores data and posts in Google Sheets for tracking.
✓ Easy to import, configure, and run in n8n for content marketers.


Automate LinkedIn posts with n8n and Ghost

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

The workflow uses the Ghost API with valid Admin API credentials through the Extract Blog Posts node to retrieve the latest posts.
The workflow uses the GPT 4o-mini model via the OpenAI Chat Model node connected to the AI Agent node.
Generated posts, along with blog metadata, are appended as new rows in a specified Google Sheets spreadsheet by the Record the posts node.
Yes, the limit parameter in the Extract Blog Posts Ghost node can be adjusted to set how many latest posts to fetch.

Promoted by BULDRR AI

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.