Skip to main content

Hello Team ,

I am working on Zapier integration for our sass product. I have one use case where I can create multiple candidate in one go and I want to get separate  slack notification or email for each of them . I am passing data in array of object but I receive single message and all data is merged in that message

Notification  I received : 

-------------------
Candidate Name : Dummy Candidate,Dummy Candidate II ,Dummy Candidate III
Candidate Email : dummy@email.com,dummy@emailII.com,dummy@email.com
Candidate phone : 0000000000,0000000000,0000000000
Candidate Interview Link : Link1 , Link 2 , Link 3
-----------------------

Payload i pass to hookUrl : 

{
"Candidate": a{
"name": "Dummy Candidate",
"email": "dummy@email.com",
"phone": "0000000000",
"interviewLink": "http://domain/interview/155f0147-7333-4db5-be71-d86dbc239c76",
"jobName": "Dummy Job Name"
},
{
"name": "Dummy Candidate II ",
"email": "dummy@emailII.com",
"phone": "0000000000",
"interviewLink": "http://domain/interview/155f0147-7333-4db5-be71-d86dbc239c76",
"jobName": "Dummy Job Name"
},{
"name": "Dummy Candidate III",
"email": "dummy@email.com",
"phone": "0000000000",
"interviewLink": "http://domain/interview/155f0147-7333-4db5-be71-d86dbc239c76",
"jobName": "Dummy Job Name"
}
]

}


 

@ikbelkirasan 


@akshay108 try sending just the array. Not the object with an array. Example:

>{
"name": "Dummy Candidate",
"email": "dummy@email.com",
"phone": "0000000000",
"interviewLink": "http://domain/interview/155f0147-7333-4db5-be71-d86dbc239c76",
"jobName": "Dummy Job Name"
},
{
"name": "Dummy Candidate II ",
"email": "dummy@emailII.com",
"phone": "0000000000",
"interviewLink": "http://domain/interview/155f0147-7333-4db5-be71-d86dbc239c76",
"jobName": "Dummy Job Name"
}, {
"name": "Dummy Candidate III",
"email": "dummy@email.com",
"phone": "0000000000",
"interviewLink": "http://domain/interview/155f0147-7333-4db5-be71-d86dbc239c76",
"jobName": "Dummy Job Name"
}
]

That should work like a charm.


Hi @akshay108 

Check out this help article related to using the Webhooks app in a Zap that may help give you context as well to what @CraigNet3 has advised.

https://zapier.com/help/doc/how-get-started-webhooks-zapier#sending-an-array-of-objects

Sending An Array of Objects

The WebHooks by Zapier trigger supports sending more than a single trigger event per webhook request.
You can send an array of properly formed JSON objects, and we will trigger the Zap once for each object in the array.

For example, if we POST this payload to a Webhook endpoint:

>
{
first_name: Bryan,
last_name: Helmig,
age: 27
},
{
first_name: Mike,
last_name: Knoop,
age: 28
},
{
first_name: Wade,
last_name: Foster,
age: 29
}
]

We will trigger the actions 3 times - once for every object in the array.


@CraigNet3 @Troy Tessalone ,
Thanks for the reply. Issue I am facing after following above approach is I am not able to test trigger point.
I am getting message as follows : 
 

 


@akshay108 looks like your Perform List section in the Zapier app trigger development is not configured. The best way to configure the “Perform List” section of the Zapier app trigger, is to make an API call to the external API triggering the Zap, to retrieve the latest records for the data entity.

The Perform List will return up to 3 records in the Zap editor test trigger tab. Since you don’t see anything then it means the code is not configured correctly. You can actually return a static JSON instead of making an API call for fresh records. It doesn’t have to be new records. It’s up to you. The main point is to return JSON with the same structure as one of the individual objects in the array payload you are using to trigger the Zap. This will allow the user to map the correct field names in the steps following the trigger.

If you want to just test if the Zapier app is triggering correctly and to see if your payload works before you setup the Perform List, in the Zap you are using for testing, click the “Skip test” button in the trigger step, add a step 2 in the Zap if you don’t already have one, enable the Zap, then send your array payload to trigger it. From there you can check the Zap run history to see how many times it triggered and what data was processed in each run.