Module pipelines.utils.whatsapp_bot.tasks

Tasks for sending messages through a Whatsapp Bot. This module assumes that the bot inherits from the template bot at https://github.com/prefeitura-rio/whatsapp-bot

Functions

def get_whatsapp_bot_api_url(secret_path: str) ‑> str

Get the URL of the bot API.

Args

secret_path : str
Path to the secret on Vault.

Returns

str
The URL of the bot API.
def send_whatsapp_message(bot_api_url: str, chat_id: str, message: str)

Sends a message through a Whatsapp Bot.

Args

bot_api_url : str
The URL of the bot.
chat_id : str
The chat ID of the bot.
message : str
The message to be sent.

Returns

None Raises: