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

# Post-Call SMS Automation

> Learn how to automatically send SMS messages to customers after AI phone calls end

This tutorial shows how to set up an automation that automatically sends SMS messages to customers after AI phone calls end, with conditional logic based on call outcomes.

<iframe width="100%" height="400" src="https://www.youtube.com/embed/iWvHffgwEkk?si=9Ic3VHwV-QeL5YER" title="Tutorial: How to send an SMS after AI phone call ends" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen />

## What You'll Learn

* Setting up post-call webhook automation triggers
* Configuring conditional logic based on call success
* Mapping call data to SMS content
* Testing post-call automations with live calls
* Best practices for SMS follow-up messaging

## Prerequisites

* Configured AI assistant with post-call variables
* SMS-enabled phone number in your platform
* Basic understanding of automation flows
* Access to call testing functionality

## Step 1: Create Post-Call Automation Flow

We'll start by creating an automation that triggers when a phone call ends.

<video autoPlay muted loop playsinline src="https://mintcdn.com/autocalls/ehX36KEpVzCQtCBE/resources/tutorials/post-call-sms/01-create-new-flow.mp4?fit=max&auto=format&n=ehX36KEpVzCQtCBE&q=85&s=b15c3f744864585be0c2a95e42ea9806" data-path="resources/tutorials/post-call-sms/01-create-new-flow.mp4" />

1. **Navigate to Automation Platform**
2. **Create a new flow** from scratch
3. **Search for your calling platform** in the trigger section
4. **Select "Phone Call Ended"** trigger
   * This trigger activates when any call to your selected assistant completes

## Step 2: Configure Assistant and Load Data

<video autoPlay muted loop playsinline src="https://mintcdn.com/autocalls/ehX36KEpVzCQtCBE/resources/tutorials/post-call-sms/03-select-assistant.mp4?fit=max&auto=format&n=ehX36KEpVzCQtCBE&q=85&s=963f4243bc429361db27d7a5df89d651" data-path="resources/tutorials/post-call-sms/03-select-assistant.mp4" />

1. **Select the assistant** you want to automate
   * Each assistant can only have one "phone call ended" automation
   * All calls to this assistant will go through this automation
2. **Click "Load Data"** to set up the webhook and load sample call data
   * This automatically configures the webhook on your assistant
   * Sample data from your recent calls will be loaded for use in the next steps

## Step 3: Verify Assistant Variables

Before proceeding, make sure your assistant has the right variables configured:

1. **Check post-call variables** in your assistant's [Post-call Actions](/ai-assistants/settings/post-call-actions) tab:
   * **status**: Boolean (true/false) indicating if call objective was achieved
   * **summary**: Text summary of the call conversation
   * These variables are extracted by AI after each call
   * You can add more variables to use in your SMS content (e.g., `customer_name`, `appointment_date`)

<Frame>
  <img src="https://mintcdn.com/autocalls/f61-X1V6FVdnwMPG/resources/tutorials/post-call-sms/07-post-call-variables.png?fit=max&auto=format&n=f61-X1V6FVdnwMPG&q=85&s=62a3c53eb5d053fa70ec568f6f6d05eb" alt="Post-call variables configuration" width="1749" height="763" data-path="resources/tutorials/post-call-sms/07-post-call-variables.png" />
</Frame>

### Adding New Post-Call Variables

If you add a new post-call variable after creating the automation:

1. **Define the new variable** in your assistant's "Post-call Actions" tab and save
2. **Return to your automation** and click **"Load Data"** again to refresh the available fields
3. **Re-evaluate an existing call** if needed to extract the new variable from past calls

## Step 4: Add Conditional Logic for Goal-Based SMS

We want to send SMS only when the call objective is achieved, so we need a decision branch in our automation.

<video autoPlay muted loop playsinline src="https://mintcdn.com/autocalls/f61-X1V6FVdnwMPG/resources/tutorials/post-call-sms/13-add-branch.mp4?fit=max&auto=format&n=f61-X1V6FVdnwMPG&q=85&s=c27fa1608be5f078c0e16c26e133a04a" data-path="resources/tutorials/post-call-sms/13-add-branch.mp4" />

1. **Click the "+" sign** to add a new step
2. **Search for "Branch"** in the control flow options
3. **Select the Branch** component

<video autoPlay muted loop playsinline src="https://mintcdn.com/autocalls/f61-X1V6FVdnwMPG/resources/tutorials/post-call-sms/14-configure-branch-condition.mp4?fit=max&auto=format&n=f61-X1V6FVdnwMPG&q=85&s=e91f25053bb10bae956c0cff4c6c7e57" data-path="resources/tutorials/post-call-sms/14-configure-branch-condition.mp4" />

4. **Configure the branch condition:**
   * **A sidebar will appear** for setting up the condition
   * **Search for the `status` variable** from your call data
   * **Select the `status` variable**
   * **Choose "Boolean is true"** as the condition type
   * This creates **two paths**: **True (left)** and **False (right)**

<Note>
  The `status` variable is Boolean (true/false). After each call, this variable will be extracted and will be `true` if the call objective was achieved, otherwise `false`. The branch will execute the "True" path when the goal was achieved and the "False" path when it wasn't.
</Note>

**Understanding the Logic:**

* **True path (left)**: Actions for successful calls (objective achieved)
* **False path (right)**: Actions for unsuccessful calls (objective not achieved)

## Step 5: Configure SMS Action for Successful Calls

Now we'll add the SMS action that triggers when the call objective is achieved.

<video autoPlay muted loop playsinline src="https://mintcdn.com/autocalls/f61-X1V6FVdnwMPG/resources/tutorials/post-call-sms/15-add-sms-action.mp4?fit=max&auto=format&n=f61-X1V6FVdnwMPG&q=85&s=46b94288fb069bf7b0d08e12821f3a28" data-path="resources/tutorials/post-call-sms/15-add-sms-action.mp4" />

1. **On the "True" branch** (successful calls), **click the "+" sign**
2. **Search for your calling platform**
3. **Select "Send SMS to Customer"**

<video autoPlay muted loop playsinline src="https://mintcdn.com/autocalls/f61-X1V6FVdnwMPG/resources/tutorials/post-call-sms/16-select-phone-number.mp4?fit=max&auto=format&n=f61-X1V6FVdnwMPG&q=85&s=4f61c88e21f6209a588013cb32f987fa" data-path="resources/tutorials/post-call-sms/16-select-phone-number.mp4" />

4. **Select an SMS-enabled phone number** from your platform:
   * **Choose an existing number** that you have in your platform
   * This number will be the **sender of your SMS messages**
   * Make sure the number has SMS capabilities enabled

## Step 6: Map SMS Content and Recipient

Now we'll configure who receives the SMS and what message they get.

<video autoPlay muted loop playsinline src="https://mintcdn.com/autocalls/f61-X1V6FVdnwMPG/resources/tutorials/post-call-sms/17-map-customer-phone.mp4?fit=max&auto=format&n=f61-X1V6FVdnwMPG&q=85&s=947be1a99ea426753ef01d5b85521ec3" data-path="resources/tutorials/post-call-sms/17-map-customer-phone.mp4" />

1. **Configure the SMS recipient:**
   * **Click on "Customer Phone" input field**
   * **A sidebar will open** showing available data from the call
   * **Search for the variable that holds the phone number**
   * **Select the phone number** from your call data
   * **Click "Insert"** to map the field

<video autoPlay muted loop playsinline src="https://mintcdn.com/autocalls/f61-X1V6FVdnwMPG/resources/tutorials/post-call-sms/18-configure-sms-content.mp4?fit=max&auto=format&n=f61-X1V6FVdnwMPG&q=85&s=2e5d519d6d93d869abd7bb48e78da04a" data-path="resources/tutorials/post-call-sms/18-configure-sms-content.mp4" />

2. **Configure the SMS message content:**
   * **Move to the text message field**
   * **Use the `summary` variable** for personalized content
   * The `summary` is the post-call variable that contains AI-generated call summary
   * **You can write custom text** + dynamic summary
   * **Example**: "Thank you for your time! Here's a summary of our call: {summary}"

<Note>
  The `summary` variable is filled automatically after each call based on the conversation discussion and will be unique for each customer interaction.
</Note>

<video autoPlay muted loop playsinline src="https://mintcdn.com/autocalls/f61-X1V6FVdnwMPG/resources/tutorials/post-call-sms/19-test-sms-action.mp4?fit=max&auto=format&n=f61-X1V6FVdnwMPG&q=85&s=5c3526d9b4a8dfdd401369379c4692cd" data-path="resources/tutorials/post-call-sms/19-test-sms-action.mp4" />

3. **Test the SMS action:**
   * **Click "Test Step"** to send a test SMS using your call data
   * **Verify successful delivery** in the test results
   * **Check your phone** for the actual SMS message
   * **Confirm the message content** includes the call summary

## Step 7: US Phone Numbers - Twilio Integration

<Note>
  **Important for US phone numbers**: If your SMS messages need to be sent to US phone numbers, you will need to use Twilio instead of our AI calling platform's SMS feature. This requires A2P verification for compliance with US regulations.
</Note>

### Setting Up Twilio for US SMS

If you need to send SMS to US numbers, follow these steps:

1. **Purchase a phone number from Twilio** with SMS capabilities
2. **Complete [A2P 10DLC registration](https://www.twilio.com/docs/messaging/guides/10dlc)** in your Twilio account
3. **Replace the SMS action** in your automation:

<video autoPlay muted loop playsinline src="https://mintcdn.com/autocalls/f61-X1V6FVdnwMPG/resources/tutorials/post-call-sms/search-twilio.mp4?fit=max&auto=format&n=f61-X1V6FVdnwMPG&q=85&s=f099e072026ba2f116bca7e2ef58e4b0" data-path="resources/tutorials/post-call-sms/search-twilio.mp4" />

* **Search for "Twilio"** in the action search
* **Select "Send SMS"** from Twilio options

<video autoPlay muted loop playsinline src="https://mintcdn.com/autocalls/f61-X1V6FVdnwMPG/resources/tutorials/post-call-sms/twilio-new-connection.mp4?fit=max&auto=format&n=f61-X1V6FVdnwMPG&q=85&s=a3ce895fd8bcdd052ea32615cc9b3749" data-path="resources/tutorials/post-call-sms/twilio-new-connection.mp4" />

* **Create new connection** when prompted
* **Complete Account SID and Auth Token** from your Twilio dashboard
* **Save the connection**

4. **Configure Twilio SMS:**
   * **Select your Twilio phone number**
   * **Map customer phone number** (same process as above)
   * **Configure message body** (same process as with our platform)
   * **Test the step** to verify delivery

<Warning>
  US SMS regulations require [A2P 10DLC registration](https://www.twilio.com/docs/messaging/guides/10dlc) for business messaging. Using unverified numbers may result in message blocking or account suspension.
</Warning>

## Step 8: Publish and Activate Automation

<Frame>
  <img src="https://mintcdn.com/autocalls/f61-X1V6FVdnwMPG/resources/tutorials/post-call-sms/20-publish-automation.png?fit=max&auto=format&n=f61-X1V6FVdnwMPG&q=85&s=ecab6461c6f00332d61709d0df5988af" alt="Publishing the automation" width="1751" height="708" data-path="resources/tutorials/post-call-sms/20-publish-automation.png" />
</Frame>

1. **Click "Publish"** to activate your automation
2. **Your post-call SMS automation is now live and ready**

**What happens now:**

* **After each call** with the selected assistant
* **If the objective was achieved** (`status` = true)
* **The customer will automatically receive an SMS** with the call summary

3. **Monitor automation performance:**
   * **Click "Runs"** to see execution history
   * **Verify SMS delivery** for successful calls
   * **Monitor any failed executions**
   * **Track which calls triggered SMS** vs which didn't

<Tip>
  From now on, after each call with the objective achieved, the customer will receive an SMS automatically. This improves follow-up consistency and customer engagement.
</Tip>

### SMS Delivery Tracking

Monitor your SMS automation effectiveness:

* **Delivery rates**: Track successful SMS delivery
* **Response rates**: Monitor customer engagement
* **Opt-out handling**: Respect customer preferences

## Best Practices

### Message Content

* **Keep messages concise** and valuable
* **Personalize with call data** when relevant
* **Include clear next steps** or contact information

### Timing Considerations

* **Send immediately** after successful calls for best engagement
* **Consider time zones** for your customer base
* **Avoid late-night messaging** unless appropriate for your business

## Troubleshooting

### Common Issues

**SMS not sending:**

* Verify phone number has SMS capabilities
* Check customer phone number format (+1234567890)
* Confirm SMS action is on the correct branch

**Automation not triggering:**

* Ensure webhook is enabled in assistant settings
* Verify automation is published and active
* Check that calls are completing successfully

**Wrong message content:**

* Verify variable mapping in SMS content
* Check that post-call variables are being extracted
* Test with various call scenarios

## Next Steps

Once your basic SMS automation is working:

* **Add email automation** for additional follow-up
* **Create different messages** for different call outcomes
* **Integrate with CRM systems** to log communication
* **Set up advanced analytics** to track engagement
* **A/B test different message templates** for optimal results

Your customers will now receive personalized SMS messages after successful calls, improving engagement and follow-up consistency!
