> ## Documentation Index
> Fetch the complete documentation index at: https://help.cloudtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Actions

> Learn how to use an Action in your Workflow Automations

> [!NOTE]
>
> *Workflow Automations* are designed to make the job of an agent easier by automating processes such as sending a followup text, transcribing certain calls, or automatically forwarding transcriptions to Slack. The type of step ensuring these actions are performed is called an **Action** (not to be confused with an *Object Action* selected within Trigger).

**User level:** Admin

***

## Setting Up an Action

In Workflow Automation, an **Action** step is where a specific task is carried out automatically. Once the conditions before this step are met, the action is triggered. It's where the system performs actions based on your configuration.

A Workflow automation **Action** step can be added to the workflow at any point after the **Trigger**. All you need to do, is to select **`+ Add action`** option, when setting up a new step within the workflow.

![](https://mintcdn.com/cloudtalk/0B2VFDHod1TeIVNA/images/help-center/articles/5649782/0b872f47cd70-image.png?fit=max\&auto=format\&n=0B2VFDHod1TeIVNA\&q=85\&s=b68d6d7c7933e8ecd1c8a901fe53270b)

Cloudtalk currently provides four types of actions:

* **[API Request](#h_0267cfe306)**

* **[SMS](#h_1714226b93)**

* **[Send notification to Slack](#h_1710cb965a)**

* **Speech to Text (only visible when the *Recording* trigger is used)**

> [!NOTE]
>
> Each automation workflow needs at least one action to work as expected. You can add multiple actions within the same workflow to make your automation even more efficient.

## API Request

> [!WARNING]
>
> Only need to notify your own system when something happens in CloudTalk, like a call ending or a contact changing? Use [Webhooks](/guides/webhooks/overview) instead. Webhooks are built for reliable event delivery, with signed payloads, automatic retries, and resend and recovery for 30 days. API Request actions use a separate delivery path, which doesn't include these.

This Action type is good for tech-savvy users looking for more creative freedom in designing automations. An API (Application Programming Interface) allows different web applications to communicate. At this time, requests can be made either to the [CloudTalk REST API](/developers) or other, external systems which use:

* Authentication schemes requiring static, immutable headers (e.g., Basic or Bearer authentication schemes)

* Systems with URL / JSON body authentication.

CloudTalk's API is one example of the latter type. Each API Action consists of the following components:

| "Name" | Definition | Example Value |
| - | - | - |
| **Endpoint** | *URL of the respective API endpoint* | [`https://my.crmwebsite.com/api/contacts/index`](https://my.crmwebsite.com/api/contacts/index) |
| **Method** | *Defines the action of the API request* | Accepted: `PUT`, `POST`, `PATCH`, `GET`, `DELETE` |
| **Headers** | *Metadata, often necessary for authentication and other purposes* | Key: `Authorization` Value: `Basic x1x2x3x4x5x6x789` |
| **Values** | *Define the body of the request in the form of a JSON object* | Key: `contactName` Value: `Johnny Snow` Format: `String` |

Use the **Values** section of the API request builder to define the body of a request. Each entry in the **Values** section will contain a *Key*, *Value,* and *Format*.

In this instance, **Key** is the *property name* in the API request. For example:

```text theme={"system"}
contactName
```

**Value** can be *static*. It might be something like:

```text theme={"system"}
Johnny Snow
```

This value could also be a *dynamic* property which sends the value input based on the data taken from your chosen Trigger. To achieve a dynamic value, choose from one of the blue phrases in the **Useful data for your Workflow** sidebar. As shown below, you should see the **Value** box populate with something like:

```text theme={"system"}
#{{event.properties.contacts[0].name}}
```

![](https://mintcdn.com/cloudtalk/0B2VFDHod1TeIVNA/images/help-center/articles/5649782/d2fb43651165-api-ref.png?fit=max\&auto=format\&n=0B2VFDHod1TeIVNA\&q=85\&s=45f397722e6dc9f680d6d5fd50eaf711)

This example would pull the *name* value from the contact associated with your Trigger.

**Format** value describes a data type, such that the target system (API) can correctly interpret any enclosed data. CloudTalk supports the following formats:

* **Number** - whole (integers) or decimals (floats with a dot decimal separator)

* **String** - sequence of alphanumeric characters

* **Boolean** - evaluates to True or False (any undefined form defaults as False)

* **Auto** - type is detected automatically

## SMS

The SMS Action step ensures that an SMS is sent to the specified number as part of the automation. In the background, the system sends an API request with the configured details to the [CloudTalk Send SMS API endpoint](/api-reference/sms/send-sms), triggering the SMS sendout without requiring agent involvement.

To configure the SMS Action, you need to set the following attributes:

* ***Recipient*** - phone number in international format SMS should be sent to

* ***Sender*** - SMS capable phone number in international format SMS should be sent from

* ***Text*** - content of the message that should be sent

* ***API Key*** and ***API Secret*** - API credentials retrieved from Cloudtalk Dashboard by admin

Since this action involves a request to the CloudTalk API, standard rate limits apply. For more details, refer to our [API Documentation](/guides/introduction).

![](https://mintcdn.com/cloudtalk/0B2VFDHod1TeIVNA/images/help-center/articles/5649782/8f6e29a0f474-image.png?fit=max\&auto=format\&n=0B2VFDHod1TeIVNA\&q=85\&s=22082be676499acccf008dbd4e51109e)

![](https://mintcdn.com/cloudtalk/0B2VFDHod1TeIVNA/images/help-center/articles/5649782/54745a3951f9-image.png?fit=max\&auto=format\&n=0B2VFDHod1TeIVNA\&q=85\&s=e22b01ccc3974d5eb393c08aeb731faa)

#### Common Issues

* Numbers in the **Recipient** and **Sender** fields must be in **international format**.

* The number used as the **Sender** must be **SMS-capable**.

* API credentials must be entered **without additional spaces**.

* Ensure there is sufficient **account credit**, as SMS automation incurs additional costs.

## Send a Notification to Slack

This Action type is commonly used for internal notifications, allowing important information to be forwarded to a company Slack channel. To use this option, ensure you have a connection to the appropriate Slack workspace and channel. Additionally, verify that the token scopes for the workspace and channel include **chat:write** permissions.

To configure the Send a Notification to Slack action, following attributes need to be defined:

* **Token**: An authentication token generated via Slack's interface.

* **Channel**: The Slack channel where messages will be posted.

* **Text**: The message content.

* **Icon\_emoji**: An emoji icon to represent the message.

* **Icon\_url**: A URL for a custom icon to represent the message.

* **Use\_markdown**: When set to **True**, the **text** is displayed as formatted text.

As with API requests, each parameter's value can be set as a static entry or a dynamic value. To use a dynamic value, click into the **Value** box and then select one of the blue phrases in the **Useful Data for your Workflow** sidebar.

The resulting Slack notification might look something like this:

![](https://mintcdn.com/cloudtalk/0B2VFDHod1TeIVNA/images/help-center/articles/5649782/f3b072d2646e-slack-result.png?fit=max\&auto=format\&n=0B2VFDHod1TeIVNA\&q=85\&s=0cb4ffc97c5d425a638e6915361164ab)

## Speech to Text Transcription

This Action type is commonly used to transcribe conversations recorded during a call into written text. Keep in mind that this Action is only available when the **Recording Uploaded** Trigger is selected.

To configure Speech to Text action, following attributes need to be defined:

* **Language**

* **Enhanced Transcription**

* **Model**

[Read more](/en/articles/5671571-speech-to-text-transcription) about Speech-to-Text Transcription to gain a deeper understanding of how this functionality works, its features, and associated costs.

![](https://mintcdn.com/cloudtalk/0B2VFDHod1TeIVNA/images/help-center/articles/5649782/f5c7880d5efa-image.png?fit=max\&auto=format\&n=0B2VFDHod1TeIVNA\&q=85\&s=854c2d7540c6b4020503a28f755307c0)

## Re-Using Output from Previous Action Nodes

You can dynamically reference the response from a previous API Request Action step in subsequent steps within your workflow.

### How It Works

To access data returned by an earlier API Request Action, you must use the **exact format**:

```text theme={"system"}
#{{ actionData.[actionIdentifier].message.[fieldName] }}
```

* `[actionIdentifier]` is the unique identifier of the Action node, assigned when added (e.g. system generate identifier like `28547585`, or a custom name like `SendToCRM`)

* `message` represents the body of the response, which is expected to be a JSON object

* `[fieldName]` is any field within that JSON object

> [!WARNING]
>
> The prefix `.message.` is **mandatory** when referencing response data. Omitting it or using a different structure will result in a broken reference.

*Example*

Let's say we have an API Request Action node identified as `CreateLead`

![](https://mintcdn.com/cloudtalk/0B2VFDHod1TeIVNA/images/help-center/articles/5649782/9ea2ff3e154d-image.png?fit=max\&auto=format\&n=0B2VFDHod1TeIVNA\&q=85\&s=ed7fd12fe9cea1916099cea8ffe5ac95)

`CreateLead` API Request action returns this response:

```json theme={"system"}
{
  "lead_id": "abc123",
  "status": "created"
}
```

To reference the `lead_id` in another Action, use reference:

```text theme={"system"}
#{{ actionData.CreateLead.message.lead_id }}
```

***

*Need help or have a question?* Just reach out through our [Support portal](https://support.cloudtalk.io/hc/en-us/requests/new?ticket_form_id=26305535257884) — we’re here for you.


## Related topics

- [Salesforce Actions](/en/articles/9394264-salesforce-actions.md)
- [Contact actions](/api-reference/bulks/contact-actions.md)
- [Configuring Workflow Automations](/en/articles/5450779-configuring-workflow-automations.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.