Install
openclaw skills install instagram-auto-reply-commentsAutomate Instagram comment-to-DM funnels using the Upload-Post API. Auto-reply to Instagram comments with private DMs, build lead capture funnels, and set up keyword-triggered DM automation (ManyChat alternative). Send automated direct messages to commenters on Instagram Reels and posts. Features 24/7 comment monitoring, smart AI semantic filtering, and scalable Instagram DM outreach campaigns via the official Meta Private Replies API. Perfect for comment automation, auto DMs, and lead magnets.
openclaw skills install instagram-auto-reply-commentsTurn Instagram comments into conversations. This skill lets you monitor comments on a post, detect trigger keywords (semantically, not just exact match), and send personalized private DMs to each commenter automatically.
This is the same mechanism ManyChat, Inro, and every major DM automation tool uses — the official Instagram Private Replies API. Fully compliant with Meta's terms.
All requests require an API key:
Authorization: Apikey YOUR_API_KEY
Base URL: https://api.upload-post.com/api
The user parameter is the profile name (not username) from the Upload-Post dashboard.
The typical flow a creator wants:
Your job as an agent is to orchestrate this. There are two modes:
Choose based on what the user asks. If they say "set up a funnel" or "activate monitoring", use persistent. If they say "check comments" or "send DMs to whoever commented", use one-shot.
These start a background process on Upload-Post's servers that monitors comments and sends DMs automatically. No need for the agent to stay running.
curl -X POST "https://api.upload-post.com/api/uploadposts/autodms/start" \
-H "Authorization: Apikey YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"post_url": "https://www.instagram.com/p/ABC123/",
"reply_message": "Hey! Here is your guide: https://example.com/guide",
"profile_username": "PROFILE",
"monitoring_interval": 15,
"trigger_keywords": ["guide", "link"]
}'
Parameters:
post_url (required): The Instagram post URL to monitorreply_message (required): The DM message to send to matching commentersprofile_username (required): Upload-Post profile name with Instagram connectedmonitoring_interval (optional): Minutes between checks. Default: 15. Minimum: 15 (values below 15 are auto-clamped)trigger_keywords (optional but strongly recommended): Array of keywords to filter comments. Only comments containing at least one keyword receive a DM. Case-insensitive and accent-insensitive ("guía" matches "guia"). If omitted, ALL commenters receive a DM — use with caution.Returns a monitor_id you'll need for managing the monitor.
Limits:
Important: This monitor sends a fixed reply_message — it does not do semantic filtering or personalization. If trigger_keywords is set, it only replies to comments containing those words (case and accent insensitive). If omitted, it replies to ALL commenters. For smart semantic filtering, use one-shot mode instead.
⚠️ Safety: Persistent monitors run on Upload-Post's servers for up to 15 days, even after the agent session ends. Always confirm with the user before starting a monitor, and prefer setting
trigger_keywordsto avoid mass-replying to every commenter. UsePOST /autodms/stoporPOST /autodms/deleteto cancel.
curl "https://api.upload-post.com/api/uploadposts/autodms/status" \
-H "Authorization: Apikey YOUR_KEY"
Returns all active monitors with their status: running, paused, or stopped.
curl "https://api.upload-post.com/api/uploadposts/autodms/logs?monitor_id=MONITOR_ID" \
-H "Authorization: Apikey YOUR_KEY"
Returns activity logs: when the monitor started, how many DMs sent, any errors.
# Pause (keeps config, stops checking)
curl -X POST "https://api.upload-post.com/api/uploadposts/autodms/pause" \
-H "Authorization: Apikey YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"monitor_id": "MONITOR_ID"}'
# Resume a paused monitor
curl -X POST "https://api.upload-post.com/api/uploadposts/autodms/resume" \
-H "Authorization: Apikey YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"monitor_id": "MONITOR_ID"}'
# Stop (deactivates)
curl -X POST "https://api.upload-post.com/api/uploadposts/autodms/stop" \
-H "Authorization: Apikey YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"monitor_id": "MONITOR_ID"}'
# Delete (permanent)
curl -X POST "https://api.upload-post.com/api/uploadposts/autodms/delete" \
-H "Authorization: Apikey YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"monitor_id": "MONITOR_ID"}'
These are for scanning comments on-demand and sending DMs with AI-powered semantic matching and personalization.
Find the post to monitor.
curl "https://api.upload-post.com/api/uploadposts/media?platform=instagram&user=PROFILE" \
-H "Authorization: Apikey YOUR_KEY"
Returns an array of recent posts with id, caption, permalink, timestamp, and media_type. Use the id field as post_id in subsequent calls.
curl "https://api.upload-post.com/api/uploadposts/comments?platform=instagram&user=PROFILE&post_id=POST_ID" \
-H "Authorization: Apikey YOUR_KEY"
You can also use post_url instead of post_id:
curl "https://api.upload-post.com/api/uploadposts/comments?platform=instagram&user=PROFILE&post_url=https://www.instagram.com/p/ABC123/" \
-H "Authorization: Apikey YOUR_KEY"
Rate limit: Once per 10 minutes per post. Plan your polling accordingly — don't call this in a tight loop.
Each comment includes id, text, username, and timestamp.
This is the core action. It sends a DM to the person who wrote the comment, using Meta's official Private Replies API.
curl -X POST "https://api.upload-post.com/api/uploadposts/comments/reply" \
-H "Authorization: Apikey YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"platform": "instagram",
"user": "PROFILE",
"comment_id": "COMMENT_ID",
"message": "Hey! Here is your guide: https://example.com/guide"
}'
Constraints you must respect:
Check for replies to your DMs.
curl "https://api.upload-post.com/api/uploadposts/dms/conversations?platform=instagram&user=PROFILE" \
-H "Authorization: Apikey YOUR_KEY"
Returns conversation threads with participant_id, messages, and metadata.
Continue a conversation with someone who replied.
curl -X POST "https://api.upload-post.com/api/uploadposts/dms/send" \
-H "Authorization: Apikey YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"platform": "instagram",
"user": "PROFILE",
"recipient_id": "USER_ID",
"message": "Glad you liked it! Let me know if you have questions."
}'
24-hour window: You can only send follow-up DMs within 24 hours of the user's last reply. After that, the window closes and you cannot message them until they message you again.
When the user asks you to set up a comment funnel, follow these steps:
Ask the user (if not already provided):
user parameter — this is the Upload-Post profile name, not their Instagram username. If they don't know it, call GET /uploadposts/me to validate the key. If they have no profiles or no Instagram connected, direct them to https://app.upload-post.com/manage-users to create a profile and connect their Instagram Business account first)Call GET /uploadposts/media to list recent posts. Match by URL, caption content, or just pick the latest. Confirm with the user which post to monitor.
Use this when the user wants continuous monitoring ("set up a funnel", "activate it", "keep it running").
POST /uploadposts/autodms/start with the post URL, reply message, profile, and intervalmonitor_id and tell the userGET /uploadposts/autodms/statusThe backend handles everything from here — checking comments, sending DMs, avoiding duplicates, respecting rate limits. The agent doesn't need to stay running.
To check on it later:
GET /uploadposts/autodms/status → is it running?GET /uploadposts/autodms/logs?monitor_id=X → how many DMs sent?To manage it:
POST /uploadposts/autodms/pause → pause without losing configPOST /uploadposts/autodms/resume → resume after pausePOST /uploadposts/autodms/stop → deactivatePOST /uploadposts/autodms/delete → remove permanentlyTrade-off: The persistent monitor sends the same fixed message — no personalization per commenter. Use trigger_keywords to filter so only relevant comments get a DM. Without keywords, it replies to every new comment.
Use this when the user wants intelligent processing ("check my comments", "DM the ones who asked for the guide", or when the post gets mixed comments — some requesting, some just engaging).
Call GET /uploadposts/comments with the post ID.
For each comment, decide if it matches the trigger. Use semantic matching, not just exact string comparison:
| Comment | Trigger: "GUIDE" | Match? |
|---|---|---|
| "GUIDE" | Exact match | Yes |
| "guide please" | Contains keyword | Yes |
| "I want the guide!" | Semantic intent | Yes |
| "can you send me the guide?" | Semantic intent | Yes |
| "guía" | Translation | Yes |
| "great post!" | No intent | No |
| "nice guide on the topic" | Ambiguous — talking about the content, not requesting | No |
The key question: is this person requesting the thing the creator offered? Use judgment, not regex.
For each matching comment that hasn't been replied to yet:
Personalize the message. Don't send identical copy-paste to everyone. Use their name or reference their comment:
Call POST /uploadposts/comments/reply with the personalized message.
Track which comment IDs you've already replied to (keep a list in your working memory) to avoid duplicate attempts.
After processing, tell the user:
If the user wants follow-up handling:
GET /uploadposts/dms/conversations to check for new repliesPOST /uploadposts/dms/send to respondA smart approach: start a persistent monitor for the baseline (everyone gets the DM), then periodically run one-shot scans to check DM conversations and do personalized follow-ups. Tell the user this option if it fits their use case.
These are Meta's rules. Breaking them gets the account restricted, not just rate-limited.
What's allowed (you're doing this):
Hard limits:
What would get the account banned (never do this):
| Code | Meaning | What to Do |
|---|---|---|
| 200 | DM sent | Track as success |
| 400 | Bad request | Check parameters — likely missing comment_id or message |
| 401 | Invalid API key | Ask user to check their key |
| 404 | Comment not found | Comment may have been deleted |
| 429 | Rate limit / DM limit reached | Stop sending. Tell the user how many were sent and that the limit was hit |
| 500 | Server error | Retry once, then report to user |
When you hit a 429, stop the entire batch. Don't keep trying. Report to the user: "Sent X DMs successfully. Hit the rate limit — the remaining Y commenters will need to be processed later."
User: "In my latest Reel I told people to comment CURSO to get info about my course. Set up the funnel to DM them the enrollment link https://mycourse.com/enroll"
Agent workflow:
GET /uploadposts/media?platform=instagram&user=profilename → find latest ReelGET /uploadposts/comments?platform=instagram&user=profilename&post_id=12345POST /uploadposts/comments/reply with personalized DMThis skill works on Instagram only. The comments and DM endpoints in the Upload-Post API currently support Instagram exclusively. This is because Meta's Private Replies API is Instagram-specific, and other platforms (TikTok, LinkedIn, X, etc.) don't offer equivalent APIs for comment-to-DM automation.
This is not a limitation of Upload-Post — it's how the social platform APIs work. Instagram is where 90%+ of comment-to-DM funnels run commercially (ManyChat, Inro, etc. are all Instagram-first for this reason).