Automations
Get Automation
GET
Bearerheader
AuthorizationBearer <op_>Workspace API key, sent as Authorization: Bearer op_... Keys are created in the dashboard.
id*stringLength
1 <= lengthAutomation
application/json- response
id*stringaccountId*stringname*stringLabel for the rule.
kind*|comment_to_dm answers a comment with a direct message. story_reply answers a reply to a story. welcome_dm answers a message. New values can be added, so handle a value you do not know.
keywords*array<string>The rule runs when a comment or message contains any of these words. Matching ignores case.
excludeKeywords*array<string>The rule is skipped when a comment or message contains any of these words.
message*stringThe direct message the rule sends.
enabled*booleanfalse while the rule is paused.
Example Request
import { Configuration, AutomationsApi } from "@onepostly/sdk";const automationsApi = new AutomationsApi( new Configuration({ accessToken: process.env.ONEPOSTLY_API_KEY }));const response = await automationsApi.getAutomation({ id: "aut_4b8e2f6a1c9d4e37a5b02c8f6d1e9a33",});console.log(response);Example Response
{ "id": "aut_4b8e2f6a1c9d4e37a5b02c8f6d1e9a33", "accountId": "acc_YOUR_INSTAGRAM_ACCOUNT_ID", "name": "Free guide giveaway", "kind": "comment_to_dm", "keywords": [ "guide", "free" ], "excludeKeywords": [ "guidelines" ], "message": "Thanks for your interest! Here is your guide.", "enabled": true}