WATI Link - https://live-1001.wati.io/
-
Create account in Zoho CRM.
-
Go to https://api-console.zoho.in/ and create a Self Client to get a client ID and a client secret.
-
To generate a grant token, go to Generate Code
- In Scope section, write
AAAServer.profile.read,ZohoCRM.Modules.ALL,ZohoCRM.Bulk.READ,ZohoCRM.org.ALL
. - In Time Duration section, select
10 minutes
. - In Scope Description section, write anything. It does not matter what you write.
- Copy the generated grant token and set
grant_token
equal to it in line19
in init.py - Run init.py to generate a file named
zcrm_oauthtokens.pkl
.
- In Scope section, write
-
Credentials of WATI are stored in wabot.py.
-
To test locally, create an Ngrok server at port
5000
.- Copy the URL obtained from Ngrok.
- Create a webhook in WATI here.
-
Run the server
python app.py
-
Open WhatsApp and start chatting with the bot.
- Follow the steps given here.
- To automate the sending of template messages, go to https://crm.zoho.in/crm/org60008884716/settings/workflow-rules and then create a new workflow rule. Then associate the function created earlier with this workflow rule.