Comment to DM Automation
API for Developers
Keyword auto-replies that turn Instagram and Facebook comments into DM conversations.
import { Configuration, AutomationsApi } from "@onepostly/sdk";
const automationsApi = new AutomationsApi(
new Configuration({ accessToken: process.env.ONEPOSTLY_API_KEY }),
);
const automation = await automationsApi.createAutomation({
createAutomationBody: {
accountId,
kind: "comment_to_dm",
name: "Guide request",
keywords: ["guide"],
message: "Just sent the guide to your DMs.",
},
});import os
from onepostly import ApiClient, Configuration
from onepostly.api.automations_api import AutomationsApi
automations_api = AutomationsApi(ApiClient(
Configuration(access_token=os.environ["ONEPOSTLY_API_KEY"])))
automation = await automations_api.create_automation(
create_automation_body={
"accountId": account_id,
"kind": "comment_to_dm",
"name": "Guide request",
"keywords": ["guide"],
"message": "Just sent the guide to your DMs.",
},
)curl -X POST https://api.onepostly.com/v1/automations \
-H "Authorization: Bearer op_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"accountId": "acc_ACCOUNT_ID",
"kind": "comment_to_dm",
"name": "Guide request",
"keywords": ["guide"],
"message": "Just sent the guide to your DMs."
}'
# { "id": "aut_…", "kind": "comment_to_dm", "enabled": true, … }Turn Comments Into Conversations
Matching comments on Instagram and Facebook get a DM.
Keyword Match
Any comment containing the keyword triggers the reply.
Exclude Words
Disqualify words like priceless so they never match price.
Story Replies and First DMs
Auto-reply to story replies and first-time messages too.
Clear Limits
Up to 20 rules per account and 1000 characters per message.
Reach every network from a single API.
Create a key, connect your accounts, publish everywhere with one request, and see how every post performs.
Create a key with the permissions and profile access you need, then connect the accounts it publishes to.
API Keys (8)
All set, your post to X, LinkedIn, and Instagram is scheduled for 9 AM tomorrow.
Connected Onepostly MCPBuilt for Your Agent
Onepostly ships as an MCP server. Your agent publishes to every platform.
Unified Analytics
One request pulls engagement data from every network your accounts publish to.
Webhooks & Events
Publish, fail, comment, or DM. Every event hits your endpoint the moment it happens.
Your account list grows.
Your integration doesn't.
Run 2,000+ connected accounts across your workspaces without losing track of who did what.
Frequently Asked Questions
Keywords, platforms, and limits for comment-to-DM rules.
Have more questions? Reach out to us
You pick a keyword, and whenever someone comments it on your post, they automatically get a DM from you. Set it up once and it runs on its own from then on.
Instagram and Facebook. Those are the networks where private replies to comments are supported.
Connect your account, choose the keyword people should comment, and write the message they will receive. That is the whole setup.
Any comment containing your keyword, regardless of capitalization. You can also add words that disqualify a comment, so priceless never triggers a rule meant for price.
Yes. Besides comments, you can auto-reply to story replies and to people messaging you for the first time, each with its own message.
You can keep up to 20 rules per connected account, and each message can be up to 1000 characters.
Yes. The OAuth screens your users see carry neutral names like Social Media Connector rather than our brand, so the experience reads as fully yours.
Have more questions? Reach out to us