Built-in Actions
Actions that execute within the B3OS workflow engine
Built-in Actions
Built-in actions execute directly within the workflow engine without external API calls. They are fast and consume minimal compute units.
Log a message with a timestamp. Useful for debugging and audit trails.
| Parameter | Type | Required | Description |
|---|---|---|---|
message | string | Yes | Message to log |
Result:
json{ "message": "string", "loggedAt": "string" }
Pause workflow execution for a specified duration. The actual timing is managed by the task queue (Asynq), not a blocking sleep.
Filter an array of objects using a MongoDB-style filter DSL.
| Parameter | Type | Required | Description |
|---|---|---|---|
array | array | Yes | Array of objects to filter |
filter | object | Yes | Filter DSL with operators ($eq, $gt, $and, etc.) |
Result:
json{ "filtered": [] }
Format data into a string using template syntax.
| Parameter | Type | Required | Description |
|---|---|---|---|
data | array or object | Yes | Data to format |
template | string | Yes | Template with {{@field}} placeholders |
separator | string | No | Join separator for arrays (default: \n) |
Result:
json{ "formatted": "string" }
Extract a single field from each object in an array.
| Parameter | Type | Required | Description |
|---|---|---|---|
array | array | Yes | Array of objects |
field | string | Yes | Field name to extract (supports nested: user.address) |
Result:
json{ "values": [] }
Extract named capture groups from text using regular expressions.
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Text to match against |
pattern | string | Yes | RE2 regex with named groups (?P<name>...) |
global | boolean | No | Find all matches (default: false) |
Result:
json{ "matched": true, "matches": {} }
Set a workflow-scoped key-value pair that persists between runs.
| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Storage key |
value | any | Yes | Value to store |
{{$storage.key}}Read, write, and list organization-scoped storage.
org-storage-get:
| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Storage key |
store | string | No | Named store (default: "default") |
org-storage-set:
| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Storage key (no dots allowed) |
value | any | Yes | Value to store |
store | string | No | Named store (default: "default") |
org-storage-list:
| Parameter | Type | Required | Description |
|---|---|---|---|
prefix | string | No | Filter keys by prefix |
limit | number | No | Max keys to return (1-100, default: 50) |
offset | number | No | Pagination offset |
store | string | No | Named store (default: "default") |
Execute custom JavaScript code transformations via a sandboxed runtime.
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | Yes | JavaScript code to execute |
input | any | Yes | Input data |
inputType | object | No | JSON schema for input validation |
outputType | object | No | JSON schema for output validation |
timeout | number | No | Timeout in milliseconds |
Result:
json{ "output": "any", "executionTimeMs": 0, "language": "javascript" }
Send an HTTPS POST request to an external URL. Includes SSRF protection.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | HTTPS webhook URL |
headers | object | No | HTTP headers |
body | object | No | JSON request body |
maxRetries | number | No | Retry count (default: 3) |
Result:
json{ "deliveryId": "string", "status": "pending", "url": "string" }
Trigger another workflow within the same organization. Fire-and-forget with recursion depth limiting (max 10).
| Parameter | Type | Required | Description |
|---|---|---|---|
workflowId | string | Yes | Target workflow ID |
payload | object | No | Data passed as trigger result |
Execute SQL against the organization's D1 database. Supports SELECT, INSERT, UPDATE, DELETE, and CREATE TABLE.
| Parameter | Type | Required | Description |
|---|---|---|---|
sql | string | Yes | SQL query (max 10,000 chars) |
params | array | No | Parameterized query values |
Result:
json{ "rows": [], "rowsAffected": 0, "lastRowId": 0 }
Deploy a smart contract to a blockchain network or sandbox.
| Parameter | Type | Required | Description |
|---|---|---|---|
bytecode | string | Yes | Contract bytecode (hex) |
abi | object | No | Contract ABI |
chainId | number | Yes* | Target chain ID (*required for network deploy) |
constructorArgs | array | No | Constructor arguments |
target | string | No | "sandbox" or network name |
Verify a deployed contract's source code.
| Parameter | Type | Required | Description |
|---|---|---|---|
contractProjectId | string | No | Project ID |
sourceCode | string | No | Contract source code |
Call a payment-gated (x402) API endpoint with price protection.
| Parameter | Type | Required | Description |
|---|---|---|---|
endpointId | string | Yes | Endpoint ID from registry |
maxPrice | number | No | Maximum price override |
queryParams | object | No | Query parameters |
body | object | No | Request body |