Actions
Actions are the workhorses of a Flowgine workflow. Each action can be configured with predefined fields by the end user, performs some logic, and can expose output data for downstream steps.
What can actions do?
- Call Strapi services (
entityService, admin services, or custom ones). - Reach external APIs through HTTP requests.
- Send notifications, emails, or webhooks.
- Transform, sanitize, or enrich data before the next step receives it.
Every action is defined with defineAction, which captures its metadata, input fields, and async run logic. The output is stored in the context of a Workflow, making them available to later steps.
The Condition node
Flowgine ships a special action called Condition. Instead of mutating data, it evaluates an expression and decides which branch to follow (“true” vs “false”). Use it to:
- Route premium customers down a different branch.
- Retry with a fallback provider when an HTTP response fails.
- Stop a workflow early when guard rails are not met.
Conditions make it easy to design complex automations without duplicating workflows or writing custom code.
Designing reliable actions
- Keep the field definitions descriptive so users understand what to supply.
- Validate inputs before hitting downstream services.
- Catch errors, log context, and set the action output accordingly so execution logs stay readable.
- Return only what’s needed—outputs become part of the data map for future nodes.
Following these practices keeps your action library predictable, maintainable, and reusable.