Question

POST request working via postman but not via Zapier Action


Hi,

I have this post request action in zapier : 

const options = {
url: 'https://******.ngrok.io/api/Zapier/AudienceListFields',
method: 'POST',
headers: {
'X-API-SECRET': bundle.authData.api_secret,
'X-API-KEY': bundle.authData.api_key,
'Content-Type': 'application/json',
'Connection' : 'keep-alive',
'Accept' : '*/*'

},
params: {
'api_secret': bundle.authData.api_secret,
'api_key': bundle.authData.api_key
},
body: {
'fields': bundle.inputData
}
}

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;
});

 

The request works in Postman - does not seem to work in Zapier, I get the following : “The app did not respond in-time. It may or may not have completed successfully.”


14 replies

Userlevel 7
Badge +11

@ikbelkirasan 

Userlevel 7
Badge +11

Hi @TyronSale 

Time & Memory Limits

Code Zap app: https://zapier.com/help/doc/common-problems-code-zapier
Free users are limited to 1 second and 128mb of RAM.
Paid users get well over double that at 10 seconds and 256mb of RAM.
Your Zap will hit an error if you exceed these limits.

Userlevel 7
Badge +11

@TyronSale 

You may want to try using the Webhooks Zap app instead of making the API call in a Code step: https://zapier.com/apps/webhook/integrations

Hi @TyronSale 

Time & Memory Limits

Code Zap app: https://zapier.com/help/doc/common-problems-code-zapier
Free users are limited to 1 second and 128mb of RAM.
Paid users get well over double that at 10 seconds and 256mb of RAM.
Your Zap will hit an error if you exceed these limits.

Hi @Troy Tessalone

 

I have just created this Zappier account so should have 14 days of premium. Would this apply here ? If not it could be another issue ? Thanks.

@TyronSale

You may want to try using the Webhooks Zap app instead of making the API call in a Code step: https://zapier.com/apps/webhook/integrations

 

@Troy Tessalone  Is it possible to use webhooks as an action here ? The only options I see are to configure an endpoint : 

 

Userlevel 7
Badge +11

@TyronSale 

I’d suggest trying to use a Webhooks action step in the Zap to do your API call.

@Troy Tessalone Thanks for your help, did you see my comment about having 14 days premium - should this help with the timeout issue ? If not - would there any other reason for a simple post request failing ? Thanks. 

Userlevel 7
Badge +11

@TyronSale 

Does postman indicate how long the POST request takes to complete?

If it’s over 10 seconds, that’s likely the culprit in Zapier.

@Troy Tessalone its takes 590ms to complete in postman. 

 

 

Userlevel 7
Badge +11

@TyronSale 

Can you clarify if you are using this as a Zap action step OR part of a Zap app integration being built on the Zapier Platform (https://zapier.com/platform)?

@Troy Tessalone 

This is a Zap App integration being built on the Zapier platform.

Userlevel 7
Badge +11

@TyronSale 

Ah ok, that might be why some of my advice was misguided.

Ideally this topic would be under ‘Developer Discussions’ rather than ‘Code & Webhooks’.

 

@ikbelkirasan Can you help?

@Troy Tessalone I am having the same issue. A request that was working last month has suddenly stopped working. I am getting the same error about timeout, but I can verify in postman that the api is returning in ~300ms.

Userlevel 7
Badge +11

@TyronSale and @maxgalat 

Might be worth opening a ticket with Zapier Developer Support:

https://developer.zapier.com/contact

Reply