Question

Webflow Action not responding in time, but executes fine on the Platform UI

  • 18 July 2022
  • 3 replies
  • 20 views

Hey all -

I finally got the formatting and processing right for this action and now it won’t respond in an actual zap.

It does a PATCH call to the Webflow CMS API to update an object based field. I’m just passing it text (urls of images) so there is no upload lag (unless I don’t understand how that quite works) but the images are super light either way.

Test calls from the Platform UI execute just fine and very fast. Updates are showing up in Webflow as expected.

const wf_multi = [];
const imgary = bundle.inputData.images;

for (let link in imgary) {
wf_multi.push({url: imgary[link]});
}

const options = {
url: `https://api.webflow.com/collections/${bundle.inputData.collection_id}/items/${bundle.inputData.item_id}`,
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': `Bearer ${bundle.authData.access_token}`,
'Accept-Version': '1.0.0'
},
params: {
'live': true
},
body: {
'fields': {
'images': wf_multi
}
}
}

return z.request(options)
.then((response) => {
response.throwForStatus();
const results = response.json;

// You can do any parsing you need for results here before returning them

return results;
});

If I try to use the action in a Zap, though, it times out.

 

I’ve been digging through the pages I can find on help to diagnose but I’m coming up short. Any thoughts? Thanks :)


3 replies

For more context, in the js console I’m getting a 405 - Method not allowed, but this request executes just fine in the Platform UI.

Userlevel 2
Badge +1

Hi @Alchemick,

Thanks for reaching out! Happy to help.

Hm, interesting. How long does the request take when you test it in the Platform UI?

I don’t see any requests in our logs for this app for the past five days...I suppose it’s been a while since you tried testing it?

Let me know and I’ll see what I can do.

Thanks!

Hey @shalgrim! No worries - I actually was able to figure out the issue with the help of support emailing back and forth. It was a formatting issue that arose from differences in the production front end processing layer and the platform ui processing layer. They got me all straightened out 🙂 Thanks for the reply, though!

Reply