DMParrot_
← Blog

How to set up Instagram comment-to-DM automation with Claude

The comment-to-DM funnel is the most reliable growth loop on Instagram. You post something useful, you ask people to comment a keyword, and everyone who comments gets a DM with the thing you promised.

Building one has always meant opening a flow builder and wiring boxes together. It does not have to. This guide sets one up by describing it to Claude.

What you are building

The loop has four parts:

  1. A trigger — someone comments a keyword on your post.
  2. A private reply — Instagram lets you DM a commenter once, in response to their comment.
  3. A tag — you label that person so you can message them again later.
  4. Optionally, a follow-up — a second message, a link, or a hand-off to a human.

Everything else is refinement.

What you need first

An Instagram professional account. Creator or Business. Personal accounts cannot use the messaging API at all. Switching is free and takes a minute in Instagram settings.

A Facebook Page linked to it. Meta’s API routes Instagram messaging through the Page. If your account is not linked, connection will fail with an unhelpful error.

An MCP client. Claude Desktop, Claude Code, ChatGPT with connectors, Cursor — anything that can connect to a remote MCP server.

A DMParrot account. Start a trial, then connect Instagram from the dashboard through Meta OAuth.

Step 1: Connect the MCP server

Add https://dmparrot.com/mcp as a remote MCP server in your client. It uses streamable HTTP with OAuth 2.1, so you sign in once in a browser window and your agent is authorised from then on. There is no API key to paste or rotate.

Once connected, Claude can see about thirty tools — the full list is here. You do not need to learn them. That is the point.

Step 2: Describe the funnel

Now just say what you want:

I want anyone who comments “GUIDE” on my latest post to get a DM with the link to my free guide, and tag them as a lead.

Claude will call create_comment_to_dm_flow, which builds the whole thing in one shot: the comment_keyword trigger, the send_message node containing your DM, and the add_tag node that labels the person.

You can be more specific if you want. Targeting a single post rather than all of them, adding a delay, branching on whether someone already has a tag — all of it is available, and all of it is described in the same way. Ask for it and Claude wires the nodes.

Step 3: Simulate before you publish

This is the step people skip, and it is the one that saves you.

Simulate that flow with a comment saying “guide please”.

simulate_flow runs the flow against a fake event and reports exactly what would happen — which trigger matched, which nodes fired, what text the DM would contain. Nothing is sent. Nobody receives anything.

Check two things. Does your keyword match the way people actually type it? “guide please” should match a GUIDE keyword; if it does not, your matching is too strict. And is the DM text right — no placeholder text, no broken link?

Step 4: Publish

Publish it.

publish_flow takes the flow live. From that moment, matching comments on your Instagram account get real DMs.

One thing worth understanding about what happens next: there is no AI in the send path. Claude built the flow, but Claude does not send the messages. A deterministic rule engine does. The same comment always produces the same DM. Your automation cannot hallucinate, drift, or improvise at 3am — and it does not cost tokens per message.

That separation is deliberate. Use a language model for authoring, where judgement helps. Use plain rules for delivery, where predictability is the entire requirement.

Step 5: Check it worked

After the first real comments arrive:

Show me the delivery log.

list_delivery_log shows recent sends and their outcomes. If something did not deliver, the reason is here. get_flow_analytics gives you the counts per flow.

The rules Meta actually enforces

Automation on Instagram is allowed. Ignoring these constraints is not:

The 24-hour window. After a person messages you, you have 24 hours to reply freely. Outside that window you cannot send promotional messages. Broadcasts respect this automatically — that is why a broadcast reaches fewer people than your tag count suggests.

One private reply per comment. You get a single DM in response to a comment. Not a sequence. The follow-up has to come after they reply to you.

Consent still matters. A keyword comment is an opt-in for the thing they asked for. It is not blanket permission to market to them forever. Tag by intent, not by “has ever commented”, and your broadcasts will perform better as well as being defensible.

When this approach is wrong for you

Be honest about the trade. If you want to see the funnel laid out visually, or you are handing the tool to a team member who does not want to talk to an AI, a canvas-based builder is a better fit. ManyChat is the obvious choice.

Agent-native authoring wins when the thing you want is easy to say and tedious to draw — twelve variations of the same funnel for twelve posts, a bulk retag of an audience segment, an edit to every flow at once. Describing that takes a sentence. Clicking it takes an afternoon.

Next