Introduction

Actions are tools that can help you automate tasks related to SMS and WhatsApp messages. They can be used to listen for events, such as sending or receiving messages, and then take action based on those events. This can be used to create automated tasks, such as logging events, calling a remote URL, or automatically replying to messages.

Types of Actions

There are two types of actions: hooks and autoreplies.

  • Hooks: Hooks listen for events from SMS and WhatsApp. They are similar to webhooks, but they also allow listening for send events and only use the GET method. Hooks also allow you to structure the link yourself.
  • Autoreplies: Autoreplies automate the task of replying to received messages if a keyword is found in them. You will have to decide on what keywords to use and what reply message you want to send.

Use Cases

Here are some use cases for actions:

  • Log events to your own server: You can use actions to log events to your own server. This can be useful for tracking customer interactions or for analyzing data to improve your marketing campaigns.
  • Call a remote URL: You can use actions to call a remote URL. This can be useful for sending notifications to users or for sending reports to administrators.
  • Automatically reply to messages: You can use actions to automatically reply to messages. This can be useful for providing customer support or for sending promotional messages.

How It Works

Actions are triggered by events. When an event occurs, such as a user sending an SMS message, the system will invoke the action and send the payload data. The action will then receive the payload data and can do anything with it.