Support · n8n

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.

difficulty Advancedsetup 75 minresult Instant, on-brand answers to routine Instagram DMs, with tricky ones handed to your team
  1. 1

    Expose a webhook for Instagram

    Add a Webhook node (POST). In your Meta app, subscribe the Instagram account to the messages field and point the callback URL at this webhook. Meta first sends a verification challenge — handle it by echoing the hub.challenge value, which the workflow notes show how to do.

  2. 2

    Extract the message

    A Code node reads the webhook payload and pulls the sender ID and message text from entry[0].messaging[0]. It ignores echoes of your own outgoing messages so the bot never replies to itself.

  3. 3

    Draft a reply with Claude

    An HTTP Request to Claude sends the customer's message plus your FAQ and voice guide in the system prompt. Ask for strict JSON: a reply string and a boolean needs_human. Instruct Claude to set needs_human true for refunds, complaints or anything outside the FAQ.

  4. 4

    Branch on confidence

    An IF node checks needs_human. If false, continue to auto-send. If true, route to a Slack node that posts the DM and the customer ID to your support channel so a teammate can jump in within the messaging window.

  5. 5

    Send the reply

    An HTTP Request POSTs to https://graph.facebook.com/v19.0/me/messages with 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.

About this recipe. Recipes on FlowRecipesHub are written for business owners, not developers, and are tested before publishing — how recipes get made. Some ingredient links are affiliate links that cost you nothing — full disclosure.