← Back to blog

Auto-write post-purchase emails with Claude Fable 5.1…

Build idea, not a verified tutorial. This was drafted by an automation Daniel built. Tool interfaces change often — check the current docs before relying on the steps.

Writing a personal follow-up email after every order takes time you don't have, but generic order confirmations feel cold and miss a chance to build loyalty. Claude Fable 5.1 — Anthropic's freshly released model — can read each order's details and write a warm, product-specific email in seconds, and its new 75% cheaper prompt cache pricing makes it affordable to run on every order.

TRIGGERORCHESTRATEAI / ENRICHOUTPUTNew order (Webhook)n8n workflow canvasClaude Fable 5.1drafts emailGmail sendspersonalised email
How it flows
1

Create a free n8n Cloud account and open a new workflow

n8n is a visual automation tool — think of it as a flowchart builder where each box (called a node) does one job, like receiving data or sending an email. Go to n8n.io, sign up for a free Cloud account (no credit card needed), and click New workflow on the dashboard. You'll see a blank canvas with a single grey Add first step tile in the middle.

n8n · blank workflow canvas
1 Start a fresh workflow
New workflow
2 Where to sign up
n8n Cloud has a free tier. No credit card required. Self-hosting with Docker is also free if you prefer. n8n sign-up page →
2

Add a Webhook node as your trigger

A Webhook is a web address that listens for incoming data. When your shop sends order details to this address, n8n wakes up and runs your workflow. Click the Add first step tile, search for Webhook, and select it. Set the HTTP Method to POST (that's the standard way apps send data to a URL). Copy the Test URL n8n shows you — you'll paste this into your shop's order notification settings later.

n8n · Webhook node settings
1 Search for the trigger node
2 Node settings
HTTP MethodPOST
AuthenticationNone (for now)
3 Copy your test URL — paste it into your shop's webhook settings
https://your-n8n-instance.app.n8n.cloud/webhook-test/…Copy
3

Get your Anthropic API key and store it in n8n

An API key is like a password that lets n8n talk to Claude on your behalf. Go to console.anthropic.com, sign up or log in, and under API Keys click Create Key. Copy it — you only see it once. Back in n8n, go to Settings → Credentials, click Add credential, choose Header Auth, and paste the key as the value with the header name `x-api-key`. Give the credential a name like `Anthropic` and save.

n8n · Credentials panel
1 Open credentials settings
Add credential
2 Choose the credential type
HA Header AuthBA Basic AuthO OAuth2
3 Fill in the key details
NameHeader Auth
Name (header)x-api-key
Valuesk-ant-…your key here…
4 Where to get the key
Log in at console.anthropic.com → API Keys → Create Key. Free-tier credits are enough to test this workflow. Anthropic Console →
4

Add an HTTP Request node to call Claude Fable 5.1

Now add the node that actually talks to Claude. Click + after the Webhook node, search for HTTP Request, and select it. This node lets n8n call any web service — in this case, Anthropic's Messages API (the address Claude listens at). Fill in the fields exactly as shown below. The Body section is where you write your prompt in plain English, using `{{ }}` expressions to pull in the order data from the previous Webhook step.

n8n · HTTP Request node — calling Claude Fable 5.1
1 Request settings
MethodPOST
URLhttps://api.anthropic.com/v1/messages
AuthenticationPredefined Credential Type → Header Auth → Anthropic
Header: anthropic-version2023-06-01
Header: Content-Typeapplication/json
2 Paste this as the JSON Body — edit the prompt text freely
{ "model": "claude-fable-5-1", "max_tokens": 512, "messages": [{ "role": "user", "content": "A customer just bought {{ $json.body.product_name }}. Write a warm 3-sentence thank-you email. Mention the product by name, give one practical tip for using it, and invite them to reply with questions. Sign off as the shop team." }] }
Returns{ content: [{ text: 'Hi there! Thank you so much for your order of…' }] }
3 Tip: swap the model ID any time
The model name claude-fable-5-1 is confirmed as the current self-serve ID on Anthropic's API. Update it here whenever Anthropic releases a newer model. Fable 5.1 announcement →
5

Add a Gmail node to send the email

Click + after the HTTP Request node, search for Gmail, and select it. Choose the Send operation. Connect your Google account when prompted — n8n will open a Google sign-in window; click through and allow access. Then fill in the To, Subject, and Message fields. For Message, use `{{ $json.content[0].text }}` — this is how you grab Claude's reply text from the previous step's output.

n8n · Gmail node — Send operation
1 Add the email-sending node
2 Choose what Gmail should do
S SendR ReplyGM Get ManyD Delete
3 Map the email fields
{{ $('Webhook').item.json.body.customer_email }}To
Thank you for your order 🎉Subject
{{ $json.content[0].text }}Message
Send as plain text (simpler for first run)
6

Test end-to-end and then activate

Click Listen for test event on the Webhook node, then send a sample POST request to your test URL — you can use a free tool like Hoppscotch (hoppscotch.io) or just configure your shop's webhook settings and place a real test order. Watch each node light up green as data flows through. When the Gmail node succeeds and you see the email land in your inbox, click the Inactive toggle in the top-right corner to switch the whole workflow Active. From now on it runs automatically on every real order.

n8n · Workflow toolbar
1 Start listening for your test order data
Listen for test event
2 What a successful run looks like
Workflow executionSuccess
Webhook✓ Order data received
HTTP Request✓ Claude email drafted
Gmail✓ Email sent to customer
3 Go live — toggle the workflow on
Inactive → Active

What you get

You end up with a live n8n workflow that catches every new order, sends the product name and context to Claude Fable 5.1, and fires a personalised thank-you email to the customer — no manual writing required. Claude's new 75%-cheaper cache pricing keeps the cost well under a cent per email for typical order volumes. Rough effort: ~1.5–2 hours; free n8n Cloud tier + Anthropic free-trial credits cover testing. Ongoing cost is roughly $0.001–$0.005 per email at Fable 5.1 pricing..

Sources