using ngrok to expose a webhook on node-red that receives a whatsapp.

The flow attached exposes a webhook using NGROK. The webhook then receives the content of a whatsapp msg on node-red.

This is the flow used on this video: https://youtu.be/7FHbfo-wRtY

[{"id":"f5e0f4ecdd624eb1","type":"inject","z":"a2b5a95f0173aba2","name":"buttons","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"text\":\"This is a button message\",\"footer\":\"Hello from whin\",\"buttons\":[{\"buttonId\":\"id1\",\"buttonText\":{\"displayText\":\"Button 1\"},\"type\":1},{\"buttonId\":\"id2\",\"buttonText\":{\"displayText\":\"Button 2\"},\"type\":1},{\"buttonId\":\"id3\",\"buttonText\":{\"displayText\":\"Button 3\"},\"type\":1}],\"headerType\":1}","payloadType":"json","x":290,"y":160,"wires":[["7801cb451d36396a"]]},{"id":"087c3e77df8d470e","type":"inject","z":"a2b5a95f0173aba2","name":"text","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"text\":\"this is a text sent from whin\"}","payloadType":"json","x":290,"y":200,"wires":[["7801cb451d36396a"]]},{"id":"5a5f36cf66ee4c50","type":"inject","z":"a2b5a95f0173aba2","name":"location","props":[{"p":"payload"},{"p":"gid","v":"120363027390404940","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"location\":{\"degreesLatitude\":40.4526941,\"degreesLongitude\":-3.6897589}}","payloadType":"json","x":290,"y":240,"wires":[["7801cb451d36396a"]]},{"id":"7801cb451d36396a","type":"whin-send","z":"a2b5a95f0173aba2","name":"","auth":"8ca5bee63f59f76d","x":570,"y":200,"wires":[[]]},{"id":"a73144cf0b19dcd0","type":"debug","z":"a2b5a95f0173aba2","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":560,"y":320,"wires":[]},{"id":"55579e90ca79d6e8","type":"ngrok","z":"a2b5a95f0173aba2","buttonState":false,"port":"","portType":"node-red","host":"","hostType":"localhost","creds":"here-goes-ngrok-key","region":"us","regionType":"us","proto":"http","bind_tls":"both","bind_tlsType":"both","subdomain":"","subdomainType":"none","auth":"","authType":"none","hostHeader":"","hostHeaderType":"none","name":"","inputtype":"button","inputs":0,"x":290,"y":320,"wires":[["a73144cf0b19dcd0"]]},{"id":"23050170c62130fa","type":"http in","z":"a2b5a95f0173aba2","name":"","url":"/demo","method":"post","upload":false,"swaggerDoc":"","x":290,"y":420,"wires":[["18cab0e3db47f6f4","a73144cf0b19dcd0"]]},{"id":"18cab0e3db47f6f4","type":"http response","z":"a2b5a95f0173aba2","name":"","statusCode":"200","headers":{},"x":480,"y":460,"wires":[]},{"id":"8ca5bee63f59f76d","type":"whin-config","name":"luis-jaras","apikey":"here-goes-whin-apikey"},{"id":"2823e734e7613430","type":"ngrokauth","name":"ngrok lu4t"}]

Flow Info

Created 2 years, 8 months ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Core
  • debug (x1)
  • http in (x1)
  • http response (x1)
  • inject (x3)
Other

Tags

  • ngrok
  • whatsapp
  • whin
  • webhook
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option