Skip to content

ironflow invoke

Directly invoke a function by ID.

Terminal window
ironflow invoke <function-id> [flags]

By default, the command is synchronous — it blocks until the function completes and prints the output. Use --no-wait to fire-and-forget.

Under the hood, invoke emits a synthetic event ironflow.invoke.<function-id> and auto-registers a trigger for it on the target function if one doesn’t already exist.

Arguments:

ArgumentRequiredDescription
function-idYesThe function to invoke (e.g., process-order)

Flags:

FlagShortTypeDefaultDescription
--data-dstringInline JSON input data (defaults to {})
--data-file-fstringPath to JSON file containing input data
--metadata-mstring[]Key=value metadata pairs (repeatable); ignored unless --no-wait
--no-waitboolfalseFire-and-forget (don’t wait for result)
--timeout-tduration30sMax wait time
--jsonboolfalseOutput as JSON instead of human-friendly text
--server-sstringServer URL override

Data input follows the same rules as emit (flag vs file vs stdin, error on conflict, default {}).

--metadata only reaches the run in fire-and-forget mode. The synchronous path (the default) sends no metadata and prints a warning when you pass some.

Examples:

Terminal window
# Invoke and wait for result (default)
ironflow invoke process-order --data '{"order_id": "123"}'
# Fire-and-forget
ironflow invoke send-notification --data '{"user_id": "456"}' --no-wait
# With custom timeout
ironflow invoke generate-report --data '{}' --timeout 120s
# Pipe from file
cat complex-input.json | ironflow invoke generate-report
# JSON output
ironflow invoke process-order --data '{"order_id": "123"}' --json

Output (sync):

Invoking process-order (timeout: 30s)...
✓ process-order completed in 1200ms
Output: {"order_confirmed":true}

Output (—no-wait):

Invoked process-order (event: evt_01HN8K3X5Y)
Run ID: run_abc123