Best answer

Actions for endpoints with no body

  • 22 December 2020
  • 4 replies
  • 93 views

I am creating an app in Zapier.

My API has several endpoints that do not return a body. When I run Zapier's validation, I get a "Must have a static sample" warning, which in theory prevents the app to be published.

Is it possible to have actions without output in Zapier, and how do I do it?
 

https://platform.zapier.com/docs/integration-checks-reference#D012

 

icon

Best answer by ikbelkirasan 22 December 2020, 18:36

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.

4 replies

Userlevel 7
Badge +12

Hi @Michele Dorigatti - When the API endpoint doesn’t return anything, don’t return the API response but instead just return an object that contains one key.

For example:

return {
success: true
}

 

Userlevel 7
Badge +12

Hi @Michele Dorigatti - Just checking in to see if the answer above helped you solve the problem?

Userlevel 1

Hi @ikbelkirasan ! I am a colleague of Michele. We adopted your solutions, but I think Zapier should natively support endpoints that do not return a body, since it is a perfectly accetable, and sometimes more appropriate.

Userlevel 7
Badge +12

Hi @Jerker Klang - Thanks for the update! I agree with you on this point. Fortunately, the solution is pretty straightforward :)