Before starting, please make sure:

  • You've successfully added an Essential, Expert, or Custom plan with CloudTalk

  • Your team has a Slack channel which has been connected with CloudTalk

  • Token permissions for your team Slack channel include chat:write permissions, meaning your workplace allows data coming in from another app to post on Slack channels in place of an individual user. You can reference the Slack API help guide to read about how Slack tokens work.

Setting up Automation

You will start by logging into your CloudTalk Dashboard. On the lefthand side of the screen, you will see a list of other tabs under Dashboard. To reach the automations tab, click on Account > Workflow Automations.

Click the blue button to + Add Workflow.

You can give your new Workflow Automation a name to distinguish it from other automated tasks you set up.

Sending a Slack SMS Notification

In this example, we will use Workflow Automation to automate sending a notification to Slack in response to an SMS received. This one of many ways to automate workflow with CloudTalk.

Example Goal:

  • Forward a text message from an important client to the team Slack channel.

Steps:

  1. Start by defining a trigger. In this example, our trigger will be the receipt of an SMS. Under Object, we will select sms. For Action, we select received.

    Adjust your own specifications as necessary.

  2. Now we can choose to set up an optional condition. The condition will define an additional situation or category that must be met in order for our automated Slack notification to go out.

    You can add multiple conditions, or choose to undo conditions you have set by clicking the triple dots in the righthand corner of the box and clicking delete.

  3. In our example, we only care if the SMS which was received (our trigger) was a from a particular important client. Therefore, we want to set a condition wherein the system will check if SMS sender has the same number as the important client. To populate the field correctly, click into the first box labeled Property, and view the list of available phrases to the right, labeled under Useful data for your Workflow. We will choose the phrase labeled sender.

    Important: You must choose from this list of tag words in order for your condition to work correctly. You should see the Property box populate with a value that looks like the structure of the one in the picture (event.properties.tags) 

  4. In the second box labeled Operand, we will choose is equal to from the dropdown list. When selecting your own operand, make sure it fits logically into your final statement (e.g., "is greater than or equal to" would best be paired with a number value).

  5. In the third box, we fill in the value which we want the sender to be equal to in order for our action to occur. Refer to the paired Example Values in the Useful data for your Workflow sidebar. In our example, the suggested value will be the important client's phone number, entered in the format shown.

    Click Confirm and continue. We have just created a condition that will scan the CloudTalk numbers of all SMS messages received, checking if the sender number is equivalent to the important client's number.

  6. The next step is to choose an action which will happen when our conditions are met. We select the Action type Send notification to Slack.

  7. Under Values, various Keys should appear with their boxes already populated. These cannot be edited. The input token should autofill the first Key box. The x's which populate the Value box for Key: token are only placeholders. In order to connect to Slack, we must create a new token to enter here. In a separate tab, visit Slack's App Directory on your desktop and click on Installed apps, searching for and selecting CloudTalk. Copy and paste the generated token into the Value box. Refer to the Slack help center for additional guidance on Slack tokens.

  8. Enter the name of your Slack channel in the Value box for Key>channel. Our Slack channel name here is #client-text. Next to Key>text, we choose to enter a dynamic value, or a value that will populate based on information from the system. To accomplish this, we will once again click into the box in question, then click on a keyword from the Useful data for your Workflow section.

  9. We have chosen three dynamic values for the text or content portion of our message which will send to slack. We know the Slack notification will contain the content of the SMS received, the sender of the SMS, and the receiver of the SMS.

  10. We can choose to Test now to make sure our conditions are working correctly. Be aware that clicking Submit for a Test will send a real Slack notification to the channel input in the Channel value. It's a good idea to make your team aware of the testing process.

  11. Remember to Save or Save and activate to put the automated Slack notification in place immediately.

We have now accomplished our goal of forwarding a text message from an important client to the team Slack channel, a process which we can later edit and toggle off or on at our choosing.

Troubleshooting Tips

  • When it comes to Slack:

    • Confirm your team's Slack app is up and running and that you are signed in

    • Check that you have successfully authorized Slack to access CloudTalk

    • Make sure your token scopes include chat:write permissions. Refer to the Slack API guides or the Slack help center for assistance.

  • Faulty conditions are often the result of unrecognized inputs in the Property box, or inputs in the Value box which will always result in no matches.

  • After clicking into the Property box, you must click one of the pre-selected keywords within the Useful data for your Workflow section to the right.

  • You can also refer to the Useful data for your Workflow section to validate whether the Value you entered seems to be a good match for the property you've chosen.

  • When setting a value for a condition that searches entered phone numbers, make sure you are using the number recognized through CloudTalk. Format matters. If the suggested value example in the Useful data for your Workflow section has a number with the format "+555555555555" (no hyphens included) but the entered value looks like "+555-555-555-555" (hyphens included), your condition will never find matches.


Related Links

What is a trigger?

What is an action?

What are conditions?

Did this answer your question?