Skip to main content
Question

Zapier Python Code Step: Best Practices & Understanding line numbers

  • February 29, 2024
  • 5 replies
  • 99 views

greenhouseautomation
Forum|alt.badge.img

Dear community,

I extensively use Python webhooks and one common problem is that the error message contains a line number that does not match the line number when copy-pasting the code to an IDE. How can I “convert” the error line number shown by Zapier to the one in a normal text file? Does this possibly depend on dependencies?

Second, I am looking for general best practices regardig using Code in Zapier steps - I find the Zapier interface very tedious for code steps as only the bottom-right part is shown. However, when writing the code in a normal IDE, I cannot use the input_data.get() function and thus its annoying to test - do you have any best practices there?

Many thanks!

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

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

Hi @greenhouseautomation 

For us to have more context, we will need to see screenshots with how the steps are outlined and configured, thanks.


greenhouseautomation
Forum|alt.badge.img

Hi @Troy Tessalone does this help?

 


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

@greenhouseautomation 

Unfortunately, the Code step doesn’t show row numbers, which can make it a bit challenging to troubleshoot.

 

One option to try is using an Airtable Automation Run Script action to replicate the error and troubleshoot.


greenhouseautomation
Forum|alt.badge.img

Thanks! Does anyone have another idea? It seems like Airtable Automation Run Scripts are only available in paid Airtable plans.

Also can someone help me understand how line numbers for error codes are “calculated” in Zapier code steps?


greenhouseautomation
Forum|alt.badge.img

Just commenting again to push the thread