/plushcap/analysis/vonage/vonage-restaurant-is-now-delivering-a-facebook-bot-in-node-js

Restaurant Is Now Delivering: a Facebook Bot in Node.js

What's this blog post about?

This is a tutorial on building a Facebook Messenger bot that checks the status of a user's favorite restaurant using the Wolt API and alerts them when it's online again. The bot uses the Vonage Messages API to send messages to the user. The code sets up an Express server, connects to the Vonage Messages API sandbox, calls the Wolt API for restaurant information, checks if the received restaurant is online, sends a message to the user based on the restaurant status, and continuously checks the list of offline restaurants for a status change. The bot uses an in-memory database to keep track of each restaurant that gets requested. The code also includes features such as sending messages with emojis, adding restaurants to a list of offline restaurants, and using a constant variable SENDER to pass through the sender id information of the Sandbox account. The tutorial provides examples of how to use the Vonage Messages API, Wolt API, and Express server to build a messaging bot.

Company
Vonage

Date published
Oct. 13, 2021

Author(s)
Benjamin Aronov

Word count
2522

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.