How to Automate Content with n8n and Claude (Step-by-Step for Non-Developers)


TL;DR

  • Build a fully automated content pipeline that pulls keywords from a Google Sheet, sends them to Claude via n8n, and publishes drafts straight to WordPress — no coding required.
  • The secret to quality output is prompt engineering inside n8n expressions, not just connecting nodes.
  • Download the ready-made workflow JSON at the end and import it in under two minutes.

Table of Contents

  1. Why Automate Content with n8n and Claude?
  2. Prerequisites: Gathering Your Tools and Keys
  3. Step 1: Building the Basic Workflow Structure
  4. Step 2: Crafting the Perfect Prompt for Claude
  5. Step 3: Generating the Full Content
  6. Step 4: Publishing the Content Automatically
  7. Advanced Tips: Error Handling and Cost Management
  8. Comparison: n8n + Claude vs. Competing Stacks
  9. FAQ
  10. Conclusion

Why Automate Content with n8n and Claude?

If you are managing content for five clients or trying to publish three blog posts a week on your own site, the bottleneck is always the same: time spent on repetitive tasks that follow a predictable pattern. Research a keyword, write a brief, draft the post, format it, publish it. Every single time.

n8n is an open-source workflow automation platform — think Zapier, but without the per-task pricing wall and with far more flexibility over what nodes do and how data flows between them. You can run it in the cloud or self-host it on a $6/month VPS. The node library covers 400+ services out of the box, and anything else hits a generic HTTP Request node.

Claude is Anthropic’s large language model family. Claude 3.5 Sonnet specifically punches above its weight for long-form structured writing. It follows detailed system instructions reliably, handles markdown formatting without hallucinating extra code blocks, and stays on topic through a 200,000-token context window — which matters when you are chaining content generation steps.

Put them together and the practical payoff is concrete:

  • Time saved: A brief that takes 45 minutes of research and writing takes about 90 seconds of API time.
  • Scale: Run the same workflow against 50 keywords on a Sunday night and wake up to 50 draft posts.
  • Consistency: Every brief follows the same structure, the same word count targets, the same SEO requirements. No variation from writer to writer.

This guide focuses on one specific, high-value use case: automating SEO-optimized blog briefs from a list of keywords stored in a Google Sheet, then publishing the drafts to WordPress. Once you understand this pipeline, you can swap the trigger and destination for any combination you need.


Prerequisites: Gathering Your Tools and Keys

Before touching n8n, collect everything in one place.

n8n Instance The fastest path is n8n Cloud, which gives you a managed instance with no server setup. The Starter plan is free for low volume. If you prefer self-hosting for cost or data-privacy reasons, spin up a droplet on DigitalOcean or a server on Hetzner — both have one-click n8n installs via Docker Compose. Self-hosting is cheaper at scale but adds ten minutes of setup time upfront.

Anthropic Claude API Key Go to console.anthropic.com, create an account, and generate an API key under Settings → API Keys. Fund your account with at least $5. A full 1,500-word blog post using Claude 3.5 Sonnet costs roughly $0.015–$0.03 depending on input token length.

Data Source: Google Sheet Create a sheet with at minimum three columns: Keyword, Target URL, Status. The Status column will be updated by the workflow after processing so the same row does not trigger twice. If you prefer a more structured database, Airtable or Google Workspace Sheets both work and have dedicated n8n nodes.

Destination: WordPress You need the URL of your WordPress site and credentials for an Application Password (Settings → Users → Profile → Application Passwords in WordPress admin). Write these down; you will paste them into n8n.


Step 1: Building the Basic Workflow Structure

Open n8n. Click New Workflow.

Trigger Node — Google Sheets Add a Google Sheets node. Set the operation to Get Many Rows. Connect your Google account via OAuth. Select your spreadsheet and the sheet tab. Under Filters, add a filter: Status is empty. This ensures only unprocessed rows trigger the workflow. Set the schedule trigger (an additional Schedule node) to run every morning at 6 AM — or manually trigger it during testing.

Anthropic Claude Node n8n has a native Anthropic node (available from version 1.30 onward). Add it after the Google Sheets node. Under Credentials, paste your Claude API key. Set:

  • Model: claude-3-5-sonnet-20241022 (best quality-to-cost ratio as of mid-2025)
  • Max Tokens: 4000 for a full blog draft, 800 for a brief
  • Temperature: 0.5 — lower than default, which keeps outputs structured and consistent

You will fill in the prompt in Step 2.


Step 2: Crafting the Perfect Prompt for Claude

This is where most tutorials leave money on the table. Connecting nodes is the easy part. The prompt determines whether your output is usable or garbage.

The Golden Rules for Prompting Claude in n8n

  1. Use a System message for instructions that never change. Use the Human message for the dynamic, per-row data.
  2. Be explicit about format. Claude follows markdown instructions precisely if you tell it what you want.
  3. Give it a persona and constraints in the same breath: “You are an experienced SEO content strategist. Do not include generic introductions. Do not use passive voice.”

How to Pass Dynamic Data with n8n Expressions

n8n uses double-curly-brace expressions to pull data from previous nodes. Inside the Human message field of the Anthropic node, your expression looks like this:

Write a detailed SEO blog brief for the following keyword: {{ $json.Keyword }}

Target URL to internally link to: {{ $json["Target URL"] }}

Brief requirements:
- Suggested H1 title (include keyword near the front)
- Meta description (155 characters max, include keyword)
- Outline with 5–7 H2 headings, each with 2-sentence summary of what to cover
- Target word count: 1,600 words
- 3 suggested internal links relevant to the topic
- 2 suggested external authority sources to cite

That {{ $json.Keyword }} pulls the exact value from the Google Sheet row currently being processed. If your sheet has a row with content marketing automation, that string lands in the prompt. Every row gets a custom brief with zero extra work.

System Message (paste this verbatim)

You are an expert SEO content strategist with 10 years of experience writing 
for SaaS and digital marketing brands. Your briefs are concise, actionable, 
and follow on-page SEO best practices. Always respond in clean Markdown. 
Never add preamble like "Sure!" or "Great question!". Start directly with the H1 title.

That last instruction eliminates the fluff that makes AI content obvious.


Step 3: Generating the Full Content

For a brief, one Claude node is enough. For a full ~1,500-word blog post, use two chained Claude nodes:

  • Node A: Generates the outline (fast, cheap, ~300 tokens output)
  • Node B: Receives the outline as input and writes the full draft section by section

In Node B, the Human message references Node A’s output:

Using the following outline, write a complete blog post. 
Each H2 section should be 200–250 words. Use short paragraphs (3 sentences max). 
Include the primary keyword "{{ $('Google Sheets').item.json.Keyword }}" 
naturally in the first 100 words and in at least two H2 headings.

Outline:
{{ $('Anthropic').item.json.content[0].text }}

Note the expression $('Anthropic').item.json.content[0].text — this is how you reference a specific node by name. The Claude API returns content as an array; index [0] gets the first (and usually only) message block.

Handling Markdown Output The WordPress node accepts HTML, not raw Markdown. Add a Code node between Claude and WordPress with this three-line JavaScript:

const md = require('marked');
items[0].json.html_content = md.parse(items[0].json.content[0].text);
return items;

n8n’s sandboxed Code node includes the marked library. This converts headers, bold text, and lists into proper HTML automatically.


Step 4: Publishing the Content Automatically

Add a WordPress node. Set:

  • Operation: Create Post
  • Status: Draft (always — never auto-publish AI content without a human review)
  • Title: {{ $('Anthropic - Outline').item.json.content[0].text.split('\n')[0].replace('# ','') }} — this strips the H1 from the first line of Claude’s output
  • Content: {{ $json.html_content }} — the converted HTML from the Code node

After the WordPress node, add another Google Sheets node set to Update Row. Map the Status column to the value Done. This prevents the row from triggering the workflow again on the next run.

For non-WordPress destinations: swap the WordPress node for a Google Docs node (creates a new Doc in a specified folder) or a bare HTTP Request node pointing at any CMS API — Ghost, Webflow, Contentful, all accept standard REST calls.


Advanced Tips: Error Handling and Cost Management

Error Trigger Node Every production workflow needs one. Add an Error Trigger node as a separate workflow. When any node fails, it fires an email or Slack message with the full error detail. Without this, failed runs are silent.

Switch Node for Content Types If your Google Sheet handles multiple content types (briefs, social posts, email subjects), add a Switch node after the trigger. Route rows where Type = Brief to one Claude node and Type = Social to another with a different prompt and token limit.

Monitoring API Costs Add an HTTP Request node at the end of each successful run that calls the Anthropic usage API (GET /v1/usage) and logs token counts to a separate Google Sheet tab. After two weeks, you will have real data on cost per content type. Claude 3.5 Sonnet costs $3 per million input tokens and $15 per million output tokens — for 50 blog briefs a week, expect under $10/month in API costs.


Comparison: n8n + Claude vs. Competing Stacks

Factorn8n + ClaudeZapier + OpenAIMake + OpenAI
Monthly cost (50 workflows)~$24 cloud / ~$6 self-hosted$49+ (task-based pricing)$29 (operations-based)
Claude model supportNative node, full model selectionVia HTTP Request onlyVia HTTP Request only
Self-hosting optionYes (Docker, full control)NoNo
Workflow complexity ceilingHigh (loops, sub-workflows, code nodes)MediumHigh
Learning curveModerateLowModerate
Data privacyFull (self-hosted)LowLow

For content marketers who need volume and care about data handling, n8n + Claude is the stronger long-term choice. Zapier is faster to start but gets expensive fast and lacks native Claude support.


FAQ

Q1: Do I need coding experience to build this workflow? No. Every step in this guide uses n8n’s visual interface and native nodes. The one Code node in Step 3 is copy-paste — you do not need to understand JavaScript to use it.

Q2: What does this workflow actually cost per month? If you run 50 blog briefs per week using Claude 3.5 Sonnet, expect roughly $8–$12/month in API costs plus your n8n plan. Self-hosting n8n on a Hetzner CX11 server runs about $4/month.

Q3: Can I use a different Claude model, like Haiku, to save money? Yes. Claude 3 Haiku is significantly cheaper and fast. For shorter outputs like social posts or meta descriptions, it performs well. For 1,500-word drafts, Sonnet produces noticeably more coherent structure.

Q4: How do I prevent the same Google Sheet row from triggering twice? The workflow includes a step that writes Done to the Status column after each successful run. The trigger node filters for rows where Status is empty. Rows already marked Done are ignored.

Q5: Where do I get the downloadable workflow JSON mentioned in the article? Download the complete n8n workflow JSON here. Import it in n8n via Settings → Import from File. You will still need to connect your own credentials (Google, Anthropic, WordPress), but the node structure, expressions, and prompt templates are pre-built.


Conclusion

The pipeline described here — Google Sheet trigger, Claude content generation, WordPress draft publishing — is not a prototype. It is a production workflow that runs unsupervised and produces usable first drafts consistently. The investment is roughly two hours to set up, after which each piece of content costs you about 90 seconds of clock time and $0.02 in API fees.

The key decisions that actually move the needle: pick Claude over generic GPT wrappers for structured long-form output, use n8n expressions to inject dynamic data into every prompt rather than static prompts, and always publish to Draft status so a human reviews before anything goes live.

Start with the brief generation workflow, run it for two weeks, then extend it. The structure scales to any content type once the foundation is solid.

Ready to build it? Start your n8n Cloud account here and get your Claude API key from Anthropic’s console. If you want to self-host, DigitalOcean’s n8n Droplet is the fastest path from zero to a running instance.


Prices and model names current as of June 2025. Claude model versions update regularly — check the Anthropic model documentation for the latest release before building.