This workflow follows the Execute Workflow Trigger → HTTP Request recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "Modal: flux schnell subworkflow",
"nodes": [
{
"parameters": {
"workflowInputs": {
"values": [
{
"name": "prompt"
},
{
"name": "width",
"type": "number"
},
{
"name": "height",
"type": "number"
}
]
}
},
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1.1,
"position": [
-1056,
0
],
"id": "7b7d7308-c230-454b-aea4-2857b1bfbf0e",
"name": "When Executed by Another Workflow"
},
{
"parameters": {
"errorMessage": "The size of the image (width x height) is larger than 1 megapixel"
},
"type": "n8n-nodes-base.stopAndError",
"typeVersion": 1,
"position": [
0,
-288
],
"id": "f447c7aa-ba33-40d9-9131-9ccd7b0546af",
"name": "Image > 1 megapixel"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "f6e30a82-76cd-4bfd-9bc5-b7fffb15e35c",
"leftValue": "={{ $json.width * $json.height > 1048576 }}",
"rightValue": "",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
-448,
-16
],
"id": "648a8c7f-72d5-41c3-b722-f63af8eac4fc",
"name": "Check image size"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "3f7d5020-0710-4f3c-858f-0485a2bd2963",
"name": "width",
"value": "={{ $('When Executed by Another Workflow').item.json.width || 1024 }}",
"type": "number"
},
{
"id": "39b906fa-3e0b-45b9-9c1b-95cbc51e195d",
"name": "prompt",
"value": "={{ $('When Executed by Another Workflow').item.json.prompt }}",
"type": "string"
},
{
"id": "3f8593d2-cfb3-437a-a9fc-4430995cb78f",
"name": "height",
"value": "={{ $('When Executed by Another Workflow').item.json.height || 1024 }}",
"type": "number"
},
{
"id": "065181ef-404a-4860-9019-976e6e8391e0",
"name": "seed",
"value": "={{ Math.floor(Math.random() * 100000000) }}",
"type": "number"
},
{
"id": "2c131da3-e708-4468-bb09-d400e7e5f28c",
"name": "steps",
"value": 4,
"type": "number"
},
{
"id": "95df4de2-196a-4f64-a2ed-3959ede14154",
"name": "url",
"value": "={{ ((u) => { let s = u.trim(); if (!/^https?:\\/\\//i.test(s)) s = 'https://' + s; const parts = s.split('/'); return parts[0] + '//' + parts[2]; })($json.MODAL_URL) }}/generate",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-656,
0
],
"id": "9585531d-b5ed-482f-a2f5-a47e819a8388",
"name": "Setup workflow"
},
{
"parameters": {
"method": "POST",
"url": "={{ $('Setup workflow').item.json.url }}",
"authentication": "genericCredentialType",
"genericAuthType": "httpBearerAuth",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "prompt",
"value": "={{ $('Setup workflow').item.json.prompt }}"
},
{
"name": "width",
"value": "={{ $('Setup workflow').item.json.width }}"
},
{
"name": "height",
"value": "={{ $('Setup workflow').item.json.height }}"
},
{
"name": "seed",
"value": "={{ $('Setup workflow').item.json.seed }}"
},
{
"name": "steps",
"value": "={{ $('Setup workflow').item.json.steps }}"
},
{
"name": "cfg",
"value": "1"
}
]
},
"options": {
"redirect": {
"redirect": {}
}
}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
16,
0
],
"id": "9c19e1d4-4037-45bb-92bc-aaf7129cfd34",
"name": "HTTP Request",
"credentials": {
"httpBearerAuth": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "2df0bb38-9912-4978-ad56-3236c5d54126",
"name": "MODAL_URL",
"value": "<<insert your modal server url here>>",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-848,
0
],
"id": "6fd20fb6-9931-44e4-9eab-d057972e4623",
"name": "Configure me"
}
],
"connections": {
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Configure me",
"type": "main",
"index": 0
}
]
]
},
"Check image size": {
"main": [
[
{
"node": "Image > 1 megapixel",
"type": "main",
"index": 0
}
],
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
},
"Setup workflow": {
"main": [
[
{
"node": "Check image size",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[]
]
},
"Configure me": {
"main": [
[
{
"node": "Setup workflow",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "ebbc7288-a51b-4431-957d-670f8a28c4ed",
"id": "7xU7Q9gCrLxWxtqm",
"tags": []
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
httpBearerAuth
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Modal: flux schnell subworkflow. Uses executeWorkflowTrigger, stopAndError, httpRequest. Event-driven trigger; 6 nodes.
Source: https://github.com/gyoridavid/ai_agents_az/blob/main/episode_24/n8n_modal_flux_schnell.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Cloudflare Workers AI Flux subworkflow. Uses httpRequest, executeWorkflowTrigger, stopAndError. Event-driven trigger; 8 nodes.
Modal: flux dev subworkflow. Uses executeWorkflowTrigger, stopAndError, httpRequest. Event-driven trigger; 6 nodes.
Modal: flux qwen subworkflow. Uses executeWorkflowTrigger, stopAndError, httpRequest. Event-driven trigger; 6 nodes.
This template attempts to replicate OpenAI's DeepResearch feature which, at time of writing, is only available to their pro subscribers.
How it Works