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.

ParameterTypeRequiredDescription
messagestringYesMessage 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.

ParameterTypeRequiredDescription
arrayarrayYesArray of objects to filter
filterobjectYesFilter DSL with operators ($eq, $gt, $and, etc.)

Result:

json
{ "filtered": [] }

Format data into a string using template syntax.

ParameterTypeRequiredDescription
dataarray or objectYesData to format
templatestringYesTemplate with {{@field}} placeholders
separatorstringNoJoin separator for arrays (default: \n)

Result:

json
{ "formatted": "string" }

Extract a single field from each object in an array.

ParameterTypeRequiredDescription
arrayarrayYesArray of objects
fieldstringYesField name to extract (supports nested: user.address)

Result:

json
{ "values": [] }

Extract named capture groups from text using regular expressions.

ParameterTypeRequiredDescription
textstringYesText to match against
patternstringYesRE2 regex with named groups (?P<name>...)
globalbooleanNoFind all matches (default: false)

Result:

json
{ "matched": true, "matches": {} }

Set a workflow-scoped key-value pair that persists between runs.

ParameterTypeRequiredDescription
keystringYesStorage key
valueanyYesValue to store

Tip
Access stored values in expressions: {{$storage.key}}

Read, write, and list organization-scoped storage.

org-storage-get:

ParameterTypeRequiredDescription
keystringYesStorage key
storestringNoNamed store (default: "default")

org-storage-set:

ParameterTypeRequiredDescription
keystringYesStorage key (no dots allowed)
valueanyYesValue to store
storestringNoNamed store (default: "default")

org-storage-list:

ParameterTypeRequiredDescription
prefixstringNoFilter keys by prefix
limitnumberNoMax keys to return (1-100, default: 50)
offsetnumberNoPagination offset
storestringNoNamed store (default: "default")

Execute custom JavaScript code transformations via a sandboxed runtime.

ParameterTypeRequiredDescription
codestringYesJavaScript code to execute
inputanyYesInput data
inputTypeobjectNoJSON schema for input validation
outputTypeobjectNoJSON schema for output validation
timeoutnumberNoTimeout in milliseconds

Result:

json
{ "output": "any", "executionTimeMs": 0, "language": "javascript" }

Send an HTTPS POST request to an external URL. Includes SSRF protection.

ParameterTypeRequiredDescription
urlstringYesHTTPS webhook URL
headersobjectNoHTTP headers
bodyobjectNoJSON request body
maxRetriesnumberNoRetry count (default: 3)

Result:

json
{ "deliveryId": "string", "status": "pending", "url": "string" }

Warning
Only HTTPS URLs are allowed. Private IP ranges are blocked for SSRF protection.

Trigger another workflow within the same organization. Fire-and-forget with recursion depth limiting (max 10).

ParameterTypeRequiredDescription
workflowIdstringYesTarget workflow ID
payloadobjectNoData passed as trigger result

Execute SQL against the organization's D1 database. Supports SELECT, INSERT, UPDATE, DELETE, and CREATE TABLE.

ParameterTypeRequiredDescription
sqlstringYesSQL query (max 10,000 chars)
paramsarrayNoParameterized query values

Result:

json
{ "rows": [], "rowsAffected": 0, "lastRowId": 0 }

Warning
DROP and ALTER statements are blocked for safety.

Deploy a smart contract to a blockchain network or sandbox.

ParameterTypeRequiredDescription
bytecodestringYesContract bytecode (hex)
abiobjectNoContract ABI
chainIdnumberYes*Target chain ID (*required for network deploy)
constructorArgsarrayNoConstructor arguments
targetstringNo"sandbox" or network name

Verify a deployed contract's source code.

ParameterTypeRequiredDescription
contractProjectIdstringNoProject ID
sourceCodestringNoContract source code

Call a payment-gated (x402) API endpoint with price protection.

ParameterTypeRequiredDescription
endpointIdstringYesEndpoint ID from registry
maxPricenumberNoMaximum price override
queryParamsobjectNoQuery parameters
bodyobjectNoRequest body
Ask a question... ⌘I