AI Auto-Responder for Instagram DMs with Claude
An n8n workflow that receives Instagram Direct Messages via a Meta webhook, drafts a helpful, on-brand reply with Claude using your FAQ as context, and sends it back automatically — so common questions get instant answers while genuine edge cases are flagged for a human.
- 1
Expose a webhook for Instagram
Add a
Webhooknode (POST). In your Meta app, subscribe the Instagram account to themessagesfield and point the callback URL at this webhook. Meta first sends a verification challenge — handle it by echoing thehub.challengevalue, which the workflow notes show how to do. - 2
Extract the message
A
Codenode reads the webhook payload and pulls the sender ID and message text fromentry[0].messaging[0]. It ignores echoes of your own outgoing messages so the bot never replies to itself. - 3
Draft a reply with Claude
An
HTTP Requestto Claude sends the customer's message plus your FAQ and voice guide in the system prompt. Ask for strict JSON: areplystring and a booleanneeds_human. Instruct Claude to setneeds_humantrue for refunds, complaints or anything outside the FAQ. - 4
Branch on confidence
An
IFnode checksneeds_human. If false, continue to auto-send. If true, route to aSlacknode that posts the DM and the customer ID to your support channel so a teammate can jump in within the messaging window. - 5
Send the reply
An
HTTP RequestPOSTs tohttps://graph.facebook.com/v19.0/me/messageswith the recipient ID and the reply text, using your page access token. The customer gets an instant, on-brand answer; you get your evenings back.
Frequently asked questions
Is auto-replying to DMs allowed by Instagram?
Yes, through the official Messenger Platform for Instagram. You register a Meta app, subscribe to the messaging webhook, and reply within the platform's standard messaging window (24 hours for most message types). This is the same infrastructure customer-service tools use — you're just running it yourself.
How do I stop it from answering things it shouldn't?
The prompt includes your FAQ and an explicit instruction: if the question isn't covered or involves refunds, complaints or anything sensitive, reply with a short holding message and set a `needs_human` flag. The workflow then routes those DMs to Slack instead of auto-sending, so a person takes over.
Can it keep the brand voice consistent?
That's the point of using Claude with a system prompt. You paste a short voice guide — tone, greeting style, sign-off, emoji policy — and every reply follows it. Because you review the flagged edge cases, the auto-answers stay on-brand while your team handles the judgment calls.