FREE GUIDE AI + AUTOMATION ~20 MIN READ COPY-PASTE PROMPTS

n8n + AI: Connect ChatGPT & Claude

Add AI brains to your automations — free guide with copy-paste prompts

By the end of this guide, you will have an n8n workflow with a working AI node. Your automations will be able to write, summarize, classify, and create — all on autopilot.

Why AI + Automation Is a Game Changer

What This Is

Regular automation: "When I get a new email, save it to a spreadsheet." Useful, but limited. It can only move data around. It cannot think.

AI-powered automation: "When I get a new email, have AI read it, decide if it is urgent, draft a reply, and save a summary to a spreadsheet." Now your workflow actually makes decisions and creates content. That is the difference.

What AI Can Do Inside n8n

TaskWithout AIWith AI
New customer emailSave to spreadsheetClassify urgency, draft reply, save summary
New blog postPost link to social mediaGenerate 5 unique social posts with different angles
Customer feedbackLog in databaseAnalyze sentiment, extract themes, create report
New product listedNotify teamWrite product description, SEO title, ad copy
Support ticketAssign to team memberSuggest solution, draft response, route by category
COST TRANSPARENCY

n8n: Free (self-hosted) or $24/month (Cloud with 14-day free trial).

OpenAI API (ChatGPT): Pay-per-use. Most workflows cost $1-5/month. You need an API key from platform.openai.com.

Anthropic API (Claude): Pay-per-use. Similar pricing. You need an API key from console.anthropic.com.

Both APIs offer free credits when you sign up. Enough to test for weeks.

Connect ChatGPT (OpenAI) to n8n

Get Your API Key

1

Go to platform.openai.com

Sign up or log in. Click "API keys" in the left sidebar. Click "Create new secret key." Copy the key and save it somewhere safe.

Add OpenAI to n8n

2

Add the OpenAI node to your workflow

Click "+" on your canvas and search for "OpenAI." Select OpenAI → Message a Model. When asked for credentials, paste your API key.

3

Configure your prompt

In the "Prompt" field, type what you want AI to do. You can mix in data from previous nodes using the {{ }} syntax.

COPY-PASTE PROMPT: EMAIL CLASSIFIER
You are an email classifier for a small business. Read the email below and return a JSON object with three fields: 1. "urgency": "high", "medium", or "low" 2. "category": "sales", "support", "billing", "general", or "spam" 3. "summary": A one-sentence summary of the email Email subject: {{$json.subject}} Email body: {{$json.body}} Email from: {{$json.from}} Return ONLY the JSON object. No extra text.
COPY-PASTE PROMPT: SOCIAL MEDIA WRITER
You are a social media writer. Take the blog post below and create 3 social media posts: 1. A Twitter/X post (under 280 characters) 2. A LinkedIn post (2-3 paragraphs, professional tone) 3. An Instagram caption (casual, with 5 relevant hashtags) Blog title: {{$json.title}} Blog content: {{$json.content}} Format each post with a clear label (Twitter, LinkedIn, Instagram).
COPY-PASTE PROMPT: CUSTOMER REPLY DRAFTER
You are a friendly customer service agent for {{$json.company_name}}. Draft a helpful reply to this customer message. Rules: - Be warm and professional - Address their specific concern - Offer a clear next step - Keep it under 150 words - Sign off with the company name Customer message: {{$json.message}}
Test your workflow. Click "Test workflow" and check the OpenAI node output. You should see the AI response in the output panel.

Connect Claude (Anthropic) to n8n

What This Is

Claude is made by Anthropic. It is especially good at following detailed instructions, working with long documents, and producing carefully structured output. Many businesses prefer Claude for anything that needs precision.

Method 1: Anthropic Node (Easiest)

1

Get your Claude API key

Go to console.anthropic.com. Sign up. Go to API Keys. Create a key. Copy it.

2

Add the Anthropic node

Search for "Anthropic" in the node panel. Select Anthropic → Message a Model. Paste your API key when asked. Pick claude-sonnet-4-20250514 as the model (best balance of speed and quality).

Method 2: HTTP Request Node (More Control)

If the Anthropic node is not available, use the HTTP Request node:

COPY-PASTE: CLAUDE API VIA HTTP REQUEST
URL: https://api.anthropic.com/v1/messages Method: POST Headers: x-api-key: YOUR_CLAUDE_API_KEY anthropic-version: 2023-06-01 Content-Type: application/json Body (JSON): { "model": "claude-sonnet-4-20250514", "max_tokens": 1024, "messages": [ { "role": "user", "content": "Your prompt here with {{$json.data}} from previous nodes" } ] }

When to use Claude vs ChatGPT: Use Claude when you need precise instruction-following, long document analysis, or structured output. Use ChatGPT when you need creative writing, image understanding, or when speed matters most. Both work great in n8n.

5 AI Workflows You Can Build Today

1. Smart Email Sorter

Trigger: New email in Gmail → AI: Classify urgency + category → Action: Route to the right folder, notify team if urgent

2. Content Repurposer

Trigger: New blog post (RSS or webhook) → AI: Generate social posts + email newsletter → Action: Schedule posts, draft newsletter

3. Feedback Analyzer

Trigger: New form submission → AI: Analyze sentiment, extract key themes → Action: Log to spreadsheet, alert if negative

4. Product Description Generator

Trigger: New row in Google Sheets (raw product data) → AI: Write SEO description + social copy → Action: Update product listing

5. Meeting Notes Summarizer

Trigger: New file in Google Drive (meeting transcript) → AI: Summarize key points + extract action items → Action: Create Notion page, assign tasks

Action Step: Pick one workflow from this list. Open n8n. Build it now. You already know how to add nodes and connect them. The AI node is just another block in your chain.

AI Prompt Tips for n8n

Warning: AI can make mistakes. Never use AI output for legal, medical, or financial decisions without human review. For customer-facing content, always add a review step or human approval node before sending.

What's Next

What to Do Next

Our recommendation: We use Claude AI for our own business and recommend it to everyone we work with. It follows instructions precisely, writes at a professional level, and takes your privacy seriously. Try Claude.

claude.ai (web)  ·  iPhone app  ·  Android app

Ready to Build AI-Powered Automations?

Join thousands of people who use CreatorHQ to automate with AI.

Explore CreatorHQ