Manage Instagram DM automation from Codex
After a few months you have rules on old reels, keywords nobody uses and comments that slipped through. Ask Codex what is running, switch rules off and on, and send the DMs that were missed, without opening a dashboard.
For Instagram professional accounts · Updated October 2026
One-time setup in Codex
Read https://www.cueedit.io/agent.md and set up CueEditio for me. Use my email: you@example.comcodex mcp add cueedit --url https://www.cueedit.io/api/mcp/mcp
codex mcp login cueedit- 1.Paste the line above into Codex. It signs up with an email code and gives you one link.
- 2.Open the link, check the email shown, and approve Instagram.
- 3.Ask Codex to list your Instagram accounts.
Ask Codex
You
List my Auto DM rules as a table: keyword, post, status, message preview.
Codex
| Keyword | Post | Status | Message | | LINK | all posts | active | "Here’s the link…" | | PDF | reel 1791… | paused | "Your PDF…" | | SETUP | reel 1802… | active | "Setup guide…" |
Example conversation. Post names and counts will be your own.
The CueEditio tools that run
list_autodm_rulesEvery rule with its keywords, message, posts and active or paused status.set_autodm_rule_statusPauses or resumes a rule.list_commentsShows comments with dm_sent and dm_eligible, so Codex can see who was missed.send_dmDMs a commenter directly, one per comment.
How it works
1.Ask what is running
"List my Auto DM rules and which posts they cover."
2.Clean up
Pause rules for old offers, resume the ones you need. Codex confirms each change.
3.Find the gaps
Codex checks recent posts for comments with no DM and a still-open 7-day window.
4.Send the missed DMs
After your yes, it DMs them, about 6 seconds apart, and stops on the first error.
Codex works well for repeatable jobs: keep the instructions in a file, run them with codex exec, and read the tally it prints at the end.
Limits to know
- Instagram only lets a business DM someone who commented, as a private reply to that comment. The agent cannot cold-DM people who never commented.
- One DM per comment. A second send to the same comment returns already_dmed unless you tell the agent to force it.
- The comment must be 7 days old or newer. Older comments come back with dm_eligible false.
- At most 600 DMs and 600 public replies per hour per account, below Meta’s ceiling of 750.
- Reading posts, comments and rules works on the free plan. Sending replies, DMs and creating rules needs CueEditio Pro ($6 or ₹459 a month).
Questions
No. Instagram only allows a business to message people who commented on its posts (a private reply) or who messaged it first. CueEditio sends private replies to commenters only.
It can pause and resume rules and create new ones. To change a rule’s text, create a new rule and pause the old one, or edit it in the CueEditio dashboard.
Every DM and reply, whether from a rule or from Codex, shows up in CueEditio under Auto DM → Activity.
Yes. Every agent connection is listed in CueEditio Settings. Remove it and access stops at once.
codex mcp add writes the server to ~/.codex/config.toml under [mcp_servers.cueedit]. Codex stores the sign-in itself.
Connect CueEditio to Codex
Create an account, connect your Instagram professional account, then add the MCP server above. Reading comments is free; sending replies and DMs needs Pro.
Instagram DM automation with other agents
More with Codex
Comparing tools? CueEditio vs ManyChat, CueEditio vs Postiz, CueEditio vs Blotato.