Question

Search action that returns one item

  • 27 October 2020
  • 2 replies
  • 154 views

Userlevel 1

Hi,

I have an API that returns the summary of a survey. As it is not going to create any data in the system I use the ‘Search’ option rather than the ‘Create’ option for the action type.

But Zapier is expecting an array of objects to be returned and my API is just returning one. I don’t want to have to change my API to suit Zapier so can someone please tell me how I get Zapier to accept the single object?

Thank you,

Steve

 


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 +14

Try creating an array with 1 object?

Userlevel 1

Thanks for the reply. I found out the issue. I was switching to code mode to put []’s around my results but I was hitting a bug in Zapier: 

due to the use of - characters in the api key attribute. Once I corrected for that bug the use of the []s solved the problem. I hope that bug will be fixed soon.

I think there should be an option to deal with this rather than having to switch to code mode as there must be loads of APIs out there which return a single object rather than an array.

Cheers,

Steve