automation · Off The Record
How to Connect Claude API to N8N in 15 Minutes
How to Connect Claude API to N8N in 15 Minutes
Somebody on LinkedIn will tell you this takes "an entire weekend sprint" and requires "cross-functional alignment." It takes fifteen minutes and a coffee that's still hot when you finish. The LinkedIn version exists because consultants bill by the hour and complexity is the entire business model. Here's the actual fifteen minutes.What you need before you start
An N8N instance, self-hosted or cloud, doesn't matter. An Anthropic API key, which you get from the Anthropic Console in about ninety seconds — faster than it takes to explain to your accountant why you need it. And one workflow idea that justifies the wiring, because connecting an AI to an automation tool with nothing for it to do is just an expensive way to feel productive. I built this for the Outbound Sales stack on this site — Apollo finds the leads, FullEnrich gets the emails, and Claude writes a first line that doesn't sound like it was generated by something that has never had a conversation in its life. That's the workflow we're wiring.The actual steps
Add an HTTP Request node in N8N. This is the part that surprises people — there's no fancy "Claude node" you need to hunt for in a marketplace, no plugin to install, no Zapier-style app connector with a logo. Claude API is just an HTTP endpoint, and N8N's HTTP Request node talks to any HTTP endpoint on earth. Point it at `https://api.anthropic.com/v1/messages`. Set the method to POST. Add three headers: `x-api-key` with your key, `anthropic-version` set to `2023-06-01`, and `content-type` as `application/json`. The body is where the actual instruction lives: ```json { "model": "claude-sonnet-4-6", "max_tokens": 200, "messages": [ { "role": "user", "content": "Write one personalised opening line for {{ $json.name }} at {{ $json.company }}, based on this context: {{ $json.linkedin_summary }}" } ] } ``` That's it. The `{{ }}` syntax pulls data from the previous node — Apollo's output, FullEnrich's enrichment, whatever fed into this step. Connect the output to your next node, which in our case is Lemlist receiving the personalised line as a variable. Run it. Watch a genuinely different first line get written for every single lead in your list, instead of the same `{{first_name}}` mail-merge garbage that every recruiter on the planet has been sending since 2014 and somehow still hasn't noticed isn't working.Why people overcomplicate this
Because somebody sold them a "no-code AI agent platform" for €400 a month that does exactly this — an HTTP call wrapped in a nicer UI with a logo and a dashboard that shows you charts about charts. I'm not saying those tools have zero value. I'm saying you should know what's actually happening under the hood before you pay a premium to not know. This is the entire architecture behind the Web Intelligence stack too — Firecrawl scrapes, the same HTTP Request pattern hands the content to Claude, Claude categorises and rewrites, Supabase stores it. Every "AI agent" you've seen demoed on a SaaS landing page is some version of this same loop, repackaged with better marketing and a 14-day free trial.The part nobody tells you
Your `max_tokens` setting matters more than people think. Set it too high and you're paying for headroom you never use — like renting a four-bedroom apartment because you might, theoretically, someday, host a dinner party. Set it for what you actually need. A one-line personalisation doesn't need 4000 tokens of room to breathe. And test your prompt in the actual Anthropic Console first, not inside N8N. Debugging a prompt through five layers of automation when the problem is a badly worded instruction is the kind of self-inflicted Tuesday nobody needs.What this actually costs
A few cents per thousand leads, depending on your token usage. Compare that to the "AI sales enablement platform" charging you per-seat for the privilege of doing what you just built in fifteen minutes for the price of an espresso. Somewhere, an enterprise sales rep is currently building a slide deck explaining why their version is worth ten times more. It isn't. It's the same HTTP call wearing a blazer. --- If you want this wired into your actual stack — not a demo, the real thing, running in production — FreeMalta's Fractional CAIO service does exactly this. No fifteen-page proposal. No "let's circle back next sprint." We connect the API, we test it, it ships.Want something like this built for your business?
Fractional CAIO
Tools used in this piece
Frequently Asked Questions
Who wrote this article?
This piece was written by Ilhan Irem Yuce , Founder of FreeMalta.com and Chief Editor of News Beast — Malta's first AI-native newsroom.
Is the architecture described here actually live?
Yes. Everything described is the real production system running News Beast on freemalta.com — not a conceptual demo.
How many AI writers does News Beast run?
Ten distinct author personas, each with a full character — biography, writing style, voice rules — covering twenty-two categories across Malta news, global affairs and lifestyle content.
What stops the AI writers from covering the same story?
A three-layer isolation system: separate RSS source pools per writer, non-overlapping keyword matching per category, and a seven-day URL blacklist that prevents the same source being reused across categories.
Can this architecture be used outside of news publishing?
Yes. The same pattern — isolated agent pools, structured character prompts, automated editorial review, never-empty fallback — applies to any business building AI agents for real production output, not just demos.