Actions
Actions are reusable operations you register once and reference by name. Every action has a kind that determines how it executes.
The Five Action Kinds
| Kind | What It Does | Example |
|---|---|---|
| HTTP | Call external REST APIs | POST to Salesforce, GET from Stripe |
| LLM | AI text generation | Summarize a document, extract entities |
| DB | Query databases | SELECT from your data warehouse |
| Matcher | Pre-configured matching rules | Invoice-to-payment matching with saved config |
| Custom Table | Table operations | Read/write to Hyphen-managed tables |
Works Everywhere
All registered actions work in three contexts:
| Context | How It's Used |
|---|---|
| Workflow step | "type": "my_action" in the actions array |
| Foreach loop | Inside actions_to_execute — runs once per item |
| ReAct agent tool | Listed in tools — agent decides when to call it |
Registration
Register an action via API, then use its action_name as a step type:
bash
# Register
curl -X POST http://localhost:3009/actions \
-H "X-Org-Id: acme-corp" \
-H "Content-Type: application/json" \
-d '{
"action_name": "fetch_customer",
"kind": "http",
"url": "https://api.crm.com/customers/{{customer_id}}",
"http_method": "GET",
"headers": { "Authorization": "Bearer orgconfig:api:crm_token" }
}'
json
// Use in a workflow
{ "type": "fetch_customer", "properties": { "customer_id": "@input.id" } }
POST
/actionsRegister a new action.
GET
/actionsList all registered actions for the organization.
GET
/actions/:idGet details of a specific action.
PUT
/actions/:idUpdate an existing action.
Common Properties
These properties apply to all action kinds:
| Property | Type | Required | Description |
|---|---|---|---|
action_name |
string | Yes | Unique name within the org — used as type in workflows |
kind |
string | Yes | "http", "llm", "db", "matcher", or "custom-table" |
description |
string | No | Human-readable description |
passthrough |
boolean | No | If true, the raw response is passed through to context (default: false) |
outputKey |
string | No | Custom context key for the action's output |