Automations

Get Automation

GET
/v1/automations/{id}

Authorization

Bearer
headerAuthorizationBearer <op_>

Workspace API key, sent as Authorization: Bearer op_... Keys are created in the dashboard.

Path Parameters

id*string
Length1 <= length

Response Body

Automation

application/json
  1. response
id*string
accountId*string
name*string

Label 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*string

The direct message the rule sends.

enabled*boolean

false 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}