Before you start
- An Instagram Business or Creator account. Meta's messaging API does not work with personal accounts.
- Claude Code with Node 18 or newer. (Codex and Cursor work identically; the Claude app uses a connector URL instead.)
- A link to send: a PDF, a webinar page, a discount code page.
Step by step
- 1
Install Scorper in Claude Code
Claude Code chat, or a terminalnpx scorper@latest init
Sign in with the 6-digit code emailed to you. New accounts pick a plan and get 7 days free, card needed to start.
- 2
Connect Instagram
connect my instagramApprove in the browser. Make sure the browser is logged into the right Instagram first.
- 3
Grant the messaging permission (once)
Terminalscorper connect --dm
Instagram needs one extra approval for DMs. This opens it. You do this once per account.
- 4
Arm a post
add a DM automation to my next post, keyword GUIDE, send my webinar link https://yourbrand.com/webinarClaude replies⏺ Armed. The moment your next post goes live, commenters who say GUIDE get the link. Early comments are caught too.
Prefer a specific post? “add it to my latest post” or paste the post link.
- 5
Post, or let the next post trigger it
post the video on my desktop called launch.mp4 to instagram, caption: comment GUIDE and I'll send you the free guideClaude reads the post back, you confirm, it goes live, and the automation starts watching comments.
- 6
Manage it from the chat
list my DM automationspause the GUIDE onedelete itThe dashboard's Auto-DM page shows the same list.
Variations that work
| You want | Say |
|---|---|
| Post and arm in one go | "post this and DM my PDF to everyone who comments GUIDE" |
| A button before the link | "two-step: send a button first, then the link when they tap" |
| A different keyword per post | "keyword LINK on this one" |
| Catch people who already commented | Arm it on an existing post; early comments are caught |
| Run it from a cron job | Use Claude Code's claude -p with the same prompt |
Troubleshooting
| Symptom | Fix |
|---|---|
| "Instagram needs an extra permission" | Run scorper connect --dm and approve. |
| DMs aren't arriving | Confirm the account is Business or Creator, then say "reconnect my instagram" and re-run scorper connect --dm. |
| Claude doesn't know the automation tools | Run scorper doctor and start a fresh Claude Code session. |
Meta lets a professional account privately reply to someone who has just commented on its post. That is what this uses. It never messages people who did not interact.
Frequently asked questions
- Can I arm an automation on a post I published from the dashboard or the Instagram app?
- Yes. Say "add a DM automation to my latest post" or name the post. The automation attaches to the post regardless of how it was published.
- What happens if two people comment the keyword at once?
- Each commenter gets their own DM. The automation watches comments through Meta's webhooks and replies to each one.
- Can I change the message later?
- Delete the automation and arm a new one with the new text, or edit it on the dashboard's Auto-DM page. Both views show the same rules.
- Does the keyword have to be an exact match?
- Pick a distinctive word (GUIDE, PDF, LINK). Casual variations in casing are fine; a common word like "yes" will trigger on people who did not mean to ask.
- Does this work from Codex, Cursor or the Claude app?
- Yes. The same prompts work in Codex and Cursor after the one-line install, and in the Claude app through the connector URL.
Arm your next post in one sentence
npx scorper@latest initStart free for 7 days 7 days free on every plan. The AI-agent connection is on Max ($25/month) and Studio.