For the complete documentation index, see llms.txt. This page is also available as Markdown.

Otomato SDK Integration Guide

The Otomato SDK lets you build automated notification directly into your frontend.

Full SDK source: github.com/Otomatorg/otomato-sdk


Installation

npm install otomato-sdk

Authentication

Every API call requires an API key. To get one, email hello@otomato.xyz. The team will generate a key for you.

import { apiServices } from 'otomato-sdk';

apiServices.setUrl("https://api.otomato.xyz/api");
apiServices.setAuth("your-auth-token");

Set these once at the top of your script. All subsequent SDK calls use them automatically.


Core Concepts

Concept
What it is

Trigger

A condition that starts a workflow (e.g. ETH price drops below $2,500)

Action

What happens when the trigger fires (e.g. send an email)

Edge

The connection from a trigger to an action

Workflow

The container that holds triggers, actions, and edges

A workflow always follows this shape:


Your First Workflow: ETH Price Alert

This workflow monitors ETH price and sends an email when it drops below $2,500.

Full example: simpleEthPriceMonitor.ts


DeFi Example: AAVE Health Factor Monitor

Monitor an AAVE position and get a Slack alert before liquidation risk.

Full example: aave-trigger-heath-factor.ts


Using Dynamic Output in Actions

Trigger outputs can be injected into action parameters using template variables. This lets you include live on-chain values (like the current health factor) in notifications.

The syntax is {{nodeMap.<triggerRef>.output.<fieldName>}}. Each node gets a ref number starting at 1.


Running via REST API (no SDK)

If you prefer raw HTTP, you can create and run workflows directly against the API.

Step 1: Create the workflow

Key parameters:

Parameter
Location
Description

user

nodes[0].parameters.abi.parameters.user

Wallet address to monitor

comparisonValue

nodes[0].parameters.comparisonValue

Health factor threshold

to

nodes[1].parameters.to

Email recipient

body

nodes[1].parameters.body

Use {{nodeMap.1.output.healthFactor}} to include live value

Response:

Save the id for the next steps.

Step 2: Run the workflow

Response:

Step 3: Get execution history

Once a workflow has run, retrieve its past executions:

Query parameters:

Parameter
Required
Description

wfId

Yes

Workflow ID to query

limit

No

Results per page

offset

No

Results to skip (pagination)

order

No

Sort order

latestOnly

No

Set to true to return only the most recent execution

Response:

Execution states: active, completed, failed, inactive.

Step 4: Get full details of a single execution

Response includes each node's output and timing:


Important Behavior Notes

Trigger timing: On-chain conditions are checked every 5 minutes. Expect up to a 5-minute delay from event to notification.

Immediate firing: If the condition is already met when the workflow starts, the action fires immediately.

Single execution: Workflows execute once and stop. Contact the Otomato team if you need looping or recurring workflows.

Chain support: Ethereum, Base, Arbitrum, Optimism, Polygon, Avalanche, BNB Chain, and Sonic are supported. Use CHAINS.<CHAIN_NAME> constants.


More Examples

Protocol
Example

AAVE multi-chain

Token swaps

Yield strategies

Use cases (DCA, aggregators)

Full SDK source: github.com/Otomatorg/otomato-sdk


Need Help?

Reach out at hello@otomato.xyz. The team reviews integration questions directly.

Last updated