FlowTruxFlowTrux/Docs

Triggers

How to start FlowTrux workflows: manual runs, webhooks, schedules, and apps (forms, pages and custom apps).

Every workflow begins with a Trigger node that defines how a run starts. Pick one of four types in the Trigger Type dropdown of the node inspector: Webhook, Schedule, Manual, and App.

Whatever the type, the data a run starts with is available as {{trigger.data.<field>}}. A Trigger node can also carry Static Data (Optional) - a JSON object that is merged into trigger.data on every run (values sent by the caller win on a name clash).

A workflow only starts from a webhook, a schedule or an app while it is Active (the toggle in the workflow header). The Run button in the editor works either way.

Manual

The workflow runs when you click Run in the editor. The trigger data is the Static Data you configured:

{
  "text": "Summarize this quarterly report...",
  "language": "en",
  "format": "bullet_points"
}

With this static data, {{trigger.data.text}} resolves to the text above. Manual runs are the easiest way to build and test a workflow before switching it to a webhook, schedule or app.

Webhook

The workflow gets an HTTP endpoint that other systems call to start it:

POST https://app.flowtrux.com/api/webhooks/<workflowId>

The inspector shows the exact Webhook URL with a copy button (save the workflow first to get it).

Authentication

Every call must prove it may start the workflow. Choose how in Authentication:

ModeHow the caller authenticates
HMAC signature (recommended)Signs the raw request body with the secret and sends X-FlowTruss-Signature: sha256=<hex digest> (GitHub style).
Access tokenSends the secret itself in the X-FlowTruss-Token header, or appends ?auth_token=<secret> to the URL - for senders that can't sign requests.

Click Generate secret to create the secret. It is shown once - copy it right away. Rotate secret creates a new one and the previous secret stops working immediately. Until a secret exists, every call is rejected.

See Webhooks for signing examples and error responses.

Request data

  • The request body becomes {{trigger.data}} - a JSON body field orderId is {{trigger.data.orderId}}. Form-encoded bodies work the same way; any other content type arrives as {{trigger.data.body}} (the raw text).
  • URL query parameters are available as {{trigger._query.<name>}} (the auth_token parameter is never included).
  • Request metadata (time, method, headers with credentials removed) is available as {{trigger._webhook}}.

Webhook Response

Configure what the caller gets back in the Webhook Response section:

Response ModeBehavior
MinimalAnswers immediately with { success, executionId }; the workflow keeps running in the background. Default.
Last Node OutputWaits for the run to finish and returns the output of the last node that succeeded.
Specific Node OutputWaits for the run to finish and returns the output of the node you pick.
All Nodes OutputWaits for the run to finish and returns the outputs of all executed nodes (id, name, output).

You can also set the HTTP status code of the answer. For the waiting modes the connection stays open until the run finishes.

Schedule

Runs the workflow automatically on a recurring schedule (shown as Schedule in the dropdown).

Schedules

A trigger can hold several schedules - click Add in the Schedules section to attach another one. That keeps irregular patterns simple: "at 16:00 and at 22:30" is two schedules, not one complicated expression. Each schedule is picked from a preset (Every minute, Every 5 minutes, Every 15 minutes, Every 30 minutes, Every hour, Every 6 hours, Daily at 9 AM, Daily at midnight, Monday at 9 AM, Weekdays at 9 AM, First of month at 9 AM) or entered as a Custom cron expression.

Timezone

All schedules of the trigger fire in the Timezone you choose. The first time you open a schedule it is set to your profile timezone, so "Daily at 9 AM" means 9 AM your time. Pick any other zone if the workflow should follow someone else's clock.

What a scheduled run receives

{{trigger.data.scheduledAt}} is the time the schedule fired (ISO 8601). {{trigger.data.cronExpression}} and {{trigger.data.timezone}} tell you which schedule it was. Static Data is merged in as usual.

Cron expression format

Standard five-field cron syntax:

┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-7, 0 and 7 = Sunday)
│ │ │ │ │
* * * * *
ExpressionSchedule
*/5 * * * *Every 5 minutes
0 * * * *Every hour (at minute 0)
0 */2 * * *Every 2 hours
0 9 * * *Daily at 9:00
0 9 * * 1-5Weekdays at 9:00
0 9,17 * * 1-5Weekdays at 9:00 and 17:00
30 8 * * 1-5Weekdays at 8:30
0 6 * * 1Every Monday at 6:00
0 0 1 * *First day of every month at midnight

The inspector checks the expression as you type and tells you which field is out of range.

App

Starts the workflow from an app - a form, a result page or a custom app published from the workspace's Apps section. Choose the app in the App field; only apps of the same workspace are offered, and an app of another workspace never starts the workflow.

The workflow starts when:

  • a visitor submits an app that takes submissions (a form) - every active workflow whose App trigger names that app runs on each submission;
  • the app's code calls FlowTrux.run("<workflowId>", fields) - for example a dashboard that sends what the visitor typed.

One app can start several workflows. The values arrive as fields:

{{trigger.data.fields.email}}
{{trigger.data.fields.message}}
{{trigger.data.appName}}
{{trigger.data.submittedAt}}
{{trigger.data.submissionId}}   (submissions only)

When the app declares its fields (a form), the inspector lists each one with its ready-to-copy template. A file field arrives as { name, size, contentType, key }; pass the key to a tool that reads stored files. The inspector also shows the app's address and warns while the workflow is inactive.

How apps call workflows, which workflow answers a form, and how a result page shows the latest run: Connecting an app to a workflow.

Form triggers (retired)

Forms are apps now. Every form was converted into an app with the same fields, submissions and public link, and workflows that used a form trigger were switched to the App trigger automatically. A trigger that still shows Form (legacy) names a form that no longer exists, so it never starts - click Switch to App trigger and pick the form app. See Forms and submissions.