Messenger ChatBot Automation HTTP Request Error


I’ve been dealing with this problem for awhile, I’m currently trying to create a messenger chatbot and it works! it responds and everything but the thing is it only responds to hello consistently. Whenever I say hello then ask a follow-up question, this error keeps popping up but, it’s not always that case as when I ask it sometimes a question on the niche, it responds. still when I ask another question after that, it gives me this error once more. thoughts on how I can possibly fix this?

Hello and welcome to the community.

How is your HTTP Request node configured?


been doing this for too long that my chatgpt plus got limited :sob:

Can I see the HTTP Request node configuration, not one of the fields?


Or maybe you would like to attach the workflow itself, that would help.

example

Try this for your JSON in HTTP Request node:

{
  "recipient": {
    "id": "{{ $('Webhook').item.json.body.entry[0].messaging[0].sender.id }}"
  },
  "messaging_type": "RESPONSE",
  "message": {
    "text": {{ $json.output.toJsonString() }}
  }
}

The changes:

  • .toJsonString() for the text to overcome new lines in the output
  • quotes are removed, because the input already has quotes
2 Likes

savior, but i’ll still find out later if it’ll work or not since my chatgpt is on cooldown for like 3 more hours

The request is successfully sent and the other side receives this:

When you have a chance try and if it works, come back and mark the answer as solution, or report if it doesn’t.


this is what came up for me after running the json. D:

Bad request, aka http status code 400, means that the request was send, by the remote side didn’t like it and thinks it’s your fault. This means that issue with JSON having the wrong format is solved, now you are having a different issue.

what do you recommend I should do?

Check the IDs, both for sender and recipient, check the token. Try sending the correct request via curl and see if that works.

ily huge help man, really appreciate it

Did you make it work?

yessir all thanks to you

1 Like

All right, kindly mark the most helpful answer as solution then. Thanks!

Appreciate you sharing this challenge - intermittent HTTP request failures can be particularly tricky when scaling a Messenger chatbot workflow. From experience with similar implementations, the most effective solutions typically combine explicit retry logic in the HTTP Request node with immediate logging of response codes so you can spot patterns in Facebook’s rate-limiting.

Have you considered how adding a short Wait node (for example 500 ms) between successive requests might impact your workflow reliability? Facebook often enforces burst limits that only appear after the third or fourth call in quick succession.

One framework I’ve found valuable: 1) track each outgoing call in a lightweight Function node that pushes status and timestamp to a simple internal queue, 2) process that queue with a second workflow that spreads calls over time and automatically retries non-200 responses. It helps prioritize message delivery success rate rather than raw throughput and often reveals unexpected optimization opportunities.

Note: This is general guidance based on common patterns - consult specialists for your specific implementation.