Wait-Node with Form and accessing user input in next step

Describe the problem/error/question

I have a workflow which starts with a n8n-form trigger and then sends out a mail containing the input of the previous form. The next step within my workflow is a wait-node which I use as a manual approval-step. For this I set the Resume within the wait-node to “On Form Submitted” and add a simple dropdown for approve/deny . This works fine, however I’m unable to access/get the results of that wait-form within my next step (flow/if-statement). I would like (for testing purposes) to do a if-branch based on the previous selection (approve/deny) and then continue based on this. Normally I can access form-results (for the first two steps for example) with something like {{ $json[‘fieldtitle ?’] } . This works fine for the first step which is a n8n-formtrigger, but not for the wait-form . Is there any option how I can access the data from this wait-form within the next step ?

I also tried to do a test-run and pin the data. However the only data I get within the next step is from the previous mail-step:

Please share your workflow

Step 1 and 2 do work as expected. I get a mail with the corresponding url for the wait-form (via the mentioned expression {{ $execution.resumeFormUrl }} . I can open the form and supply my decision:
image

If I look now into the exections (or the designer) and open the “Approved”-Step I can only see the data from Step 2 (and 1 if I select if ofc) but I can’t find the stored result of the previously shown form:

Share the output returned by the last node

See screenshot above.

Information on your n8n setup

  • n8n version: 1.42.1
  • Database (default: SQLite): SQLITE
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default?
  • Running n8n via (Docker, npm, n8n cloud, desktop app):docker
  • Operating system: SLES 15 SP5

Hi @saintcore! Thanks for reaching out and being a part of our community!

The syntax you are using to access the value from the original node in your “Approved ?” If node is incorrect.

Instead of {{ $json['Bitte gewünschten Entscheid fällen'] }},

try {{ $('Formular: Antrag erfassen').item.json['Bitte die Quelle so gut als möglich beschreiben'] }}.

I hope that helps. Happy building!

Hello @Ludwig and thx for your reply. However I think you slightly missunderstood my problem:

  • I have no problem to access the data from the first step within mit “Approved ?” step. As you correctly noted the syntax for this would be another and your example does work.
  • I try to access the result of the “Wait-Form” of my “Wait”-Step within my “Approved ?” Step.

As further explanation:

Within Step 3 (Wait) I’ve selected “On Form Submitted” as a Resume and added a single dropdown-field with 2 values:

When I run my workflow now, I fill-in the first form and n8n does send out the correct mail (with the link to the previously mentioned Wait-Form via the code ‘{{ $execution.resumeFormUrl }}’ ). I can open that link and select my decision (Approve in this case):
image

What I’m failing now is accessing the value of that decision (In this example the value should be “Approve”) within my next Step 4 (which is the “Approved ?”) Step. I don’t know the correct syntax for accessing this. Also when going to the workflow-execution and selecting step 3 (“Wait”) as Input I only see the status for the mail sent out in step 2 (“Mail Notification”):

While when I select Step 1 (Form) as a source, I can see all the fields and it’s value (not all included on the screenshot below),from which I can “generate” the correct syntax by the visual editor via drag & drop):
image

I hope this clarifies where I’m struggling at :slight_smile:

Any other ideas about this ? :slight_smile: