Skip to content

Forum in maintenance, we will back soon 🙂

Notifications
Clear all

Javascript

2 Posts
2 Users
1 Reactions
454 Views
(@heba-a)
Posts: 2
Active Member Customer
Topic starter
 

Hello Hassan,

 

I am trying to create javascript to capture data to add to Zapeir but some of the data is not collected, could you please help me

 

workflow.zapierSucess = false

const leadData = {
    name: workflow.Name,
    email: workflow.emailaddress,
    number: workflow.phonenum,
    number: workflow.tentprice,
   quantity of people: workflow.peoplecount
};
   
try {
    const response = await axios.post('https://hooks.zapier.com/hooks/catch/15952138/3mzoxz4/', leadData)
    console.log(response.data)
    workflow.zapierSuccess = true
} catch(error) {
    console.error(error)
}
 
Posted : 07/17/2023 5:15 pm
Hasan Aboul Hasan
(@admin)
Posts: 1208
Member Admin
 

I didnt do this, but I see a problem in the leaddata declaration

Try this:

workflow.zapierSucess = false;
const leadData = {
   "name": workflow.Name,
    "email": workflow.emailaddress,
    "phoneNum": workflow.phonenum,
    "tentPrice": workflow.tentprice,
    "quantity of people": workflow.peoplecount,
};
   
try {
    const response = await axios.post('https://hooks.zapier.com/hooks/catch/15952138/3mzoxz4/', leadData);
    console.log(response.data);
    workflow.zapierSuccess = true;
} catch(error) {
    console.error(error);
}
 
Posted : 07/18/2023 2:30 pm
SSAdvisor reacted
Share: