Hello All,
I have a small Javascript Code Zap that triggers when a new Workflow Run starts in Manifest.Ly checklists. I use their API to read the details of the current run and then attempt to use a POST to update the data in one step. The code works perfectly from a local dev environment (inside a browser). Inside Zapier, all of the GET calls work but when I do the POST to actually update the field, it doesn’t work. It seems to never return, or throw an exception. This is the function that fails to work inside Zapier.
async function updateDataInRunStep(runId, runStepId, value) {
let url = `${serviceUrl}/runs/${runId}/run_steps/${runStepId}/data/?api_key=${apiKey}`;
let payload = {"data" : value};
console.info(`Calling ${url} with ${JSON.stringify(payload)}`);
try {
let updateRequest = await fetch(url,
{
method:'POST',
headers: headers,
body: JSON.stringify(payload)
});
console.info('Called POST to Update');
let updateResponse = await updateRequest.json();
console.info(updateResponse);
}
catch(err) {
console.info(err);
}
}
In the log, I see the “Calling https://...”
But I never see the “Called POST...” log
Any idea why it would work locally but not inside Zapier? Thanks!