Build Actionflows
Momen Actionflows provide workflow orchestration and multiple Trigger options, producing custom Actions similar to workflow editors and automation products.
Free plan users can configure only 1 Actionflow. Basic plan and above support unlimited Actionflows.
Use Cases
Actionflows are ideal for automating complex data processing and business logic.
- E-commerce: Automatically upgrade a user to Gold Member when total purchases exceed $10,000.
- Scheduled tasks: Check all unpaid orders daily and send notifications.
- Payments: Run follow-up business logic after receiving a payment success notification.
Actionflow Structure
Basic attributes
- ID: Each Actionflow has a unique ID searchable in logs. See Log Service.
- Version: Each save creates a new version.
- Update preview: Updates both frontend and backend to the latest version.
- Sync changes: Syncs only backend changes to the latest version.
⚠️If you sync only the backend while the frontend still calls an older Actionflow version, behavior may be unexpected.
- Execution mode: Supports synchronous and asynchronous execution (applies to the Actionflow itself, not individual nodes).
-
Synchronous: The caller waits for the result. Synchronous Actionflows have ACID properties:
- Atomicity: The entire Actionflow is treated as one indivisible unit. Database changes either all succeed or all fail—no partial updates.
- Consistency: Keeps database data in a valid state with no dirty data.
- Isolation: Actionflows do not interfere with each other, avoiding contention and unpredictable results.
- Durability: Once an Actionflow completes, database changes persist permanently.
-
Asynchronous: Call first, then listen for results. When an asynchronous Actionflow is triggered via webhook, use the
fz_listen_action_flow_resultsubscription to listen for results:subscription listenResult { fz_listen_action_flow_result(taskId: "_____") { output status } } -
Synchronous vs. asynchronous comparison:
Synchronous Asynchronous Timeout Entire flow bounded by plan cap; API gateway may return an error at ~60s while the backend continues until the cap Each node bounded by plan cap; no global flow time limit Timeout / error handling All database changes are rolled back Database changes on the error node are rolled back
-
Actionflow variables
Once defined, variables can be referenced by all nodes inside the Actionflow. Use the Assign Actionflow Variable node to set values.
Triggers
- Scheduled Trigger: Run on a recurring schedule (supports Cron expressions).
- Database change Trigger: Details.
- Webhook Trigger: Trigger via webhook (configure the callback body).
Automation execution counts are a paid resource. Momen grants different amounts per plan. When exhausted, purchase more via User Center → Project → Manage → Automation execution count.
Tutorial
The overall flow: create and configure Actionflow nodes → configure Triggers → set permissions → call from the frontend or run via automation.
Configure the Actionflow
- Click Create on the Actionflow page to add a new Actionflow.
- Configure nodes according to your business logic. Besides node types, you can add branches for conditional paths.
- Set input parameters to accept external data and output parameters to return results.
- Choose execution mode: synchronous or asynchronous. AI nodes require asynchronous execution.
- Actionflow variables are declared inside the flow and are often used in condition branches to hold intermediate results.
Configure Actionflow nodes
-
Input parameters Data passed in when the Actionflow runs. Available to all nodes.
-
Action nodes: Click ”+” to add a node.
-
Output parameters Results returned by the Actionflow.
Configure Triggers
Configure the Triggers you need. Multiple Triggers are supported, but one Trigger per Actionflow is recommended to avoid confusion. You can also add a Call Actionflow action on a component or page to trigger the Actionflow from a click event.
Configure permissions
Each Actionflow can define which roles may execute it under Settings → Permissions.
View logs
View Actionflow runtime logs in the project details page under Runtime logs. Search precisely by Actionflow ID.
Timeout policy
Actionflow timeouts depend on three factors: execution mode, current project plan, and specific node types.
By execution mode
- Synchronous: Capped at approximately 60 seconds by the API gateway. On timeout, the client receives an error immediately, but the backend process continues until it hits the global plan hard cap below.
- Asynchronous: No global time limit. The workflow can keep running as long as individual nodes do not time out.
Plan caps
These caps define the absolute lifespan of the execution engine. For synchronous flows, they limit total runtime; for asynchronous flows, they limit maximum time per node (e.g., a Custom Code block).
- Free plan: 15 seconds.
- Paid plans (Basic / Pro): 10 minutes.
- Dedicated instance: No hard cap (10 minutes by default).
Node-level constraints
- AI nodes: 10 minutes on all plans.
- Payment callback: 5 minutes.
- API nodes: 60 seconds hard cap (from request start to full response received).
- Database nodes: Short limits (e.g., 5 seconds) mainly apply to connection queue wait time. Actual SQL execution is ultimately bounded by the global engine lifespan (15 seconds / 10 minutes).