All Projects → inforkgodara → python-automated-bulk-whatsapp-messages

inforkgodara / python-automated-bulk-whatsapp-messages

Licence: other
It is a python script to send automated bulk WhatsApp messages to multiple recipients from an excel sheet at once.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to python-automated-bulk-whatsapp-messages

tithiwa
Automate Web WhatsApp with selenium in python.
Stars: ✭ 17 (-69.64%)
Mutual labels:  whatsapp, whatsapp-web, whatsapp-bot, web-whatsapp, python-automation
whatsapp-http-api
WhatsApp HTTP API that you can configure in a click!
Stars: ✭ 229 (+308.93%)
Mutual labels:  whatsapp, whatsapp-web, whatsapp-bot, whatsapp-automation
Whatsapp Web.js
A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app
Stars: ✭ 4,103 (+7226.79%)
Mutual labels:  whatsapp, whatsapp-web, whatsapp-bot
whatsapp-bot
whatsapp bot build with nodejs
Stars: ✭ 62 (+10.71%)
Mutual labels:  whatsapp, whatsapp-web, whatsapp-bot
wappdriver
Wondering how to send WhatsApp messages using Python using only 3 lines of code? You have come to the right place!
Stars: ✭ 40 (-28.57%)
Mutual labels:  whatsapp, whatsapp-web, whatsapp-bot
automato
🎉🎉 ( v2 ) Web Application to automate sending Whatsapp, SMS & Email* campaigns
Stars: ✭ 92 (+64.29%)
Mutual labels:  marketing-automation, whatsapp-web, whatsapp-bot
whatsapp-bot
This is a Node.js console app containing Whatsapp handler using reactive methods to response messages as chatbot. Simple but useful project to start developing a complex NON-OFFICIAL Whatsapp chatbots.
Stars: ✭ 33 (-41.07%)
Mutual labels:  whatsapp, whatsapp-web, whatsapp-bot
whatsapp-bot
Piyobot adalah whatsapp bot pintar
Stars: ✭ 124 (+121.43%)
Mutual labels:  whatsapp, whatsapp-web, whatsapp-bot
wppconnect-server
Wppconnect Server is a ready-to-use API, just download, install, and start using, simple as that.
Stars: ✭ 290 (+417.86%)
Mutual labels:  whatsapp, whatsapp-web, whatsapp-bot
Whatsapp-Botto-Void
A fully Object Oriented WhatsApp bot built with TypeScript
Stars: ✭ 64 (+14.29%)
Mutual labels:  whatsapp, whatsapp-bot
WhiteDevil
🌀Quick Response Whatsapp Bot🌀
Stars: ✭ 45 (-19.64%)
Mutual labels:  whatsapp-web, whatsapp-bot
whatabomb
A whatsapp bombing GUI Script
Stars: ✭ 84 (+50%)
Mutual labels:  whatsapp, whatsapp-web
WhatsappWeb4j
Standalone fully-featured Whatsapp Multi Device Web API for Java and Kotlin
Stars: ✭ 198 (+253.57%)
Mutual labels:  whatsapp-web, whatsapp-bot
mautic-advanced-templates-bundle
Plugin extends default email template capabilities with TWIG block so you can use advanced scripting techniques like conditions, loops etc
Stars: ✭ 63 (+12.5%)
Mutual labels:  marketing, marketing-automation
WaWebSessionHandler
(DISCONTINUED) Save WhatsApp Web Sessions as files and open them everywhere!
Stars: ✭ 27 (-51.79%)
Mutual labels:  whatsapp, whatsapp-web
whatsapp-auto-messenger
Automatic message sender using WhatsApp Web at fixed interval.
Stars: ✭ 43 (-23.21%)
Mutual labels:  whatsapp-web, whatsapp-auto-messaging
whatsapp-bot
Made with Python and Selenium, can be used to send multiple messages and send messages as characters made of emojis
Stars: ✭ 34 (-39.29%)
Mutual labels:  whatsapp, whatsapp-bot
bot-whatsapp
Unmaintained - Multipurpose WhatsApp Bot 🤖 using open-wa/wa-automate-nodejs library! ✨
Stars: ✭ 78 (+39.29%)
Mutual labels:  whatsapp, whatsapp-bot
whatsie
Qt Based WhatsApp Client
Stars: ✭ 437 (+680.36%)
Mutual labels:  whatsapp, whatsapp-web
Stickerworld
Bot for whatsapp that automatically generates Sticker from the images or videos it receives
Stars: ✭ 47 (-16.07%)
Mutual labels:  whatsapp, whatsapp-bot

Python Automated Bulk WhatsApp Messages

It is a python script that sends WhatsApp message automatically from WhatsApp web application with saved contact numbers. It can be configured to send advertising messages to customers. It read data from an excel sheet and send a configured message to people.

Demo

Note

This is for saved contact numbers only if you want to send whatsapp bulk messages to unsaved or without saving the contact numbers. You may prefer another repository.

Important

  • If this repository helped you to understand at least something new please give star this repository which motivates me to work further for the similar kinds for projects.

Prerequisites

In order to run the python script, your system must have the following programs/packages installed and the contact number should be saved in your phone (You can use bulk contact number saving procedure of email). There is a way without saving the contact number but has the limitation to send the attachment.

Approach

  • User scans web QR code to log in into the WhatsApp web application.
  • The script reads a customized message from excel sheet.
  • The script reads rows one by one and searches that contact number in the web search box if the contact number found on WhatsApp then it will send a configured message otherwise It reads next row.
  • Loop execute until and unless all rows complete.

Note: If you wish to send an image instead of text you can write attachment selection python code.

Legal

  • This code is in no way affiliated with, authorized, maintained, sponsored or endorsed by WhatsApp or any of its affiliates or subsidiaries. This is an independent and unofficial software. Use at your own risk. Commercial use of this code/repo is strictly prohibited.

Code

# Program to send bulk customized message through WhatsApp web application
# Author @inforkgodara

from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
from selenium.common.exceptions import NoSuchElementException
import pandas
import time

# Load the chrome driver
driver = webdriver.Chrome()
count = 0

# Open WhatsApp URL in chrome browser
driver.get("https://web.whatsapp.com/")
wait = WebDriverWait(driver, 20)

# Read data from excel
excel_data = pandas.read_excel('Customer bulk email data.xlsx', sheet_name='Customers')
message = excel_data['Message'][0]

# Iterate excel rows till to finish
for column in excel_data['Name'].tolist():
    # Locate search box through x_path
    search_box = '//*[@id="side"]/div[1]/div/label/div/div[2]'
    person_title = wait.until(lambda driver:driver.find_element_by_xpath(search_box))

    # Clear search box if any contact number is written in it
    person_title.clear()

    # Send contact number in search box
    person_title.send_keys(str(excel_data['Contact'][count]))
    count = count + 1

    # Wait for 3 seconds to search contact number
    time.sleep(3)

    try:
        # Load error message in case unavailability of contact number
        element = driver.find_element_by_xpath('//*[@id="pane-side"]/div[1]/div/span')
    except NoSuchElementException:
        # Format the message from excel sheet
        message = message.replace('{customer_name}', column)
        person_title.send_keys(Keys.ENTER)
        actions = ActionChains(driver)
        actions.send_keys(message)
        actions.send_keys(Keys.ENTER)
        actions.perform()

# Close Chrome browser
driver.quit()

Note: The script may not work in case if the HTML of web WhatsApp is changed.

Find it on youtube. https://youtu.be/NcWXpsczl3c

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].