airy icon indicating copy to clipboard operation
airy copied to clipboard

WhatsApp Business Cloud API Source

Open steffh opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe.

As an Airy user I want to be able to use the new WhatsApp Business Cloud API (https://developers.facebook.com/docs/whatsapp/cloud-api/get-started/) as a source in Airy an an alternative to the existing twilio_whatsapp source

Describe the solution you'd like

  • [x] the new source (e.g. name whatsapp_cloud) should be installable and configurable via airy.yaml and via control-center
  • [x] #3533
  • [x] #3534
  • [x] #3535
  • [ ] we should be able to send template messages to the source (https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-message-templates)
  • [ ] #3536

Describe alternatives you've considered

Additional context

steffh avatar Jul 20 '22 08:07 steffh

Looking at sending messages the idea would be to wrap them like this:

POST /messages.send

{
 "conversation_id": "UUID",
 "channel_id": "UUID",
 "message": {
  "type": "text",
    "text": { // the text object
      "preview_url": false,
      "body": "MESSAGE_CONTENT"
    }
  }
}

Would that work to populate the other values ("messaging_product", "recipient_type" and "to") if not set automatically from channel_id and conversation_id / source_recipient_id respectively?

steffh avatar Jul 27 '22 09:07 steffh

@steffh yes that would work. infact this is how it currently works with the Facebook source, too.

I am splitting this ticket into a milestone

chrismatix avatar Aug 03 '22 16:08 chrismatix

All sub-issues completed. Template messages can be send by default due to the transparent nature of our send mechanism

chrismatix avatar Sep 27 '22 11:09 chrismatix