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

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

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

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.


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 Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free