Please help. I am new to n8n and want to do ai chatbot for messeger. The problem right now is the webhook(post) keep loading until timeout when i execute the workflow. I have tried the webhook(get) to verify at meta and everything was fine, but i send message to the page account the webhook post is not respond at all. Kindly point me out if i missing any part, thank you
Please share your workflow
Share the output returned by the last node
the webhook(post) keep loading until timeout when execute the workflow
this usually happens when the webhook is waiting for a response but none is sent back, in n8n, make sure the webhook node is followed by a respond to webhook node, especially for POST requests. also double-check that youâre using the Production webhook URL (not Test) and that the workflow is activated. Iâve hit the same âkeeps loading until timeoutâ issue when one of those was missing
thanks for the reply, but the problem is still persists on my side. i have try it again, in cloud with publish and production url (without test). i tested also the webhook post with and without respond to webhook. For right now only webhook post having issue, webhook get no issue, done the verification with meta. I cannot go to the next step without the webhook post.
Hi @Jothan Welcome!
Since the POST webhook node that you have does not send any HTTP response (there are no downstream nodes and no Respond to Webhook / proper Respond mode set), the webhook from Meta keeps waiting until it times out. Thus, you must configure the webhook to respond immediately or via a Respond to Webhook node so that the request that is initiated can complete up.
Meta docs says that about responding to the webhook Respond to Event Notifications
Your endpoint should respond to all notifications:
with a 200 OK HTTPS response
within 5 or less seconds
(May meta sentâs to you some calls, and your endpoint dindât respond, they may have deactivated your webhook).
I found this response from @MutedJam ( n8n team) that might help you.
âAh, it might be that Facebook/WhatsApp requires both methods. In this case youâd need two webhook nodes in n8n, one for GET and one for POST. Make sure both use the same path and donât forget to manually execute your workflow when using the test URL.â
Thanks for the explanation, but from my situation, i have done 2 webhooks(get and post with same path) and 2 Respond to Webhook node, the first one which Webhook get can reach to Meta and done the verification. Then next i tried to reach the Webhook post by sending the message to the page account, it keep loading until timeout. i have check with other tutorial but dont see the problem yet. You can check from my json above. Thanks again for helping newbie(me) .
@Jothan Test your POST webhook using curl or Postman (not a browser) and immediately follow it up with a Respond to Webhook node sending a 200 OK response so that Meta doesnât wait until timeout.
@Anshul_Namdev I can reach the POST webhook from Postman, with the success respond. But i dont understand why Meta Messenger not working, since i have done the callback url verification and generate the token, Is there any step i miss out??
@Jothan I have searched some of the meta docs and i think you need to alter your Webhook node âRespondâ parameter to âImmediatelyâ to instantly respond 200 OK back to Meta within its required 5âsecond timeout after which the incoming message can be processed asynchronously in the rest of your workflow In the event you need to return data later use another webhook or switch to When Last Node Finishes but ensure the entire workflow has finished before that 5-second period.
@Anshul_Namdev i have set a seperate POST webhook with respond Immediately and Respond Code 200. And then setup a http request node to send message back to meta immediately after this webhook node. But the result is not working, the POST webhook cannot trigger at all, same situation. i re-do everything again by follow youtube video and also the template from n8n, but result the same, no one can help me to reach the POST webhook node