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

# Send SMS

> Trigger an SMS directly from Managed Topic actions

Add an SMS action to a Managed Topic so your agent can send text messages to callers during a conversation – for example, sending a link, confirmation, or reference number.

<Note>You must complete the [SMS setup](/sms/introduction) (connect Twilio, create templates) before you can add SMS actions to topics.</Note>

## How SMS actions work

When a topic with an SMS action is matched, the agent follows your prompt to determine *when* to send the message. Typically, you instruct the agent to ask for consent before sending – the SMS is not sent automatically just because the topic matches.

## Adding an SMS trigger

Add an SMS trigger to a topic's **Actions** field using any of these methods:

1. Type `/` in the Actions field and select **SMS**
2. Right-click in the Actions field and choose **SMS** from the menu
3. Click the **+** icon on the right side of the field and select **SMS**

<img src="https://mintcdn.com/polyai/EaIQY0vBmmGQ1SOH/images/managed-topics/send-sms-action.png?fit=max&auto=format&n=EaIQY0vBmmGQ1SOH&q=85&s=0cdef1cb4ce1543d21d7f539028511d8" alt="Adding an SMS action to a managed topic using the /sms command" width="3014" height="1062" data-path="images/managed-topics/send-sms-action.png" />

## Selecting the SMS template

1. After selecting **SMS**, choose an existing template from the dropdown.
2. To create a new template, click **+ add sms template**. You will be redirected to the [SMS](/sms/introduction) section (**Build > SMS**) to define the message content and phone number.

## Writing the action prompt

The prompt tells the agent *when* and *how* to trigger the SMS. Always include a consent step so the agent asks before sending.

**Example prompt:**

```plaintext theme={"theme":{"light":"github-light","dark":"github-dark"}}
After the caller confirms that they would like to receive an SMS message with further details, call {{SMS_template}} to send the SMS out.
```

**Example with a fallback:**

```plaintext theme={"theme":{"light":"github-light","dark":"github-dark"}}
Offer to send the caller a text message with booking details. If they agree, call {{booking_confirmation_sms}}. If they decline, continue the conversation normally.
```

<Tip>Always require explicit caller consent before sending SMS. This is both a best practice and a regulatory requirement in many regions.</Tip>

## Related pages

<CardGroup cols={2}>
  <Card title="Handoff actions" icon="phone-forward" href="/managed-topics/how-to-setup-action/handoff">
    Transfer callers to live agents from Managed Topics.
  </Card>

  <Card title="Function invocation" icon="code" href="/managed-topics/how-to-setup-action/tool-call">
    Call custom functions from topic actions.
  </Card>
</CardGroup>
