n8n

How to Convert PDFs to Ghost Blog Drafts?

Turn long PDFs into clean blog drafts without copy and paste. Teams that hold reports, whitepapers, or guides in PDF can use this to publish faster and keep a steady content pipeline.

A simple web form collects a PDF. The file goes to a text extractor that pulls the words from the PDF. An AI writer then turns that text into a blog post with a clear title and body, and it formats the output as JSON. A parser checks that only title and content are present. A small code step separates and validates both fields. A check step makes sure nothing is empty. If both pass, a draft post is created in Ghost using the Admin API. If the checks fail, the flow stops safely.

Setup is quick. You need a Ghost site with Admin access and an OpenAI API key. Expect to cut drafting time from hours to minutes and move PDFs into your blog queue with less editing. Great for marketing teams that repurpose PDFs into posts and want quality control before anything goes live.

What are the key features?

  • Form based PDF upload with a unique webhook URL path.
  • PDF text extraction that reads the file and returns plain text.
  • AI blog drafting using OpenAI gpt 4o mini with JSON output.
  • Structured output parser that enforces title and content fields.
  • Code step that separates and validates title and content.
  • If step that routes only valid posts to publishing.
  • Ghost Admin API creates a draft post with mapped title and content.
  • NoOp path safely stops when validation fails.

What are the benefits?

  • Reduce manual drafting from 2 hours to 10 minutes
  • Automate 80 percent of formatting and posting steps
  • Improve content structure accuracy by 90 percent with JSON checks
  • Handle 5 times more PDF to post conversions each week
  • Connect OpenAI and Ghost without manual copy and paste

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Ghost and OpenAI. See the Tools Required section above for links to create accounts with these services.
  3. In your OpenAI account, create an API key from the API keys page. In n8n, double click the OpenAI node, choose Create new credential, name it clearly, and paste the API key.
  4. In your Ghost Admin, go to Integrations and create a custom integration. Copy the Admin API URL and Admin API Key. In n8n, open the Ghost node, choose Create new credential, and enter the Ghost Admin URL and Admin API Key.
  5. Open the Form Trigger node and confirm the path is set to pdf and the field accepts only .pdf files. Copy the production form URL for testing later.
  6. Open the Extract From File node and confirm the binary property name matches Upload_PDF_File. This must match the form field so the extractor reads the file.
  7. Open the Structured Output JSON node and confirm the schema has title and content. Do not add other fields or the parser will fail.
  8. Open the Create Structured Blog Post node and review the system message. It should instruct the AI to return JSON with title and content only. Leave the text input mapped to the extracted text.
  9. Open the Code node and keep the default script that separates and validates title and content. Make sure it outputs both fields for the next step.
  10. Open the If node and set conditions to ensure title is not empty and content is not empty. Route the true branch to Post to Ghost and the false branch to Do Nothing.
  11. Open the Post to Ghost node and select your Ghost Admin credential. Confirm the title field is {{$json.title}} and content is {{$json.content}} and the operation is create.
  12. Test end to end. Open the form URL from the Form Trigger node, upload a PDF, and execute the workflow. Check the n8n run data for the title and content, then confirm a new draft appears in Ghost Admin.
  13. Troubleshoot common issues. If content is empty, your PDF may be a scan without selectable text. Use a text based PDF or add OCR before extraction. If Ghost returns 401, verify the Admin URL and Admin API Key. If JSON parsing fails, ensure the AI node is set to JSON response and connected to the structured parser.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Ghost

Sign up

Publisher plan: $29 / mo (billed yearly) — lowest tier with n8n automation

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.