Turn “send me the link” comments into private messages
Create one automation and FoPost watches comments on your Instagram and Facebook accounts. When a comment matches, the commenter gets a private reply in their DMs, held for your approval first unless you say otherwise.
curl -X POST https://api.fopost.com/v1/automations \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workspaceId": "9b2f6c1e-...",
"name": "Price comments to DM",
"triggerType": "inbox_message",
"triggerConfig": { "keywords": ["price", "link"], "types": ["comment"], "maxRunsPerDay": 20 },
"graph": {
"nodes": [
{ "id": "t1", "kind": "trigger" },
{ "id": "m1", "kind": "send_message", "config": {
"channel": "private",
"text": "Hi {{contact.name}}, here is the link you asked for.",
"buttons": [{ "title": "Shop now", "url": "https://yourbrand.com/shop" }]
} }
],
"edges": [{ "id": "e1", "source": "t1", "target": "m1" }]
}
}'Keyword match
Any or all of up to 20 keywords, on comments only or every message type.
Approval first
New automations hold each reply for a person to approve before it sends.
Once per comment
A comment is claimed before the DM goes out, so it is never answered twice.
Decide which comments get a message
The inbox_message trigger fires on new comments, mentions, replies, DMs, story replies, and reviews. Narrow it with keywords, message types, specific accounts, or specific posts, and choose to answer only followers or only a person’s first message. Each automation runs at most 3 times a day by default; raise maxRunsPerDay up to 20.
Read the trigger reference
Per post
postIds limits the automation to comments under the posts you name.
Followers only
followersOnly skips commenters who do not follow the account.
Daily cap
maxRunsPerDay keeps a viral post from sending hundreds of messages.
A private reply, written your way
The send_message step with channel set to private sends the commenter a DM through Meta’s private reply. Use {{contact.name}} and {{message.text}} in the text, add up to 3 link buttons or 13 quick replies, and attach a link that gets UTM tags and a counted redirect. Meta accepts a private reply only within 7 days of the comment, so older comments fail with that reason.
See the send_message stepcurl -X POST https://api.fopost.com/v1/automations/f2b7d9a4-.../dry-run \
-H "X-API-Key: $API_KEY"
{
"would_defer": false,
"approval_mode": false,
"steps": [
{ "node_id": "t1", "action_type": "trigger", "status": "completed", ... },
{ "position": 1, "node_id": "m1", "action_type": "send_message", "status": "completed",
"handle": "out", "error_message": null,
"output": { "messagePreview": "Hi Jordan, here is the link you asked for.", "channel": "private" } }
],
"drafts": [],
"total_delay_ms": 0,
"credits_charged": 0
}Dry run
Preview the message against a recent comment. Nothing is sent or created.
Tracked links
Clicks are counted and the URL carries utm_medium=dm.
7-day window
Meta’s limit on private replies, checked before any send.
Approve, pause, and audit every run
Unless a step sets requireApproval to false, each reply waits in GET /v1/inbox/approvals until someone approves or rejects it. Toggle the automation on and off with one call, and read its run history to see what fired, what is waiting, and what failed.
Start buildingcurl "https://api.fopost.com/v1/inbox/approvals?workspace_id=9b2f6c1e-..." \
-H "X-API-Key: $API_KEY"
curl -X POST https://api.fopost.com/v1/inbox/approvals/:id/approve -H "X-API-Key: $API_KEY"
curl -X POST https://api.fopost.com/v1/automations/f2b7d9a4-.../toggle -H "X-API-Key: $API_KEY"
{ "id": "f2b7d9a4-...", "active": false }Run history
GET /v1/automations/:id/runs with status, start time, and any error.
Replay
Rerun a past run after fixing the message or the trigger.
Versions
Every saved change is a version you can view or restore.
Comments to DM questions, answered
Which networks support comment to DM?
Can the same person get the message twice?
Does it send without anyone checking?
What happens to comments older than 7 days?
Which API key scopes do I need?
Can I start an automation from my own system?
Build on the Comments to DM today
Starting is free and the full API is included. Create a key and make your first call in minutes.
Get your API key