Overview
The "CrewAI Flow Executor" node allows users to execute a previously created CrewAI flow within an n8n workflow. It supports two methods for specifying which flow to run: either by connecting a flow node directly to the input or by selecting a flow from a dropdown list. Users can provide custom input data in JSON format to be passed into the flow execution and configure execution options such as asynchronous execution and maximum allowed execution time.
This node is beneficial when you want to orchestrate complex AI-driven workflows by triggering other predefined CrewAI flows dynamically. For example, you might use it to:
- Chain multiple AI flows where the output of one flow triggers another.
- Execute specific AI flows based on user selection or external conditions.
- Run flows asynchronously to improve performance or handle long-running tasks.
Properties
| Name | Meaning |
|---|---|
| Flow Selection Method | How to specify which flow to execute. Options: "Connect Flow Node" (connect a flow node) or "Select from List" (choose from dropdown). |
| Flow | The specific flow to execute, selectable from a dropdown list (only shown if "Select from List" is chosen). |
| Input Data for Execution | JSON-formatted input data to provide to the flow execution. |
| Execution Options | Collection of options including: - Async Execution: Whether to run the flow asynchronously. - Max Execution Time (seconds): Maximum allowed time for the flow execution. |
| Report Issue | Notice with links to report bugs or get help with this node. |
| Request Feature | Notice with links to request new features or enhancements for this node. |
Output
The node outputs the result of the executed flow(s) as JSON data. Each item in the output corresponds to the response returned by the CrewAI flow execution API. The structure reflects the flow's output data wrapped in standard n8n metadata for further processing in the workflow.
If the flow execution fails and "Continue On Fail" is enabled, the output will contain an error object with the error message instead of normal flow data.
No binary data output is indicated or handled by this node.
Dependencies
- Requires an API key credential for authenticating with the CrewAI API service.
- Relies on the CrewAI API endpoints
/flows(to load available flows) and/flows/{flowId}/execute(to trigger flow execution). - The node uses internal helper functions to make authenticated HTTP requests to the CrewAI API.
- No additional environment variables are explicitly required beyond the API credential.
Troubleshooting
- Invalid JSON in Execution Input field: If the JSON provided in the "Input Data for Execution" property is malformed, the node will throw an error indicating invalid JSON. Ensure the JSON syntax is correct before running.
- Missing Flow ID: When using the "Select from List" method, the flow must be selected; otherwise, the node will throw an error about a missing required Flow ID.
- API Request Failures: Network issues or invalid API credentials may cause the flow execution request to fail. Verify that the API key credential is valid and that the CrewAI service is reachable.
- Flow Not Connected or Missing Input: If "Connect Flow Node" is selected but no flow node is connected to the input, the node may fail to determine which flow to execute.
- Timeouts: The "Max Execution Time" option limits how long the flow execution can run. If the flow exceeds this time, it may be terminated or return an error.