novu icon indicating copy to clipboard operation
novu copied to clipboard

Add Whatsapp business as provider

Open vitoorgomes opened this issue 1 year ago • 1 comments

What change does this PR introduce?

This PR adds the option to use WhatsApp Business as a provider. The requested issue is #1019.

Although there is already a PR opened, I decide to create this fresh one for two main reasons: firstly because I don't think the OP it's working anymore on that based on replies not being answered and secondly because it only implements sending message as a template, where the Meta API allows to send it as a simple text as well, I wanted to give a little more customization to the user.

There some improvements that could be done here, but they aren't breaking changes, so I think it's worth to open this now, like allowing some other configurations like preview_url and other fields available in the Meta's API.

There is also the #2689 issue, while it's valid, it would be nice to have this provider as a SMS now, and port this later when Chat Providers are able to receive more data following this issue thread updates.

Why was this change needed?

This Closes #1019 and Closes #4128

Other information (Screenshots)

SCR-20240223-pxj SCR-20240223-pxe

vitoorgomes avatar Feb 23 '24 21:02 vitoorgomes

Deploy Preview for dev-web-novu ready!

Name Link
Latest commit 86d79e616c0a7c53d75b07cf84f8d8ea955d254d
Latest deploy log https://app.netlify.com/sites/dev-web-novu/deploys/66316b659506260008267f07
Deploy Preview https://deploy-preview-5232--dev-web-novu.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Feb 23 '24 21:02 netlify[bot]

@vitoorgomes Thanks for bringing this to our attention, we will take a look at it as soon as we can!

Cliftonz avatar Mar 04 '24 16:03 Cliftonz

@vitoorgomes What are the other improvements you think could be done?

Cliftonz avatar Mar 04 '24 16:03 Cliftonz

@vitoorgomes What are the other improvements you think could be done?

Meta's API docs have lots of options to send a message, with media, location and so on, but since they don't affect the usability as of right now, I've decided to not try to implement it, because it would need a lot effort to be able to define each property but could be done in the future as devs request

vitoorgomes avatar Mar 07 '24 16:03 vitoorgomes

@vitoorgomes There is two things you need to fix here.

  1. The hard coded authentication header
  2. adding the whatsapp names to the cspell list

done

vitoorgomes avatar Mar 15 '24 20:03 vitoorgomes

Deploy Preview for novu-design ready!

Name Link
Latest commit 86d79e616c0a7c53d75b07cf84f8d8ea955d254d
Latest deploy log https://app.netlify.com/sites/novu-design/deploys/66316b659304f10008d64b08
Deploy Preview https://deploy-preview-5232--novu-design.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Apr 30 '24 15:04 netlify[bot]

thanks a lot for helping out @scopsy I didn't saw the last request changes notification, totally my bad

really happy that this was merged 🥳🤝

vitoorgomes avatar Apr 30 '24 22:04 vitoorgomes

Thank you @vitoorgomes so much for your contribution ❤️ and sorry it took a while to merge 🙏

scopsy avatar Apr 30 '24 22:04 scopsy