Suretriggers.com: built in actions
In this article, we will review the available actions in SureTriggers.com and guide you on how to use them effectively.
Send Message to New Chat
- Sends a message to a new chat.
Send Message to Existing Chat
- Sends a message to an existing chat.
Close Chat
- Closes a chat.
Find Chat
- Finds a specific chat.
Below is a detailed guide on setting up an example workflow:
Create a Trigger
- Start by creating a "New Message" trigger (you can find instructions here).
Create a Branch
- Click the "+" button to add a Branch, and set up a simple Yes/No branching flow.
Search for the Branch App
- In the event options, search for and select "Branch."
Configure the Condition
- Under the "Configure" tab, set the Condition to ‘Message Text’ (the message received from the trigger).
- Select the Operator 'Contains' and for Value, enter ‘test’ (In the Value field, you can select any word from the received message. In this example, we chose 'test' since it is a test message.)
Test the Condition
- Click "Continue", and under the "Test" tab, run a test to ensure the condition is valid. If successful, it should return 'true'. Once confirmed, click "Save."
Add an Action Module
- Under the "Yes" branch, click the "+" button to create an Action module.
Search and Select TimelinesAI
- Choose the TimelinesAI app and select the event “Send Message to Existing Chat.”
Connect to TimelinesAI
- Select the connection (or add a new one). Create a title for the connection and enter your TimelinesAI API token, which can be found here.
Map the Chat ID
- Under the "Configure" tab, toggle the "Map" button and input "@" to select the Chat ID from the message received in the trigger.
Compose Your Message
- In the "Message Text" field, compose the message you would like to send.
Test Your Action
- Run a test to ensure everything works correctly.
Now your action workflow is ready! You can send automated messages based on the conditions you've set.
Available Actions:
Send Message to New Chat
- Sends a message to a new chat.
Send Message to Existing Chat
- Sends a message to an existing chat.
Close Chat
- Closes a chat.
Find Chat
- Finds a specific chat.
Example
Below is a detailed guide on setting up an example workflow:
Create a Trigger
- Start by creating a "New Message" trigger (you can find instructions here).
Create a Branch
- Click the "+" button to add a Branch, and set up a simple Yes/No branching flow.
Search for the Branch App
- In the event options, search for and select "Branch."
Configure the Condition
- Under the "Configure" tab, set the Condition to ‘Message Text’ (the message received from the trigger).
- Select the Operator 'Contains' and for Value, enter ‘test’ (In the Value field, you can select any word from the received message. In this example, we chose 'test' since it is a test message.)
Test the Condition
- Click "Continue", and under the "Test" tab, run a test to ensure the condition is valid. If successful, it should return 'true'. Once confirmed, click "Save."
Next Step: Creating the Action
Add an Action Module
- Under the "Yes" branch, click the "+" button to create an Action module.
Search and Select TimelinesAI
- Choose the TimelinesAI app and select the event “Send Message to Existing Chat.”
Connect to TimelinesAI
- Select the connection (or add a new one). Create a title for the connection and enter your TimelinesAI API token, which can be found here.
Map the Chat ID
- Under the "Configure" tab, toggle the "Map" button and input "@" to select the Chat ID from the message received in the trigger.
Compose Your Message
- In the "Message Text" field, compose the message you would like to send.
Test Your Action
- Run a test to ensure everything works correctly.
Now your action workflow is ready! You can send automated messages based on the conditions you've set.
Updated on: 28/10/2024
Thank you!