Skip to main content
Question

How to use output from a previous step in future steps

  • July 29, 2026
  • 3 replies
  • 21 views

I have a javascript step that is sucking out the URL of a previous step that I’d like to use in future steps, but can’t figure it out.  The Output of this step doesn’t exist as an option to pick when drilling down for data points in other steps below.  Anyone have a tip/trick to get this working?

 

 

3 replies

robintrainward
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img
  • Zapier Orchestrator & Solution Partner
  • July 29, 2026

Hi ​@turnkeynetworks,

 

It would be helpful to see your JS code but can you check to see if you’re explicitly calling out QR Code URL in your output? Should look something like this:

 

return {

qrCodeUrl: extractedUrl

};


Forum|alt.badge.img+1
  • New
  • July 29, 2026

Adding to what robintrainward said, because this is usually the actual cause: the field picker in later steps is built from the last successful test of the Code step, not from the code itself. So even once you are returning the right key, if you have not re-run the test since editing, the new field will not show up in the dropdown below. Edit the code, run the test, then go back down to the later step and it should be there.

Two other things that catch people with Code by Zapier:

Return an object, or an array of objects, and know the difference. return {qrCodeUrl: extractedUrl} gives you one output that later steps read normally. return [{...}, {...}] fans out and runs every following step once per item, which is probably not what you want here.

Undefined gets dropped silently. If extractedUrl came back undefined on the test run, the key simply will not exist in the output, and that looks identical to the field not being available. Worth logging the variable in the test run to confirm it actually had a value.


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • July 29, 2026

Hi ​@turnkeynetworks 

Help link for mapping variables between Zap steps: https://help.zapier.com/hc/en-us/articles/8496343026701-Send-data-between-steps-by-mapping-fields

 

Help links for using Code: