Automations: comment to DM
Whoever comments "price" gets the link in a private message within seconds, even at 3 a.m.
curl -X POST "https://api.usecrier.com/v1/automations" \
-H "Authorization: Bearer $CRIER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"accountId": "acc_3k9x2m",
"name": "Price link",
"keywords": [
"price",
"info"
],
"matchMode": "word",
"dmMessage": "Hi! Here are our prices 👇",
"buttons": [
{
"type": "url",
"title": "See prices",
"url": "https://acme.com/pricing"
}
],
"commentReply": "We sent it to your DMs!"
}'const res = await fetch('https://api.usecrier.com/v1/automations', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.CRIER_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"accountId": "acc_3k9x2m",
"name": "Price link",
"keywords": [
"price",
"info"
],
"matchMode": "word",
"dmMessage": "Hi! Here are our prices 👇",
"buttons": [
{
"type": "url",
"title": "See prices",
"url": "https://acme.com/pricing"
}
],
"commentReply": "We sent it to your DMs!"
}),
});
const { data } = await res.json();import os, requests
res = requests.post(
"https://api.usecrier.com/v1/automations",
headers={"Authorization": f"Bearer {os.environ['CRIER_API_KEY']}"},
json={
"accountId": "acc_3k9x2m",
"name": "Price link",
"keywords": [
"price",
"info"
],
"matchMode": "word",
"dmMessage": "Hi! Here are our prices 👇",
"buttons": [
{
"type": "url",
"title": "See prices",
"url": "https://acme.com/pricing"
}
],
"commentReply": "We sent it to your DMs!"
},
)
data = res.json()["data"]What each network allows
| Network | Private message | Public reply |
|---|---|---|
| Yes (and story replies) | Yes | |
| Yes | Yes | |
| TikTok, Threads, LinkedIn, YouTube | No | Yes (required) |
Options
keywords: empty, any comment fires it.matchMode:contains(also inside other words),word(whole word) orexact.postId(a Crier post) orinboxPostId(any post, as the inbox lists it). With neither, it watches every post of the account.repeat:oncesends one message per person;every_comment, one per comment.likeCommentandhideCommentact on the comment that fired it.active: falsepauses it without deleting it.
Results
Each automation carries its counters (stats: triggers, messages sent and failed, clicks). GET /v1/automations/{id}/logs lists every comment that fired it and whether the message arrived.