Question

Why Search Action only return one value?

  • 5 May 2020
  • 3 replies
  • 2592 views

Userlevel 1

Hey!

I created a search type action in my app, in this app, in API Configuration, i defined an API, the api will return an array that contains multiple records from db query, but every time when i run “Test your API Request” in step2,  in response, it only return one record.

I’m wondering why? based on the description of API Endpoint, This Search request must return an array.

 

So what i expected in response should be an array, just like:

[

  {

  k1:v1,

  k2:v2

  },

  {

  k1:v1,

  k2:v2

  }

]

 

But it returned to me an object:

  {

  k1:v1,

  k2:v2

  }


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

3 replies

Userlevel 7
Badge +10

Hi @fengshao 

Sorry we missed this! Did you sort this, or are you still having issues?

Userlevel 1

@ikbelkirasan Thanks for your response, but based on my test, i created a zap, Schedule by Zapier as step1 trigger, and my app as step2, and google sheets as step3, what i expected is put the action’s data of step2 to google sheets every day. but it only put on object into google sheets at every day run.

Any idea?

Thanks.

Userlevel 7
Badge +12

@fengshao - That’s the expected behavior, it will only show you one object of the array. It’s a bit confusing, I agree but it should work fine. In a real zap execution, the array of objects will run the subsequent steps multiple times, once for each object of the array.