Hey guys,
I’m trying to send a post a trigger to Zapier via this function that was set in the backend:
export function triggerHook() { console.log("bla bla bla") const url = 'https://hooks.zapier.com/hooks/catch/XXXX/XXXX'; return fetch(url, { method: 'post', headers: { "Content-Type": "application/json" }, body: JSON.stringify({ fulldate: new Date() }) }) .then(response => { response.json() }) }
And on site ready I’m calling this function :
triggerHook()
This thing is that the Zapier api is called twice rather than once.
Any ideas why this could happen?