Whatsapp-bot - Whatsapp chatbot build with python and twilio

Overview

Whatsapp-bot

This is a Whatsapp Chatbot that responds with quotes, reply owners name, search internet for meaning of any word.

Usage

  1. Download and install Python. Version 3 and above should come with pip.

  2. Clone or fork this repository (project).

    $ git clone https://github.com/arinzejustin/whatsapp-bot.git
    
    $ cd whatsapp-bot
    
  3. Create a virtual environment inside this project directoy e.g.,

    python -m venv whatsapp-bot-venv
    

    Then activate that environment:

    Windows: whatsapp-bot-venv\Scripts\activate
    
    Mac: $ source whatsapp-bot-venv/bin/activate
    
  4. Install the following dependencies: twilio, flask, requests, beautifulsoup, wikipedia.

    $ pip install twilio flask requests beautifulsoup4 wikipedia
    
  5. Run the Flask application
    Start by setting (exporting) the FLASK_APP environment variable

    Windows: set FLASK_APP=bot.py
    
    Mac: $ export FLASK_APP=bot.py
    

    Run this command afterwards:

    python -m flask run
    
  6. Test the chatbot.

    a. Download ngrok. From your CLI (terminal or CMD), navigate to the ngrok directory and run this command:

     $ ngrok http -region=eu 5000
    

    Copy the URL where you see Forwarding. It will look like this https://510f-197-211-63-19.eu.ngrok.io.

    ngrok jpg

    b. Create an account on Twilio and navigate to the Whatsapp Sandbox. Follow the instructions from Twilio to get a test whatsapp account. At the end of the setup, paste the url you copied earlier into the input field with the label WHEN A MESSAGE COMES IN. At the end of the URL, add '/chatbot' and hit save.

    See the screenshot below:

    twilio jpg

    Bonus: You can create a customized link for your Whatsapp chatbot. Use this template: http://wa.me/<phone-number-from-twilio>?text=<code-to-join-sandbox>.

    twilio whatsapp number jpg

    Send the link to your friends to try out the chatbot.

Technologies Used

  • Python, Flask framework
  • Twilio
  • ngrok
  • wikipedia
  • beautifulsoup

Contact

Send me an email
Visit my website

License GitHub

See license

Owner
arinzejustinng
Iโ€™m a self-taught Front End Developer and a little bit backend Developer, an Economics student from Nigeria. I like knowing logic behind any application
arinzejustinng
this synchronizes my appearances with my calendar

Josh's Schedule Synchronizer Here's the "problem:" I use a spreadsheet to maintain all my public appearances. I check the spreadsheet as often as poss

Josh Long 2 Oct 18, 2021
Automatically Message From Discord Account

Discord-AutoMessage A robust and versatile solution for automated social interactions HOW TO INSTALL Open cmd cd into your project directory Run the f

13 Jul 11, 2022
A fork of discord.py for anime enjoyers

A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Modern Pythonic API using async and await

Senpai Development 4 Nov 05, 2021
EC2 that automatically move files received through FTP to S3

ftp-ec2-s3-cf EC2 that automatically move files received through FTP to S3 Installation CloudFormation template Deploy now! Usage IP / domain name: ta

Javier Santana 1 Jun 19, 2021
Coronavirus whatsapp chatbot to give real time info on covid

Covy Developed a coronavirus whatsapp chatbot which gives case counts in a particular district, city, state or country. It also predicts future cases

Devinco (Rachit) 0 Oct 03, 2021
Sends notifications when Pokemon Center products are in stock

Sends notifications when Pokemon Center products are in stock! If you use this for scalping, I will break your kneecaps

2 Jan 20, 2022
Yes, it's true :two_hearts: This repository has 316 stars.

Yes, it's true! Inspired by a similar repository from @RealPeha, but implemented using a webhook on AWS Lambda and API Gateway, so it's serverless! If

510 Dec 28, 2022
An Inline Telegram YouTube Downloader bot with custom, permanent thumbnail support and cancel upload facility. Make your fork now.

Inline-Tube-Mate (YouTube Downloader) An Inline Telegram bot that can download YouTube videos with permanent thumbnail support Bot need to be in Inlin

Renjith Mangal 41 Dec 14, 2022
ARKHAM X GOD MULTISPAM BOT

ARKHAM-X-GOD-MULTISPAM-BOT ๐——๐—˜๐—ฃ๐—Ÿ๐—ข๐—ฌ ๐—จ๐—ฃ๐—ง๐—ข 30 ๐—•๐—ข๐—ง๐—ฆ ๐—œ๐—ก ๐—” ๐—ฆ๐—œ๐—ก๐—š๐—Ÿ?

ArkhamXGod 2 Jan 08, 2022
A multi purpose discord bot for python

Sypher The best multi purpose discord bot. Add Sypher right now Invite Me | Join

Johan Naizu 1 Dec 15, 2022
Automate and Manage Telegram Channels

Channel Automation Bot @ChannelAutomateBot A star โญ from you means a lot to us! Telegram bot to automate and manage channels. Usage Deploy to Heroku T

Stark Bots 61 Dec 29, 2022
AWS Blog post code for running feature-extraction on images using AWS Batch and Cloud Development Kit (CDK).

Batch processing with AWS Batch and CDK Welcome This repository demostrates provisioning the necessary infrastructure for running a job on AWS Batch u

AWS Samples 7 Oct 18, 2022
Analyzed the data of VISA applicants to build a predictive model to facilitate the process of VISA approvals.

Analyzed the data of Visa applicants, built a predictive model to facilitate the process of visa approvals, and based on important factors that significantly influence the Visa status recommended a s

Jesus 1 Jan 08, 2022
A module to complement discord.py that has Music, Paginator and Levelling.

discord-super-utils A modern python module including many useful features that make discord bot programming extremely easy. Features Modern leveling m

Yash 106 Dec 19, 2022
TuShare is a utility for crawling historical data of China stocks

TuShare Tushare Pro็‰ˆๅทฒๅ‘ๅธƒ๏ผŒ่ฏท่ฎฟ้—ฎๆ–ฐ็š„ๅฎ˜็ฝ‘ไบ†่งฃๅ’ŒๆŸฅ่ฏขๆ•ฐๆฎๆŽฅๅฃ๏ผ https://tushare.pro TuShareๆ˜ฏๅฎž็Žฐๅฏน่‚ก็ฅจ/ๆœŸ่ดง็ญ‰้‡‘่žๆ•ฐๆฎไปŽๆ•ฐๆฎ้‡‡้›†ใ€ๆธ…ๆด—ๅŠ ๅทฅ ๅˆฐ ๆ•ฐๆฎๅญ˜ๅ‚จ่ฟ‡็จ‹็š„ๅทฅๅ…ท๏ผŒๆปก่ถณ้‡‘่ž้‡ๅŒ–ๅˆ†ๆžๅธˆๅ’Œๅญฆไน ๆ•ฐๆฎๅˆ†ๆž็š„ไบบๅœจๆ•ฐๆฎ่Žทๅ–ๆ–น้ข็š„้œ€ๆฑ‚๏ผŒๅฎƒ็š„็‰น็‚นๆ˜ฏๆ•ฐๆฎ่ฆ†็›–่Œƒๅ›ดๅนฟ๏ผŒๆŽฅๅฃ

ๆŒ–ๅœฐๅ…” 11.9k Dec 30, 2022
Telegram bot to scrape images from the reddit universe

Telegram bot to scrape images from the reddit universe

XD22 3 Sep 30, 2022
Telegram Bot for everyday raffles

SpinEverydayBot v2 Telegram bot for everyday raffles. HIGHLY EXPERIMENTAL! WORK IN PROGRESS! Setting up Requirements Python 3.9+ PostgreSQL 13+ Older

evgfilim1 18 Dec 20, 2022
Data portal client and server for NMDC.

NMDC Server and Client Portal Getting started with Docker install ldc install submodules via git submodule update --init --recursive In order to popul

National Microbiome Data Collaborative 7 Dec 14, 2022
See GitHub API on terminal

gitbees About gitbees uses the GitHub API to show user data and ``repos` Using Make sure you have a python interpreter and then python gitbees.py Lice

Marcello Belanda 1 Nov 29, 2021