I am trying to create a workflow that starts with 2 triggers:
manual run or whatever
webhook run
when I execute webhook trigger everything works fine, but when I use the second trigger it gives me an error that referenced node is unexecuted. I tried finding answers in other topics but I still cannot figure it out. I’m noob in n8n, sorry if I am asking stupid questions.
I tried writing a javascript inside ChoseProjectId node to dynamically identify the projectId
Please share your workflow
Share the output returned by the last node
Referenced node is unexecuted
An expression references the node ‘Webhook’, but it hasn’t been executed yet. Either change the expression, or re-wire your workflow to make sure that node executes first. I expect node ChooseProjectId always return projectId based on the trigger
Note: This might report a “Referenced node doesn’t exist” error in some scenarios for test mode, but should work if you run the workflow from the start trigger’s Test Workflow button.
Note: You might need to reverse which node you check for isExecuted, so also try {{ $('Webhook').isExecuted ? $('Webhook').item. ... : $('SetDataManually').item. ... }}
Alternative Way
Make the When Clicking 'Test workflow' a completely separate flow that ends with an HTTP Request node that calls the test webhook endpoint (using http://localhost:5678/webhook-test/...) the same way a client would once you activate the workflow.
Since there are different field names coming from the webhook and the test workflow, you’ll need to add something like a switch statement to account for the name differences.