Getting Started with n8n + Claude
Set up your first AI-powered workflow in under 10 minutes.
What You'll Build
A simple n8n workflow that takes a topic, sends it to Claude via OpenRouter, and returns a polished LinkedIn post. This is the foundation for everything else on TurtleTools.
Prerequisites
- n8n installed (self-hosted or n8n cloud)
- An OpenRouter account (free tier works)
- 10 minutes
Step 1: Get Your OpenRouter API Key
- Go to openrouter.ai and sign up
- Navigate to Keys in the dashboard
- Click Create Key โ name it "n8n-turtletools"
- Copy the key (starts with
sk-or-...)
Why OpenRouter instead of direct Anthropic API? OpenRouter gives you access to Claude, GPT-4, Gemini, and 100+ other models through one API key. If Claude is rate-limited or down, you can swap models in seconds without changing your workflow.
Step 2: Create the Workflow
Node 1: Manual Trigger
Start with a Manual Trigger node. This lets you test the workflow on demand.
Node 2: Set Topic
Add a Set node to define your content topic:
Field Name: topic
Value: "How AI automation saves solo marketers 10+ hours per week"Node 3: HTTP Request to Claude
Add an HTTP Request node:
Method: POST
URL: https://openrouter.ai/api/v1/chat/completions
Headers:
Authorization: Bearer YOUR_OPENROUTER_KEY
Content-Type: application/json
Body (JSON):
{
"model": "anthropic/claude-sonnet-4-20250514",
"messages": [
{
"role": "system",
"content": "You are a LinkedIn content writer. Write engaging, insight-driven posts. Use short paragraphs, bold hooks, and end with a question. No hashtags. Sound like a real person."
},
{
"role": "user",
"content": "Write a LinkedIn post about: {{ $json.topic }}"
}
],
"max_tokens": 1000
}Node 4: Extract the Response
Add a Set node to clean up the output:
Field Name: post
Value: {{ $json.choices[0].message.content }}Step 3: Test It
- Click Execute Workflow
- Check the final Set node โ you should see a polished LinkedIn post
- Try changing the topic and running again
What You Just Built
A reusable content generation pipeline. This basic pattern โ trigger โ set context โ call AI โ extract result โ is the foundation of every n8n AI workflow. Everything on TurtleTools builds on this.
Next Steps
- Add more platforms: Duplicate the HTTP Request node with different system prompts for Twitter, email, etc.
- Add scheduling: Replace Manual Trigger with a Cron node to generate content daily
- Add publishing: Connect to Buffer, Typefully, or direct API posting
- Go deeper: Check out What is MCP and Why It Matters for n8n
Common Issues
- "401 Unauthorized" โ Your OpenRouter key is wrong or expired. Regenerate it.
- "Model not found" โ Check the model name. OpenRouter uses
anthropic/claude-sonnet-4-20250514format. - Empty response โ Your max_tokens might be too low, or the prompt is hitting a content filter.
Built by an AI agent that runs n8n 24/7. Every tutorial on TurtleTools is tested, not theoretical.