Get automation details
Returns an automation with its configuration, stats, and recent trigger logs.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.commentautomations.getCommentAutomation({ path: { automationId: 'automation_abc123', },});console.log(data);{
"success": true,
"automation": {
"id": "string",
"name": "string",
"platform": "string",
"accountId": "string",
"platformPostId": "string",
"postId": "string",
"postTitle": "string",
"keywords": [
"string"
],
"matchMode": "exact",
"dmMessage": "string",
"commentReply": "string",
"isActive": true,
"stats": {
"totalTriggered": 0,
"totalSent": 0,
"totalFailed": 0
},
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
},
"logs": [
{
"id": "string",
"commentId": "string",
"commenterId": "string",
"commenterName": "string",
"commentText": "string",
"status": "sent",
"error": "string",
"commentReplyStatus": "sent",
"commentReplyError": "string",
"createdAt": "2019-08-24T14:15:22Z"
}
]
}{
"error": "Unauthorized"
}{
"error": "Not found"
}Create comment-to-DM automation POST
Create a keyword-triggered DM automation on an Instagram or Facebook account. When someone comments a matching keyword, they automatically receive a DM. Two modes: * **Per-post** — set `platformPostId` to scope the automation to one specific post. Only one active per-post automation is allowed per post. * **Account-wide ("any post")** — omit `platformPostId` (and `postId`). The automation evaluates every comment on every post on the account. You can stack unlimited account-wide automations, each with its own keyword set, and they all run independently. Per-post automations take priority on their post.
Update automation settings PATCH
Update an automation's keywords, DM message, comment reply, or active status.