Manage Instagram DM automation from Gemini CLI
After a few months you have rules on old reels, keywords nobody uses and comments that slipped through. Ask Gemini CLI 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 Gemini CLI
Read https://www.cueedit.io/agent.md and set up CueEditio for me. Use my email: you@example.comgemini mcp add --transport http --scope user cueedit https://www.cueedit.io/api/mcp/mcp
# then in Gemini CLI: /mcp auth cueedit- 1.Paste the line above into Gemini CLI. 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 Gemini to list your Instagram accounts.
Ask Gemini CLI
You
Audit my Auto DM rules. Anything targeting posts that no longer exist?
Gemini CLI
4 rules. All target posts that are still in your recent posts list. 1 rule (PDF) is paused. Want me to resume it or leave it?
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 Gemini CLI 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. Gemini CLI confirms each change.
3.Find the gaps
Gemini CLI 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.
Gemini CLI asks before each tool call unless you trust the server. Leave confirmations on for replies and DMs.
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 Gemini CLI, shows up in CueEditio under Auto DM → Activity.
Yes. Every agent connection is listed in CueEditio Settings. Remove it and access stops at once.
This page covers Gemini CLI. Custom MCP apps in the consumer Gemini app are limited by region and plan, so use Gemini CLI if you do not see them.
Connect CueEditio to Gemini CLI
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 Gemini CLI
Comparing tools? CueEditio vs ManyChat, CueEditio vs Postiz, CueEditio vs Blotato.