Home » excel » android – Generate whatsapp groups from contacts automatically

android – Generate whatsapp groups from contacts automatically

Posted by: admin May 14, 2020 Leave a comment

Questions:

The issue I have is that I have an excel database full of phone numbers and emails and I want to make an android app that will extract those numbers from the excel file to whatsapp groups automatically ( I dont want to add them manually )

How to&Answers:

This is possible-ish. I just did it, but in the most clumsy way possible and not on a app like you asked.

I opened a dummy google account. Saved a contact, export that contact as csv to get the google csv format. Modified the csv file and added my data (all my contacts). Imported my modified csv to my google contacts. Synced the google contacts on my android phone. Synced the added contacts to WhatsApp. Opened the WhatsApp App on my computer. Wrote the following python script and let it run.

from pyautogui import hotkey, press, typewrite 

hotkey('alt', 'tab')
for i in range(0,num_of_contacts):
  typewrite("name_of_contact")
  press('enter')

For the script to work (this is the clumsy part) you have to have only two windows open on your computer. The script basically switches to the WhatsApp app window and types in the data for you. So you prepare the WhatsApp app to be ready to start typing in names to create the group. The script wont work as is. You can modify it to read the names from a file. I suggest you use names like “member1001, member1002 …” instead of the numbers, as the numbers are in the country code format, and that makes it a bit harder to format them beforehand correctly.

I only tested and done it on linux, it should work on windows too.

This is probably the worst way to actually achieve the desired result, but it worked for me.