Giter VIP home page Giter VIP logo

frappe_whatsapp's Introduction

Frappe Whatsapp

WhatsApp integration for frappe. Use directly meta API's without any 3rd party integration.

whatsapp

Note: If your not using live credential follow the step no 2 to add the number on meta to which your are sending message

Installation Steps

Step 1) One time to get app

bench get-app https://github.com/shridarpatil/frappe_whatsapp

Step 2) to install app on any instance/site

bench --site [sitename] install-app frappe_whatsapp

Send whatsapp notification from frappe app based on docevents.

Get your whats app credentials

A temporary token (Expires every 23 hours) will be available in the WhatsApp API configuration until you configure a system user with a permanent token, note that the sytem user should have the necessary API permissions in order to manage templates and messages https://developers.facebook.com/docs/whatsapp/cloud-api/get-started

The relevant Credentials Are:

  1. Token (Either the temporary token from the get-started link above, or the permanent System User Token if you have generated one)
  2. URL (Which should be https://graph.facebook.com)
  3. Version (Note the verion you have provisioned for the System User or what is current on the API)
  4. Phone ID (Available from get-started above)
  5. Business ID (Available from get-started above)
  6. APP ID (Available from get-started above)
  7. (Optional) Webhook Verify Token (Generate your own secure token and neter it here, however remember to this token when you create your webhook on the Meta Developer Dahsboard as you will need to provide it there)

Enter whatsapp credentials

image

Create Template

Note the Template Name you enter here should not contain spaces or capitalisation as this will be used by the Meta API and your Notifications, i.e. use "new_notification_name" instead of "New Notification Name". image

Create notifications

Note the use of the "Field Name" which references the Mobile number to be sued from the DocType you are using in the notification. You may need to create a mobile_no field (correctly formatted, i.e. country code and mobile number) in the relevant DocType. whatsapp_notification frappe_whatsapp supports all docevents as per Frappe, i.e. Before Insert, Before Validate, Before Save, After Save, Before Submit, After Submit, Before Cancel, After Cancel, Before Delete, After Delete, Before Save (Submitted Document) and, After Save (Submitted Document).

Sending text message without creating template

Create an entry in the WhatsApp message. On save it will trigger and whats app API to send a message, note that this will not work if the recipient number has not sent a message to the sender in the last 24 hours as per Meta API Rules. image

WhatsApp messages are received via WhatsApp cloud API. image

outgoing (1)

Incomming message

  • Setup webhook on meta
    • Add verify token on meta and update the same on whatsapp settings
    • Add webhook url on meta <your domain>/api/method/frappe_whatsapp.utils.webhook.webhook
  • Add apropriate webhook fields
    • messages to receive message
    • add other required web fields

Incoming Message for WhatsApp Flows will look like this Screenshot 2024-03-07 at 10 56 27

License

MIT

frappe_whatsapp's People

Contributors

shridarpatil avatar shariquerik avatar chechani avatar vineyrawat avatar ashish-greycube avatar mohsinalimat avatar buff0k avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.