The Automations feature empowers you to build custom workflows through built-in Unthread actions, 3rd party integrations, and custom code.
Example use-cases for automations:
Because Unthread can automatically track conversations, you can set up actions to be kicked off on different events.
Triggers include:
Run automations on an interval (daily, weekly, monthly) and at a specific time.
You can manually trigger an automation from your dashboard to kick off actions. You’ll automatically have the context of the conversation passed into the action, and you can optionally configure additional input fields that required before the automation can be started.
When a reaction is applied to a conversation, you can trigger an automation to run.
We’ll generate a unique URL for your automation to be kicked from a 3rd party system.
You can optionally add filters that will only start the automation if the conversation matches filters around ticket type, status, customer, assignee, and more.
Unthread has a number of built-in actions that can be used to trigger other automations, send messages, and more.
You can write your own code for full control over the actions, success handling, and error handling. Code by default is written in TypeScript, and will contain references to your conversations, your Unthread account, and any stored secrets (see more below).
We provide code snippets of common actions so you get the full flexibility of controlling the actions, success handling, and error handling, while also not needing to write code yourself.
When making requests to 3rd party services, any API keys or sensitive information need to be encrypted rather than stored in code.
You can store secrets in the “Configuration” > “Secrets” section of your dashboard. You reference them in your code by using the secrets
variable in your function signature (see example above).
Using our Secret Management system, we’ll encrypt your secrets using Google’s 256-bit encrypted Key Management System.
We provide a key-value storage system to maintain a persistent store of data to be used in your custom code.
For example, if you want to send a CSAT survey if it’s been at least 1 week since the last survey, you can store and check the last survey send date from your key-value store.
Using Automations, you can write custom code to dynamically pull a list of options for a given input field.
This is useful for things like:
As you’ll see in the sample code, each item returned in the options
array will be a dropdown option.
The value
field will be the value that is sent to the automation when the option is selected, and the label
field will be the text that is shown in the dropdown.
Sample code:
In the input
object, you’ll receive the following:
input.conversation
: The conversation objectinput.customerId
: The customer ID of the conversationinput.ticketType
: The ticket type of the conversationinput.ticketTypeId
: The ticket type ID of the conversationIn the example above, you’ll be able to use the externalSelectSample
function in an input field to return the list of options.
When editing a ticket type, you can have an input field marked as a “single select”. Instead of specifying a static list of options, you can click the “Load from an external source” button, and select the function you’d like to use.