Comment to DM Automation API for Developers

Keyword auto-replies that turn Instagram and Facebook comments into DM conversations.

Start for free
Create Automation
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.",
  },
});

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.

How it works

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.

0:03 / 0:07
0:00 / 0:07
0:00 / 0:07
0:00 / 0:07
Search keys

API Keys (8)

NameKeyPermissionCreated
Productionop_7Kq2…Read & WriteToday
Stagingop_Rm4x…Read & WriteYesterday
Claude agentop_9Tn1…Read & WriteOct 12
Analytics syncop_Hw3c…Read OnlyOct 8
Schedulerop_Lp6v…Read & WriteOct 2
Reportingop_Zd8s…Read OnlySep 27
CI previewop_Ba5e…Read OnlySep 23
Local devop_Qy2j…Read & WriteSep 18
Generate API Key
Key Name
e.g., Production API Key
Permission
Read & Write
Read Only
Profile Access
Full access (all profiles)
Connect Social Accounts
Profile
Default
TikTokTikTok
ClaudeClaude

All set, your post to X, LinkedIn, and Instagram is scheduled for 9 AM tomorrow.

Connected Onepostly MCP

Built for Your Agent

Onepostly ships as an MCP server. Your agent publishes to every platform.

LikesCommentsSavings

Unified Analytics

One request pulls engagement data from every network your accounts publish to.

Production Webhook
Staging Webhook
Slack Alerts

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