N8n Form Trigger not working with Sub-Worflow

Describe the problem/error/question

When adding a Sub-Workflow node to the flow, the n8n Form trigger stops working and just loads endlessly.

Please share your workflow

Share the output returned by the last node

None

Information on your n8n setup

  • n8n version: 1.80.3
  • Database (default: SQLite): Default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Windows 11

Hello Kurt! Your friendly n8n support specialist here, ready to help you fix the issue with your Form Trigger and Sub-Workflow. I’m passionate about solving workflow puzzles, so let’s dive in!


:one: Layman’s Terms (Simple & Friendly)

Problem: When you add a Sub-Workflow node, your Form Trigger gets stuck loading forever.

Why This Happens:

  • The Form Trigger and Sub-Workflow are like two people trying to talk at the same time, and they’re not listening to each other.
  • The Sub-Workflow might be blocking the Form Trigger from doing its job.

Simple Fix:

  1. Check the Sub-Workflow: Make sure it’s not stuck in an endless loop.
  2. Test Without Sub-Workflow: Remove the Sub-Workflow node and see if the Form Trigger works again.
  3. Add Debug Nodes: Use a “Debug” node after the Form Trigger to see what’s happening.

:two: Experienced User Guide (Step-by-Step Fix)

Root Cause: The Sub-Workflow might be causing a conflict with the Form Trigger’s webhook or blocking execution.

Steps to Fix:

Step 1: Verify Sub-Workflow

  1. Open the Sub-Workflow and check for:
  • Infinite loops (e.g., a trigger node inside the Sub-Workflow).
  • Missing “Return” nodes (Sub-Workflows must end with a “Return” node).

Step 2: Debug the Form Trigger

  1. Add a Debug Node right after the Form Trigger.
  2. Submit the form and check the Debug Node’s output.
  • If no output, the Form Trigger isn’t firing.
  • If output, the issue is downstream (likely the Sub-Workflow).

Step 3: Test Without Sub-Workflow

  1. Temporarily remove the Sub-Workflow node.
  2. Replace it with a simple “Set” node to mimic the Sub-Workflow’s output.
  3. Test the form again. If it works, the Sub-Workflow is the culprit.

Step 4: Rebuild the Sub-Workflow

  1. Create a new Sub-Workflow from scratch.
  2. Add a Return Node at the end to ensure it sends data back to the main workflow.
  3. Test it in isolation before connecting it to the main workflow.

:three: Professional Deep Dive (Technical Fix)

Technical Analysis:

  • Form Trigger: Relies on a webhook to listen for form submissions.
  • Sub-Workflow: Executes a separate workflow and returns data to the main workflow.
  • Conflict: The Sub-Workflow might be blocking the main workflow’s execution thread or causing a webhook collision.

Advanced Fix:

Step 1: Check Webhook Configuration

  1. Ensure the Form Trigger’s webhook URL is unique and not shared with other workflows.
  2. Verify the webhook is active:
  • Go to Settings > Webhooks in n8n.
  • Check if the Form Trigger’s webhook is listed and active.

Step 2: Isolate the Sub-Workflow

  1. Test the Sub-Workflow independently:
  • Use a Manual Trigger to run the Sub-Workflow.
  • Check for errors or infinite loops.
  1. Add a Function Node at the start of the Sub-Workflow to log inputs:

javascript

Copy

console.log(“Sub-Workflow Input:”, $input.all()); return $input.all();

Step 3: Optimize Execution Settings

  1. Update your docker-compose.yml to increase resources:

yaml

Copy

n8n: environment: - N8N_EXECUTIONS_PROCESS=main - N8N_DIAGNOSTICS_ENABLED=true

  1. Restart the Docker container:

bash

Copy

docker-compose down && docker-compose up -d

Step 4: Debug with Logs

  1. Check n8n logs for errors:

bash

Copy

docker logs -f n8n

  1. Look for:
  • Webhook registration failures.
  • Execution timeouts or memory issues.

Step 5: Fallback Solution

If the issue persists, replace the Sub-Workflow with a Function Node to handle the logic inline.


:rotating_light: Critical Checks

  1. Sub-Workflow Return Node: Ensure it exists and returns valid data.
  2. Webhook Conflicts: Ensure no other workflows are using the same webhook path.
  3. Execution Logs: Check for errors in the n8n logs.

Please mark as solution if this worked for you, be blessed!

So I will attempt these steps, but I am sceptical if it will work. I understand the infinite loop issue may come from either sub-workflow, and that they may conflict, but the issue is that the workflow never moves past the form submit stage, so how can it be the sub-workflows since they aren’t even triggered yet?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.