Question

Issue with Manifest.LY API from Code Zap

  • 9 November 2022
  • 2 replies
  • 20 views

Userlevel 1

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!


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

2 replies

Userlevel 7
Badge +8

Hi @rockscience 

 

Im 90% certain that Zapier Code step cannot use Post, it can only be used to GET / FETCH. To use POST you would need to use Zapier Developer Platform https://developer.zapier.com to create your own private integration. 

Userlevel 1

Hi @rockscience 

 

Im 90% certain that Zapier Code step cannot use Post, it can only be used to GET / FETCH. To use POST you would need to use Zapier Developer Platform https://developer.zapier.com to create your own private integration. 

Thanks @MohSwellam .  I’m pretty sure I’ve seen a POST work on other calls in Zap code.  And here is an article on doing it.  I have a ticket open with Manifestly too and they are investigating on their side.