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

# How To Send Links Via Text Messages During Phone Calls

## Objective

To create and automate a custom tool in the AI Assistant that sends links during calls when requested. This enables real-time information sharing through SMS while maintaining conversation flow during voice interactions.

## Benefits

* ✅ **Real-time link sharing** during active phone conversations
* ✅ **Seamless user experience** without interrupting call flow
* ✅ **Automated SMS delivery** triggered by natural language requests
* ✅ **Contact logging** for tracking sent information
* ✅ **Enhanced customer satisfaction** through instant resource delivery
* ✅ **Flexible content delivery** supporting various link types and resources

## Step 1: Create the Custom Tool

### Navigate to AI Assistant Settings

1. Go to **AI Assistant Settings**
2. Click on **Tools and Abilities**
3. Select **Create Custom Tool**

### Configure Tool Details

#### Tool Configuration:

* **Unique Name:** `sms_content`
* **Description:**
  ```
  This tool should be triggered whenever a user requests to receive links, resources, or any other information via SMS during an active conversation. It ensures that the requested information is instantly sent to the user's phone, providing a seamless experience. This tool is designed to handle any requests for links or details that need to be delivered quickly during a call, enhancing customer satisfaction and ensuring timely follow-ups.
  ```
* **Trigger:** Activated when the user asks for a link or information to be sent via SMS

#### Parameter Configuration:

* **Parameter Name:** `sms_content`
* **Description:** "The text message or link(s) that need to be sent to the user via SMS. This includes any resources, links, or information the user has requested during the conversation."

### Initial Save

1. Click **Save** (The Endpoint URL will be added later)
2. Add appropriate prompts to guide the AI in calling the tool
3. Configure the AI to recognize SMS requests and trigger the tool

### AI Prompt Example:

```
When a user requests to receive links, documentation, or any information via text message during a call, use the sms_content tool to send the requested information immediately via SMS.
```

## Step 2: Set Up the Automation Workflow

### Create Workflow

1. Go to **Automations** and click **Create New Workflow**
2. **Name the workflow:** "Custom Tool - Send SMS During Call"

### Configure Trigger

1. **Add a Trigger:** Select **Inbound Webhook** as the trigger type
2. **Copy the Webhook URL** provided
3. **Return to the custom tool** and paste this Webhook URL into the **Endpoint URL** field
4. **Save the workflow**

## Step 3: Create a Custom Field (Optional Logging)

### Field Configuration

1. Navigate to **Custom Fields**
2. Create a new field with the following details:
   * **Field Type:** Multi-line Text
   * **Field Name:** `sms_sent`
   * **Purpose:** Track SMS content sent to contacts for logging and reference

### Benefits of Logging

* Track what information was sent to each contact
* Maintain conversation history
* Enable follow-up opportunities
* Support customer service queries

## Step 4: Link the Automation to SMS Sending Action

### Workflow Configuration Guide

#### 🔹 Step 1: Trigger Setup

* **Trigger Type:** Inbound Webhook
* **Purpose:** Initiates the workflow when called from your custom tool
* **Configuration:** Get the payload reference by making a test call

#### 🔹 Step 2: Add Wait Action

* **Action:** Wait
* **Duration:** 0.3 minutes
* **Purpose:** Allows any asynchronous processes to complete before proceeding

#### 🔹 Step 3: Find Existing Contact

* **Action:** Find Contact
* **Search Fields Configuration:**
  * **Contact ID:** Map to `Inbound webhook trigger → Call → Call id`
  * **Phone:** Map to `Inbound webhook trigger → Call → From_number`

#### 🔹 Step 4: Conditional Branch – Contact Found?

##### If Contact Is Found:

1. **Add Wait:** 0.2 minutes
2. **Action:** Update Contact Fields
3. **Field Mapping:**
   * `sms_content` → Map to SMS content from custom values
   * `phone` → Map to contact phone number

##### If Contact Is Not Found:

1. **Add Wait:** 0.2 minutes
2. **Action:** Create New Contact
3. **Initial Field Mapping:**
   * `sms_content` → Map to SMS from custom values
   * `phone` → Map to contact phone number
4. **Action:** Update Contact Fields
5. **Additional Field Mapping:**
   * `sms_content` → Map to SMS from custom values
   * `phone` → Map to contact phone number

#### 🔹 Step 5: Send SMS

* **Action:** Send SMS
* **Message Template:**
  ```
  Here is the link to the documentation: {{custom_values.sms_content}}

  If you have any questions, feel free to reach out!
  ```
* **Dynamic Fields:** Use webhook data to include specific links or additional details

### Optional Enhancements

#### Additional Actions:

1. **Send Email** with the same documentation link for backup reference
2. **Send Internal Notification** for tracking or team visibility
3. **Create Task** for follow-up if needed

#### Optimization Tips:

* **Combine actions** after branching to avoid duplicates
* **Consolidate optional actions** (email/notifications) after contact creation or update
* **Use consistent field mapping** throughout the workflow

## Step 5: Final Testing and Deployment

### Testing Process

#### Simulate Real Scenarios:

1. **Initiate a test call** and simulate a user request like:
   * "Can you text me the link?"
   * "Please send me that documentation via SMS"
   * "Could you message me the website address?"

#### Verification Checklist:

* ✅ **Tool Detection:** Ensure the tool detects SMS requests correctly
* ✅ **SMS Delivery:** Confirm SMS is sent with correct content
* ✅ **Content Accuracy:** Verify links and information are properly formatted
* ✅ **Logging Functionality:** Check that interactions are logged (if applicable)
* ✅ **Contact Management:** Ensure contacts are created or updated properly

### Quality Assurance

#### Test Different Scenarios:

* **Existing contacts** receiving SMS links
* **New contacts** being created during the process
* **Various link types** (documentation, websites, resources)
* **Multiple requests** during a single call
* **Error handling** for failed SMS delivery

#### Performance Monitoring:

* **Response time** from request to SMS delivery
* **Success rate** of SMS delivery
* **User satisfaction** with link accessibility
* **System reliability** under various conditions

## Implementation Examples

### Common Use Cases

#### Documentation Sharing:

**User Request:** "Can you text me the user guide?"
**AI Response:** "I'll send you the user guide link right now via SMS."
**SMS Content:** "Here's your user guide: [https://docs.buildassistants.app/user-guide](https://docs.buildassistants.app/user-guide)"

#### Resource Links:

**User Request:** "Please send me that pricing page"
**AI Response:** "I'm sending you the pricing information via text message."
**SMS Content:** "Here's our pricing page: [https://buildassistants.app/pricing](https://buildassistants.app/pricing)"

#### Support Documentation:

**User Request:** "I need the troubleshooting guide texted to me"
**AI Response:** "I'll text you the troubleshooting guide immediately."
**SMS Content:** "Troubleshooting guide: [https://docs.buildassistants.app/troubleshooting](https://docs.buildassistants.app/troubleshooting)"

## Advanced Configuration

### Dynamic Content Delivery

* **Context-aware links** based on conversation topic
* **Personalized messages** with user-specific information
* **Multiple link sharing** in a single SMS
* **Follow-up sequences** for comprehensive resources

### Integration Enhancements

* **CRM synchronization** for complete contact history
* **Analytics tracking** for link engagement
* **A/B testing** for message effectiveness
* **Multi-channel delivery** (SMS + Email)

## Troubleshooting

### Common Issues

**Tool not triggering:**

* Verify webhook URL is correctly configured
* Check AI prompts for SMS request recognition
* Ensure tool is properly linked to assistant

**SMS not sending:**

* Confirm phone number formatting is correct
* Verify SMS service is properly configured
* Check webhook payload for required fields

**Wrong content in SMS:**

* Review parameter mapping in workflow
* Verify dynamic field references
* Test with various content types

**Contact creation issues:**

* Check conditional logic in workflow
* Verify contact field mappings
* Ensure proper error handling

### Performance Optimization

**Reduce Latency:**

* Optimize wait times in workflow
* Streamline conditional logic
* Use efficient field mapping

**Improve Reliability:**

* Add error handling for failed SMS
* Implement retry mechanisms
* Monitor delivery success rates

## Security Considerations

### Data Protection

* **Secure link sharing** with appropriate access controls
* **Contact information privacy** in accordance with regulations
* **SMS content filtering** to prevent sensitive data exposure
* **Audit trails** for compliance tracking

### Best Practices

* **Validate phone numbers** before sending SMS
* **Encrypt sensitive links** when necessary
* **Implement rate limiting** to prevent abuse
* **Monitor usage patterns** for security anomalies

## Result

The AI Assistant can now respond in real-time to SMS requests during calls, sending links or information via text and optionally logging the interaction for future reference. This creates a seamless experience where users can receive important resources without interrupting their conversation flow.
