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

# Post-Call Email Automation

> Learn how to automatically send personalized emails to customers after AI phone calls

This tutorial shows how to set up an automation that sends personalized follow-up emails to customers after AI phone calls, with conditional logic based on call outcomes and personalized content.

## What You'll Learn

* Setting up post-call email automation with conditional triggers
* Configuring email templates with dynamic content from calls
* Mapping call data and variables to email content
* Creating different email flows based on call success
* Best practices for professional follow-up communication

## Prerequisites

* Configured AI assistant with post-call variables and email collection
* Email service integration (Gmail)
* Understanding of post-call webhook automation
* Access to call testing functionality

## Step 1: Create Post-Call Email Automation

We'll create an automation that triggers after phone calls and sends personalized emails based on call outcomes.

<video autoPlay muted loop playsinline src="https://mintcdn.com/robosite/zIr87z5p7-OJEc3o/resources/tutorials/post-call-email/01-create-email-automation.mp4?fit=max&auto=format&n=zIr87z5p7-OJEc3o&q=85&s=891da16b26c27f40af10b60b14576859" data-path="resources/tutorials/post-call-email/01-create-email-automation.mp4" />

1. **Navigate to Automation Platform**
2. **Create a new flow** from scratch
3. **Search for your calling platform** in triggers
4. **Select "Phone Call Ended"** trigger
   * This captures data from all completed calls to your selected assistant

## Step 2: Configure Assistant and Webhook Integration

<video autoPlay muted loop playsinline src="https://mintcdn.com/robosite/zIr87z5p7-OJEc3o/resources/tutorials/post-call-email/03-select-assistant-for-email.mp4?fit=max&auto=format&n=zIr87z5p7-OJEc3o&q=85&s=d4d6b48a52a9f6ccc46ba0d7b3d0b085" data-path="resources/tutorials/post-call-email/03-select-assistant-for-email.mp4" />

1. **Select your target assistant**
   * Each assistant supports only one post-call automation
   * All calls to this assistant will trigger this email flow
2. **Click "Test Trigger"** to set up the webhook
   * This automatically generates and saves a webhook URL
   * The webhook is stored in your assistant's post-call settings

## Step 3: Verify Assistant Configuration

<video autoPlay muted loop playsinline src="https://mintcdn.com/robosite/zIr87z5p7-OJEc3o/resources/tutorials/post-call-email/05-check-assistant-webhook.mp4?fit=max&auto=format&n=zIr87z5p7-OJEc3o&q=85&s=b3eb2fbb48edd6c18bd22b55e7143a63" data-path="resources/tutorials/post-call-email/05-check-assistant-webhook.mp4" />

1. **Open your assistant** in a new tab
2. **Navigate to "Post-call Actions"** (third tab)
3. **Confirm webhook URL** was automatically configured

<Frame>
  <img src="https://mintcdn.com/robosite/zIr87z5p7-OJEc3o/resources/tutorials/post-call-email/06-webhook-settings.png?fit=max&auto=format&n=zIr87z5p7-OJEc3o&q=85&s=58a7d34aa9579ae5d83a95c5e1479d7e" alt="Webhook trigger configuration" width="1759" height="772" data-path="resources/tutorials/post-call-email/06-webhook-settings.png" />
</Frame>

4. **Review trigger settings:**
   * **Enabled**: Automation triggers after calls
   * **Completed calls only**: Recommended for email follow-ups
   * **All calls**: Select "No" to include failed calls

<Frame>
  <img src="https://mintcdn.com/robosite/zIr87z5p7-OJEc3o/resources/tutorials/post-call-email/07-post-call-variables.png?fit=max&auto=format&n=zIr87z5p7-OJEc3o&q=85&s=956ae12bb3dbafe1601ed5a1c1785b1e" alt="Post-call variables for email content" width="1749" height="763" data-path="resources/tutorials/post-call-email/07-post-call-variables.png" />
</Frame>

5. **Verify post-call variables:**
   * **status**: Boolean indicating call success
   * **email**: Customer email (ensure this is collected during calls)

## Step 4: Ensure Email Collection

For email automation to work, your assistant must collect customer email addresses.

<Frame>
  <img src="https://mintcdn.com/robosite/zIr87z5p7-OJEc3o/resources/tutorials/post-call-email/08-set-test-values.png?fit=max&auto=format&n=zIr87z5p7-OJEc3o&q=85&s=961ec672944921f84662e878948f4799" alt="Call variables including email collection" width="935" height="861" data-path="resources/tutorials/post-call-email/08-set-test-values.png" />
</Frame>

1. **Check your assistant's call variables:**
   * Ensure `email` variable is defined
   * Set default test email for testing purposes. **Use your real email address** for testing.
   * Consider making email collection part of your call script

## Step 5: Generate Test Call with Email Data

<video autoPlay muted loop playsinline src="https://mintcdn.com/robosite/zIr87z5p7-OJEc3o/resources/tutorials/post-call-email/09-make-test-call.mp4?fit=max&auto=format&n=zIr87z5p7-OJEc3o&q=85&s=154b4e6ce119cf631475b26221eb7bfc" data-path="resources/tutorials/post-call-email/09-make-test-call.mp4" />

1. **Make a test call to generate webhook data:**
   * Click **"Speak to Assistant"** → **"Phone Call"**
   * **Answer when your assistant calls you**
   * **Respond positively** to ensure the `status` variable becomes `true`
   * **Complete the call objective** during the conversation
   * **End the call naturally**

<Note>
  In a real situation, the assistant will take data assigned to the lead. For testing, it uses the default values you just set.
</Note>

<video autoPlay muted loop playsinline src="https://mintcdn.com/robosite/zIr87z5p7-OJEc3o/resources/tutorials/post-call-email/10-check-call-results.mp4?fit=max&auto=format&n=zIr87z5p7-OJEc3o&q=85&s=a169510aa6fd6858d4f44f5a3cef6767" data-path="resources/tutorials/post-call-email/10-check-call-results.mp4" />

2. **Verify call results and variable extraction:**
   * **Navigate to your calls list** and find the recent call
   * **Click on the call** to view details
   * **Confirm the `status` variable is `true`** (call objective achieved)
   * These variables are extracted after each call based on:
     * Call transcript
     * Variable descriptions
     * Variable types (Boolean for status)
     * System prompt context

<Note>
  The variables after a call are being extracted. You can refresh the page after about a minute and then you will see the extracted variables.
</Note>

<video autoPlay muted loop playsinline src="https://mintcdn.com/robosite/zIr87z5p7-OJEc3o/resources/tutorials/post-call-email/11-received-call-data.mp4?fit=max&auto=format&n=zIr87z5p7-OJEc3o&q=85&s=efae136a1a483899e50e4ee87dc05786" data-path="resources/tutorials/post-call-email/11-received-call-data.mp4" />

1. **Return to your automation tab**

2. **Verify you received call data** from the test trigger
   * You should see the webhook data because you clicked "Test Trigger" and then made a call
   * The automation received the request after the call ended and variables were extracted

3. **Alternative method - resend webhook data from existing calls:**

<video autoPlay muted loop playsinline src="https://mintcdn.com/robosite/zIr87z5p7-OJEc3o/resources/tutorials/post-call-email/12-resend-webhook.mp4?fit=max&auto=format&n=zIr87z5p7-OJEc3o&q=85&s=c4ae6fb5452c88835dd8316fe01ac31a" data-path="resources/tutorials/post-call-email/12-resend-webhook.mp4" />

* If you need to test with different call data, you can reuse any existing call
* **Click "Test Trigger"** again in your automation
* **Go to any completed call** in your platform
* **Click "Resend Webhook"** to push that call's data to your automation
* **Return to automation tab** to see the updated data

### Adding New Post-Call Variables

<Note>
  If you need to add a new post-call variable after creating the automation, follow this process to update your automation with the new variable data.
</Note>

<video autoPlay muted loop playsinline src="https://mintcdn.com/robosite/zUGoGthjJMw8CHK1/resources/tutorials/post-call-email/add-variable.mp4?fit=max&auto=format&n=zUGoGthjJMw8CHK1&q=85&s=7a6b659f7c7eafffa3a50cb11c22ef1d" data-path="resources/tutorials/post-call-email/add-variable.mp4" />

1. **Define the new variable in your assistant:**
   * Go to assistant settings → "Post-call Actions" tab
   * Add your new post-call variable (name, type, description)
   * **Save the assistant**

2. **Update automation with new variable data:**
   * **Return to your automation**
   * **Click "Test Trigger"** to prepare for new webhook data

3. **Re-evaluate an existing call:**

<video autoPlay muted loop playsinline src="https://mintcdn.com/robosite/zUGoGthjJMw8CHK1/resources/tutorials/post-call-email/re-evaluate.mp4?fit=max&auto=format&n=zUGoGthjJMw8CHK1&q=85&s=9313e28222b7ef90e77faf6f46e933c2" data-path="resources/tutorials/post-call-email/re-evaluate.mp4" />

* **Go to any completed call** for this assistant
* **Click "Re-evaluate"** to extract the new variable from that call
* **Wait for processing** to complete

4. **Send updated data to automation:**
   * **Click "Resend Webhook"** on the same call
   * **Return to automation tab**
   * **Verify the new variable** is now available in your automation data

<Tip>
  This resend feature is useful for testing different scenarios without making new calls every time.
</Tip>

## Step 6: Configure Conditional Email Logic

We only want to add leads to Google Sheets when the call objective was achieved.

<video autoPlay muted loop playsinline src="https://mintcdn.com/robosite/zIr87z5p7-OJEc3o/resources/tutorials/post-call-email/13-add-branch.mp4?fit=max&auto=format&n=zIr87z5p7-OJEc3o&q=85&s=b32da7b5ac6b8b2c7dc4285ca2ca79c6" data-path="resources/tutorials/post-call-email/13-add-branch.mp4" />

1. **Click the "+" sign** to add a step
2. **Search for "Branch"** in control flow
3. **Select Branch** to create conditional logic

<video autoPlay muted loop playsinline src="https://mintlify.s3.us-west-1.amazonaws.com/robosite/resources/tutorials/post-call-email/14-configure-status-condition.mp4" />

4. **Configure the branch condition:**
   * **Select `status` variable** from call data
   * **Choose "Boolean is true"**
   * This creates two paths: True (qualified) and False (not qualified)

## Step 7: Set Up Email Service Integration

<video autoPlay muted loop playsinline src="https://mintcdn.com/robosite/zIr87z5p7-OJEc3o/resources/tutorials/post-call-email/15-add-email-action.mp4?fit=max&auto=format&n=zIr87z5p7-OJEc3o&q=85&s=89710c1f3b0e666885892cab415caa05" data-path="resources/tutorials/post-call-email/15-add-email-action.mp4" />

1. **On the True branch**, click "+"
2. **Search for your email service** (Gmail, Outlook, SMTP, etc.)
3. **Select "Send Email"** action

<video autoPlay muted loop playsinline src="https://mintcdn.com/robosite/zUGoGthjJMw8CHK1/resources/tutorials/post-call-email/16-create-email-connection.mp4?fit=max&auto=format&n=zUGoGthjJMw8CHK1&q=85&s=1efbc796751ce1948112ae1693cbb2fc" data-path="resources/tutorials/post-call-email/16-create-email-connection.mp4" />

4. **Create email service connection:**
   * Authorize with your email provider
   * Configure SMTP settings if using custom email
   * Save the connection for future use

## Step 8: Configure Email Content and Recipients

<video autoPlay muted loop playsinline src="https://mintcdn.com/robosite/zUGoGthjJMw8CHK1/resources/tutorials/post-call-email/17-map-recipient-email.mp4?fit=max&auto=format&n=zUGoGthjJMw8CHK1&q=85&s=7610da5ebcb6b71479d74ed7719b411e" data-path="resources/tutorials/post-call-email/17-map-recipient-email.mp4" />

1. **Configure recipient:**
   * Click on "To" email field
   * **Select customer email** from call variables
   * Ensure the email address is properly mapped

2. **Set email subject:**
   * Use dynamic content: "Thank you for your time, `{customer_name}`!"
   * Include company name or call reference
   * Keep subject professional and relevant

<video autoPlay muted loop playsinline src="https://mintcdn.com/robosite/zUGoGthjJMw8CHK1/resources/tutorials/post-call-email/19-compose-email-body.mp4?fit=max&auto=format&n=zUGoGthjJMw8CHK1&q=85&s=2f1d6aa57945d41a857bf7f6bc8f1dfc" data-path="resources/tutorials/post-call-email/19-compose-email-body.mp4" />

1. **Compose email body with dynamic content:**
   * **Click on the "Body" field** to start writing your email
   * **Type your email content** with placeholders for variables
   * **Example email template:**

```
Hi {customer_name},

Thank you for taking the time to speak with us today. Here's a transcript of our conversation:

{formatted_transcript}

Next Steps:
- We'll follow up as discussed
- Feel free to reach out with any questions
- [Include specific next steps based on your business]

Best regards,
[Your Name/Company]
[Contact Information]
```

2. **Add dynamic variables to your email:**
   * **To replace `{customer_name}`**:
     * **Click where you want the variable** in your email text
     * **A popup will appear** with available variables
     * **Search for and select "customer\_name"** from call variables
     * **Click "Insert"** to add the variable
   * **To replace `{formatted_transcript}`**:
     * **Click where you want the transcript** in your email text
     * **Navigate to "Post Call Variables"** in the popup
     * **Select the "formatted\_transcript" variable**
     * **Click "Insert"** to add the variable

## Step 10: Advanced Email Templates

You can create more professional emails by using HTML formatting:

1. **Select "HTML" as body type** in your email action
2. **In the body field, add HTML code** for enhanced formatting
3. **Use dynamic variables** the same way as in plain text emails

## Step 11: Test Email Automation

<video autoPlay muted loop playsinline src="https://mintcdn.com/robosite/zUGoGthjJMw8CHK1/resources/tutorials/post-call-email/22-test-email-sending.mp4?fit=max&auto=format&n=zUGoGthjJMw8CHK1&q=85&s=f04128d9cf48ea81ace1a9948d86a1ef" data-path="resources/tutorials/post-call-email/22-test-email-sending.mp4" />

1. **Click "Test Step"** to send test email
2. **Verify successful delivery** in test results
3. **Check your email inbox:**
   * Verify email was received
   * Check that dynamic content populated correctly
   * Review formatting and professionalism

## Step 12: Publish and Monitor

<Frame>
  <img src="https://mintcdn.com/robosite/zUGoGthjJMw8CHK1/resources/tutorials/post-call-email/25-publish-email-automation.png?fit=max&auto=format&n=zUGoGthjJMw8CHK1&q=85&s=7fbf68fb42784f47e10f6fe4621546bf" alt="Publishing email automation" width="1758" height="676" data-path="resources/tutorials/post-call-email/25-publish-email-automation.png" />
</Frame>

1. **Click "Publish"** to activate your email automation
2. **Monitor automation runs** for successful email delivery

## Best Practices

### Email Content

* **Professional tone** appropriate for your industry
* **Clear subject lines** that indicate purpose
* **Personalized content** using call data effectively
* **Clear call-to-action** for next steps

## Troubleshooting

### Common Issues

**Emails not sending:**

* Verify email service connection and authorization
* Check that customer email addresses are valid
* Confirm email action is on correct conditional branch
* Verify automation is published and active

**Dynamic content not populating:**

* Check variable mapping in email template
* Verify post-call variables are being extracted correctly
* Ensure call variables contain email data
* Test with various call scenarios

Your customers will now receive professional, personalized follow-up emails after every successful call, improving relationship building and conversion rates!
