n8n Instagram MCP · n8n AI Agent
n8n's AI Agent.Your InstagramDM campaigns.
Add an MCP Client tool to n8n's AI Agent node, set the endpoint to https://app.dmpop.com/mcp and use your DMpop API key as a Bearer token. The agent can then create, pause and report on Instagram comment-to-DM campaigns. It can't DM anyone itself.
Updated
// MCP Client Tool, connected to the AI Agent's Tool inputEndpoint: https://app.dmpop.com/mcpServer Transport: HTTP StreamableAuthentication: Bearer Auth Credential: Bearer Auth Bearer Token: dmp_your_key_hereTools to Include: Selected list_instagram_accounts list_campaigns create_campaignn8n MCP Client setup for Instagram
Six fields.Then ask it.
Field names below are from n8n's MCP Client Tool node, checked in November 2026. You need to be an owner or admin in your DMpop workspace to make a key.
- Make a DMpop API key. In DMpop, go to Settings → API keys and MCP and create a key named “n8n”. It's shown once, so copy it then. Keys start with
dmp_. - Add an AI Agent node with a Chat Model sub-node. Any model n8n supports will do.
- Add an MCP Client Tool to the agent's Tool input. Set Endpoint to
https://app.dmpop.com/mcpand Server Transport to HTTP Streamable. - Authentication: Bearer Auth. Create a credential and paste the key into Bearer Token. Just the key: n8n adds “Bearer” for you.
- Tools to Include: Selected, and tick only what this workflow needs. The list loads from DMpop once the credential works, which is also your connection test.
- Try it in the chat. Ask “List my Instagram accounts”. If it names your account, you're connected.
Which n8n auth option works with DMpop
n8n's MCP Client Tool offers five options. DMpop accepts an API key in the standard Authorization: Bearer header, or an OAuth access token in the same header.
| n8n option | With DMpop |
|---|---|
| Bearer Auth | Works. Paste only the key (dmp_...). n8n adds the Bearer part itself. |
| Header Auth | Works. Name Authorization, value Bearer dmp_.... Same result as Bearer Auth. |
| Multiple Headers Auth | Works if one of the headers is that same Authorization header. DMpop ignores the rest. |
| MCP OAuth2 | DMpop's server supports OAuth sign-in (that's how ChatGPT and Claude connect), but we haven't tested n8n's OAuth2 credential with it. Use an API key. |
| None | Fails with a 401. Every request needs a key or a token. |
Older versions of the node show a single SSE Endpoint field. DMpop's server speaks Streamable HTTP, not the old SSE transport, so update n8n if that's what you see.
n8n AI agent vs HTTP Request node
Agent orplain request?
Both create the same DMpop campaign. Pick the agent when the input is messy; pick the HTTP Request node when it isn't.
| HTTP Request node | AI Agent + MCP Client | |
|---|---|---|
| Input | Clean fields: the keyword in its own column, a valid URL | Messy notes: "keyword GUIDE ya guide, link in bio doc" |
| Result | Same campaign every time | Usually right; check the output |
| Cost | Free beyond your n8n plan | Model tokens on every run |
| Can it ask questions? | No | Only in a chat; in a scheduled run, nobody answers |
| Where it's covered | Zapier, Make and n8n guide | This page |
If your content calendar already has a clean keyword and link column, the HTTP Request node is cheaper and never improvises. The exact node settings and JSON are in our Zapier, Make and n8n guide. The agent earns its tokens when rows are written like notes, when you want a summary in words, or when you want to manage campaigns by chatting with n8n.
n8n AI agent comment to DM: example 1
Calendar row in.Campaign out.
A new row in your reels sheet becomes a comment-to-DM campaign on your next reel. DMpop attaches it within about five minutes of the reel going live.
Google Sheets Trigger // a new row in "Reels" -> AI Agent Chat Model: any model n8n supports Tool: MCP Client (DMpop) -> Google Sheets // write the campaign ID backA reel goes out today. Row from my content calendar:Title: {{ $json.title }}Keyword: {{ $json.keyword }}Link: {{ $json.link }}Notes: {{ $json.notes }}Create a DMpop campaign on my next reel for it.DM: one short, friendly line, then the link.Button label: "Get it". No follow gate.Public reply: "Sent! Check your DMs".If the keyword or the link is missing, create nothing.Reply with only the campaign ID, or "MISSING: <what>".Say everything in the prompt
DMpop's tools tell the assistant to ask about the follow gate and a public reply before creating a campaign. In a scheduled run nobody is there to answer, so put both choices in the prompt, as above. Otherwise the agent may stop and ask a question into the void.
Time it to the reel
A next-reel campaign attaches to the first reel published after it was created. Two next-reel campaigns made before the same reel both attach to that reel. So run this on the day, before that reel only, or have the agent use list_recent_posts and a post ID once the reel is up.
Check the output
Set the prompt source to Define below so the {{ }} parts fill in from the row. Ask for a plain ID back, then write it to the sheet. A row that comes back as MISSING is one you fix by hand.
n8n AI agent weekly Instagram report
Mondays, 9 am.Numbers in Slack.
A Schedule Trigger runs the agent once a week. It reads list_campaigns and posts a short summary to Slack or Telegram.
Schedule Trigger // Mondays, 9:00 -> AI Agent Tool: MCP Client (DMpop), list_campaigns only -> Slack // or Telegram: post the agent's textYou write a weekly Instagram DM report for a creator.Call list_campaigns once. Use only numbers it returns.Stats are lifetime totals, not this week's. Say so.Under 120 words. Plain text, no tables.Top 3 campaigns by DMs sent, with click rate.Flag any active campaign with failed > 0.Never call a tool that changes anything.list_campaigns returns every campaign with DMs sent, skipped and failed, clicks and click rate. These are lifetime totals. For a true “this week” number, store last week's figures (a Google Sheet works) and give both to the agent.
Tick only list_campaigns and get_campaign in this workflow's MCP Client. Then the report can't change anything, whatever the model decides.
Clicks count each person once per campaign. Skipped DMs have reasons in DMpop's DM log, such as “Already replied” when another campaign got that comment first. The not-sending checklist explains each one.
n8n AI agent guardrails
Give it less.Sleep better.
An agent does what the model decides. These settings limit what it can decide.
- Use Tools to Include. A reporting workflow needs read tools only. An unattended workflow should never get
delete_campaign; use All Except to drop it. - Deleting breaks sent links. When a campaign is deleted, the links in DMs it already sent stop working. Pausing (
update_campaignwithactive: false) keeps them working. DMpop's tool description already tells the model to suggest pausing and to confirm first. - Add a human where it matters. n8n's human review for tool calls pauses the workflow until someone approves in Slack, Telegram or n8n's chat. It applies to the tools you connect behind it, so a second MCP Client with only the write tools is the natural split. We haven't tested this with the MCP Client node, so try it before relying on it.
- One key per workflow. You can have up to 10 active keys. Name them, and revoke one in Settings → API keys and MCP without breaking the others.
- Mind the limits. Each key gets 60 requests a minute. The agent's Max Iterations (10 by default) caps runaway loops. Plan limits, like 5 live campaigns on Free, come back as a tool error the agent can report.
- Keep the follow gate optional. If the agent adds one, keep it rare and make what you send available elsewhere too. Meta's spam policy mentions follow-gating; see what Instagram's rules say.
Troubleshooting n8n and DMpop
Not connecting?Check these.
401 “Sign in to connect, or send an API key”
The header didn't contain one clean key. The usual cause is typing “Bearer dmp_...” into a Bearer Auth credential, which sends “Bearer Bearer dmp_...”. Paste the key alone.
401 “This API key is invalid or has been revoked”
The key was revoked or mistyped. Make a new one; the old one can't be shown again.
The tool list won't load
Check that Server Transport is HTTP Streamable and the endpoint ends in /mcp, with no trailing /sse.
429 “Rate limit reached”
More than 60 requests in a minute on one key. Wait a minute, or lower the agent's Max Iterations.
“No Instagram account is connected”
Connect Instagram in the DMpop dashboard first. The key belongs to a workspace; make sure it's the one with your account.
Other ways to connect
Not on n8n?Same server.
ChatGPT and Claude connect to the same server with a sign-in and no key: see ChatGPT and Claude, Claude Code, Codex and Cursor. The full tool list is on the Instagram MCP page. Building your own agent in code? What an AI agent can do with Instagram DMs has a TypeScript example. Every field is in the developer docs.
Questions
n8n and Instagram,answered.
Does n8n have an Instagram MCP node?
n8n has an MCP Client Tool node that connects its AI Agent to any MCP server over HTTP. It has no Instagram comment-to-DM node of its own. Point the MCP Client at DMpop's server (https://app.dmpop.com/mcp) and the agent gets seven tools for Instagram comment-to-DM campaigns.
Which authentication should I pick in n8n's MCP Client?
Bearer Auth, with your DMpop API key as the Bearer Token. Header Auth with Authorization: Bearer dmp_... also works. DMpop only reads the Authorization header, so a key in any other header is ignored.
Can the n8n agent send Instagram DMs itself?
No. DMpop's tools only list your accounts, posts and campaigns, and create, change or delete campaigns. DMpop sends a DM only when someone comments your keyword, DMs it to you or replies to your Story with it.
Do I need my own Meta developer app or App Review?
No. You connect Instagram to DMpop through Meta's own login, and DMpop handles the Meta side. n8n only talks to DMpop, with a DMpop API key.
Can an n8n AI agent reply to Instagram DMs with AI-written messages?
Not through DMpop. DMpop sends the exact message saved in the campaign, and AI-written replies inside DM conversations aren't a DMpop feature. Building that yourself needs your own Meta app with messaging permissions and App Review.
Is this on DMpop's Free plan?
Yes. The API and MCP server are on every plan. The Free plan sends 1,000 DMs a month and allows 5 live campaigns. Each API key can make 60 requests a minute.
Does it work on n8n Cloud and self-hosted n8n?
Both, as long as your n8n has the MCP Client Tool with an Endpoint field and HTTP Streamable transport. DMpop's server is a public HTTPS URL, so nothing needs to reach your n8n.
MCP on every plan
Wire it once.Let the DM pop.
Make an API key on any plan, Free included. The Free plan sends 1,000 DMs a month, and paid plans start at ₹99, GST included.