I'm implementing a Mail to Webhook Zapier integration. When testing the webhook during the creation process, the test is stuck and won't move on to the next step in the creation process.
When looking at my app logs, I see that the webhook is being sent over and over again, and doesn't stop, even though the app sends '200 ok' in the response.
Why does this happen? What response do I need to send to make it finish?
David here, from the Zapier Platform team.
It's hard to say for sure, but I believe the response needs to include some content. At minimum, that's {} (valid JSON), but it could also be {"ok": true} or something.
That said, an empty response is something we should handle so if you could write into partners#zapier.com with your zap id, we can take a closer look!
Related
I have created a Zapier Zap with the following steps:
Catch Hook (Trigger): A webhook which catches post requests with a param customer_id
Find Customer (Action): Stripe integration which takes the customer_id parameter from (1) and retrieves the customer from Stripe
The setup works correctly in the Zapier setup flow, however, when I post to the endpoint from (1) I simply get a 200 return from step (1) alone. Instead I want to receive the data as returned by step (2).
Is this possible using Zapier?
You can't get data back directly when sending a webhook to Zapier. You can read this answer for more info, but the idea is that your zap steps happen asynchronously instead of right away.
You can either add a 3rd step to send the result somewhere (perhaps to the server that's making the initial request to Zapier?) or, run a little webserver yourself that can reply to your initial request with the response you expect.
When I have a zap of more than 1 step, and the trigger is Webhooks by Zapier with Catch Hook. When I send the response to the webhook, it provides back to the source this kind of payload response:
{"id": "548299ef-bb3a-4769-885a-fb001407c049", "request_id": "5f197542-b118-4fe9-9b45-f1e10b4ac710", "attempt": "5f197542-b118-4fe9-9b45-f1e10b4ac710", "status": "success"}
Is there a way that the connection of the Zap is kept alive and rather than providing the response up, it provides the response of the last step of the Zap?
Short answer: no, it's not possible. You'll always get the json payload you posted when you send a webhook (unless you disable it, but then you just get nothing).
Long answer: No, because the zap execution happens separately from the webhook ingestion. Think of this operation less like a webserver (where the caller is waiting for a response) and more asynchronously (where the caller asks that a thing be done, the server confirms it will do it, and then the thing happens eventually).
What you want to use here is Make, as they support webhook responses.
Check out https://www.make.com/en/help/tools/webhooks
No affiliation, I just assumed Zapier could do this (and am slightly annoyed they can't).
I've set up a ZAP so that when a subscriber is added to my aweber email list they are automatically added to a product in my membership plugin called DAP or digital access pass.
As per the instructions of the membership plugins developers, I am using a webhook in the zapier 'post' section.
It's not working. Quite simply the webhook doesn't appear to be calling anything.
Now, weird thing is that zapier logs show the webhook has been sent and has had success. But from DAP's end nothing is being received.
The support team at DAP tell me that the script isn't being called, because nothing appears in their logs.
They show me this by putting the webhook URL into a browser and calling it that way, and THEN the relevant info arrives in the DAP logs.
Zapier told me they do not trouble shoot and so advised that I post here.
Would appreciate any help. Thank you very much.
Dan
You can easily test if Zapier is making a call or not by sending the request to http://requestb.in
Steps:
Create a request bin and copy the URL.
Request bin screenshot
In Zapier, replace the webhooks post URL with the requestb.in URL.
Now, whenever the Webhook makes a post request, you should be able to visit the inspect page of your bin and check if a request was received. Just add ?inspect to the end of the URL. For example, if your Request bin URL is https://requestb.in/wbto8jwb then you should visit https://requestb.in/wbto8jwb?inspect
The inspect page will show all the requests received.
With this, you will know if Zapier is sending the requests. If the requests are being received by request bin then there is something which needs to be fixed by DAP.
Note that it could also be something in the configuration of the Webhook that is causing the request to not be recognised by DAP. It will help if you add more details to your question - what format is the DAP team expecting to receive the data in?
Below is a sample Webhook implementation in Zapier.
I have added a hook to POST data to a request bin (https://requestb.in/wbto8jwb)
Webhook POST screenshot
When I test this step, the request is received in the Request Bin Inspect page (https://requestb.in/wbto8jwb?inspect).
Request Bin Screenshot
More reading:
https://zapier.com/help/webhooks/
Update:
You can also make a direct call to the DAP API by using a tool like https://www.hurl.it/. From the drop down in destination, select POST and put the URL here. Click on Add body and paste the raw data from request bin. Now ask the DAP team to check if the request was received.
I've created a telegram bot and set a webhook as described in the docs. For testing purposes I've set it up so once you send the bot a message it replies back with the same message.
Now the issue I am having is that the updates from telegram are coming back really slowly and there are some messages I haven't received yet. Am I missing something or is the webhook method just really slow?
I had the same problem. Turns out I wasn't responding the telegram server after I got the POST request. Due to this, the server wasn't sure if I got the previous updates and was constantly sending my webhook past updates.
I have an express server and I added this bit of line after handling the POST Request.
res.sendStatus(403)
You can also confirm this by going to this url
https://api.telegram.org/<token>/getWebhookInfo
You'll see a property called pending_update_count. It should zero or close to it.
I'm trying out few examples in Api.ai console. I see there are examples where the agent responds by using the values that are extracted from the user query or from the context. But is there a way to display response that is formed using the output of the action performed?
For example -
User: Is my pizza order confirmed?
Action: check order status
Response: Yes, it's confirmed (or "No, it's not")
You will have to use some custom webhook to do this, either integrating with a 3rd party API or will a server side call of your own to a database- in this case the webhook would take the user's ID and query if their pizza is ready or not, and this would then be passed back to API.ai.
Here is an example using a 3rd party webhook to do what you are asking:
https://github.com/api-ai/apiai-weather-webhook-sample
Yes you can do this with webhooks.
Typically, you would save the status of the order in your db, then you could have an intent that would:
Understand the query of your user (Is my pizza order confirmed)
The intent would call your webhook
the webhook would return the status order.
Api.ai would then give the answer.
When you use webhooks you need to return the speech response, the displayText, optionally the data that your apps need, the contextOut and the source.
I guess you would also need to have implement some context in api.ai so that you could now who is asking about the satus of the order. You would then be able to use the sessionId
Matt is correct here. You must use a webhook. Unfortunately the documentation from API.AI is currently very poor. Here's a screenshot example of an incoming post request. My message function will return an object with a desired response. In this case, I am using a Telegram chat bot. If you are not using any messenger, you can drop the data key: value. FollowupEvent is also optional.
Node.JS code with Restify
On your API.AI intent, make sure to check off Webhook. If you end getting the text response 'Broken' here, then something went wrong and you should check your error codes.
API.AI intent
And lastly, under the fulfillment tab, make sure to enable the webhook and point it at the right endpoint.