Back to all tutorials
MasterAI

Let Claude run your Instagram DMs: a 24/7 lead machine that never sleeps

13 June 2026·4 min·MasterAI, Claude, Instagram, Meta API, MCP, Automation
Let Claude run your Instagram DMs: a 24/7 lead machine that never sleeps

Picture every lead that slides into your DMs at 2am, on a Sunday, while you're in a meeting — answered. In seconds. In your voice. Not "seen and forgotten," not "I'll get to it tomorrow." Answered, qualified, and warmed up by the time you wake up.

That's not a someday promise. It's a Meta app, a webhook, and Claude. I wired the three together and turned my Instagram inbox into a machine. Here's how to build yours.

What Claude does in your DMs

  • Replies in seconds — 24/7. 3am, holidays, mid-flight. Your inbox is never "away."
  • Handles the whole conversation. Greets, asks the right qualifying questions, handles objections, and points the lead to your offer — in your tone, with your words.
  • Turns every comment into a lead. Someone comments your keyword, Meta's API fires an instant DM with your link. Comment → DM → conversation, automatically.
  • Follows up so nobody goes cold. The leads you used to lose in the scroll get a nudge at exactly the right time.
  • Never forgets, never has a bad day. A setter calls in sick. Claude doesn't.

How it works

Claude is the brain; Meta's official API is the hands — no sketchy third-party hacks. The loop is dead simple:

  1. A webhook catches the comment or message the instant it lands.
  2. Your server hands it to Claude with the full conversation as context, and Claude writes the reply.
  3. The answer goes back out through the Meta Graph API — DM sent, lead handled.

Official integration, your tokens, your data. Nothing leaves your server except the message your lead was waiting for.

How to set it up

The comment-to-DM half is a tiny webhook handler:

@app.post("/webhook/meta")
async def on_event(payload: dict):
    for c in extract_comments(payload):
        if "GUIDE" in c.text.upper():
            send_private_reply(c.comment_id, dm_template)   # Meta Graph API

Then:

  1. Create a Meta app with an Instagram Business account and add the Instagram product.
  2. Subscribe the webhook to comments + messages and verify it.
  3. Get a long-lived token via Instagram Business Login.
  4. Submit App Review for instagram_business_manage_messages — that's what lets the replies reach real followers, not just your test accounts.
  5. For the conversational side, wrap the Graph API in an MCP server and add it as a custom connector in Claude.ai — now you can clear your whole inbox just by talking to Claude.

Your unfair advantage

You've been replying to every lead manually, like it's 2018. That ends now. Build the connector once and it's yours forever — your tokens, your conversation logic, your leads in your own database, and not a single dollar going to a monthly "DM setter" that rents you back your own audience.

While your competitors sleep, your inbox is closing. That's the whole game.

Built with AI — the newsletter

Hands-on AI tutorials and the tools I actually use — straight to your inbox. Free, no hype.

Powered by Substack. Unsubscribe anytime.

Back to all tutorials