WhatsApp Daily Updates Bot is a simple bot that sends daily weather information and advice, to your WhatsApp account.
Before you begin, make sure you have the following:
- Node.js installed on your machine
- WhatsApp Business API account with a valid token
- OpenWeatherMap API key
- Create a template message called
good_morning
on WhatsApp Business API
Create a template message on WhatsApp called good_morning with the following content:
Good Morning {{1}}! 🌅
🌡Today's Temperature: {{2}}°C
🌡 Feels Like: {{3}}°C
☔ Chance of Rain: {{4}}%
{{5}}
- Fork the repository clicking here
- Clone the repository:
git clone https://github.com/your-username/whatsapp-daily-updates-bot.git
- Navigate to the project directory:
cd whatsapp-daily-updates-bot
- Install dependencies:
npm install
- Create a
.env
file in the project root and add your credentials:
WEATHER_API=xxxxxxxxxxxxxxxxxxxxxxxx // your weather api key
LAT=xxxxxx // your latitude
LON=xxxxxx // your longitude
WA_TOKEN=xxxxxxxxxxxxxxxxxxxxx // your Whatsapp token
WA_ID=xxxxxxxxxxxxxx // your whatsapp number id
OWNER_NAME="Jeffer Marcelino" // your name
OWNER_NUMBER="xxxxxxxx" // your whatsapp number that will receive the messages (includin the ddd, for example for mozambique 25884xxxxxxx)
To run the bot locally, ensure you have the .env
file with valid credentials and execute:
npm start
- Fork the repository.
- Set up the necessary GitHub Secrets in your repository settings using the credentials from the .env file.
Contributions are welcome! If you have suggestions, feature requests, or find a bug, please open an issue or submit a pull request.