Question

Zapier Python Code Step: Best Practices & Understanding line numbers

  • 29 February 2024
  • 5 replies
  • 36 views

Userlevel 1
Badge

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

Userlevel 7
Badge +14

Hi @greenhouseautomation 

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

Userlevel 1
Badge

Hi @Troy Tessalone does this help?

 

Userlevel 7
Badge +14

@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.

Userlevel 1
Badge

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?

Userlevel 1
Badge

Just commenting again to push the thread