Best answer

Trigger with no sample data

  • 7 April 2020
  • 2 replies

Userlevel 1

Imagine that I'm doing a integration of Zapier with a new account on my system. This means that there will be no sample data to be fetched. Just the sample data that I've placed at the Zapier Integration code.

So, my current behaviour when Zapier looks for a sample data is to return an empty array. But this is showing an error at the UI. 

There is any way to force Zapier to use the sample data when there is no real data? Or, if I return the sample data, is Zapier smart enough to identify the sample data and avoid calling the test on the next steps?


Best answer by ikbelkirasan 7 April 2020, 13:03

View original

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

2 replies

Userlevel 7
Badge +12

Hello @Diego Bernardes - The sample data you set will be used when the user skips the test. So in order to return some sample data when the user is testing the trigger, you can add an if statement to check if bundle.meta.isLoadingSample is true and decide if you want to return some dummy data or call the API to fetch some real data.

Userlevel 1

Hi @ikbelkirasan , thanks for your quick reply. I'll see what's the best way to handle this.