Code by Zapier - Javasctipt: Input variable is empty in Production - Works perfect in draft-mode

  • 15 November 2023
  • 5 replies

Hey guys
I’m using a small javascript-step to check a field of new Gravity Form entries. 

The forms are on a Wordpress-Site with two languages. The data is triggered correctly in Zapier and it just works fine, when the form is sent from the main language. If it’s sent from the second language, which is translated with WPML, the script errors because of missing input-data: 




But anyway I can see the data in “Step details”:


If I open the exact same form entry in the draft and execute the script manually, everything works without any problems.


Does anyone know of this or a similar problem? 
Thx in advance and best regards, 

5 replies

Userlevel 7
Badge +14

Hi @dan28 

Good question.

Can you post screenshots with how the Code is configured?


Hey @Troy Tessalone

Sure… This is the input-configuration:


And here the code: 

Let me know if I can provide more details. 


Userlevel 7
Badge +14


Check your Zap Runs history to see the DATA IN/OUT for each Zap step to help you troubleshoot.




Hi Troy, 

I have now tried a few workarounds. With "Lookup Spreadsheet row" the error is exactly the same.

It seems that it is the metadata from the form that fails on the first run when the form comes from a translated page. All "normal" fields are submitted correctly. 



I use a pathrule to check a part of the URL.

When running in production mode, this value is always empty.
When starting the zap manually, it works normally. 


Userlevel 7
Badge +14


Sometimes the data points are named/nested different when testing a Zap vs running a Zap live.

That may be impacting the mapped variables between Zap steps.