05. Custom Tools

Step-by-Step Guide: Creating and Deploying a Custom Tool for Information Extraction in Lead Indicator AI


Overview

This tutorial walks you through combining multiple extractions into a single custom tool. The goal is to simplify the process of collecting, storing, and leveraging user information during conversations.


1. Setting Up the Custom Tool

A custom tool enables your assistant to extract multiple pieces of information in one step.

Steps:

  1. Navigate to Custom Tools:

    • In the dashboard, go to the Custom Tool tab and click Create a Tool.
  2. Define Tool Details:

    • Unique Name: Use JSON-friendly format (e.g., extract_info).
    • Description: Clearly define the tool’s purpose. Example:
      css
      Use this tool to extract user information, such as name, email, address, and project details, for later reference.
  3. Set Parameters: Add the required data fields with descriptions:

    • name: The user's name.
    • email: The user's email address.
    • address: The user's physical address.
    • concrete_issue: A brief description of the user's concrete-related issue.
    • concrete_details: Detailed information about the project.
  4. Specify Endpoint URL:

    • This URL is a webhook to receive and process the extracted data.
    • Open a workflow tab in your CRM (e.g., Go High Level or Lead Indicator).
    • Create a new workflow and set the trigger as Inbound Webhook.
    • Copy the Webhook URL and paste it into the tool's Endpoint URL field.
  5. Save and Assign Tool:

    • Save the tool and assign it to your assistant under Tools in the assistant’s settings.

2. Setting Up the Workflow

The workflow processes the data received from the custom tool.

Steps:

  1. Create a New Workflow:

    • Name it (e.g., concrete_extraction_workflow).
  2. Configure the Trigger:

    • Set the trigger as Inbound Webhook.
    • Use the webhook URL provided earlier.
  3. Process the Extracted Data:

    • Add the action Find Contact:
      • Match the contact using their Phone Number from the webhook data.
    • Add the action Update Contact Fields:
      • Map the extracted parameters (name, email, address, etc.) to the corresponding contact fields.
  4. Test the Workflow:

    • Use the assistant in a conversation and trigger the custom tool.
    • Check the workflow’s logs to verify that the data is processed correctly.

3. Testing the Custom Tool

  1. Initiate a Conversation:

    • Start a chat or call with the assistant.
    • Provide sample details (e.g., name, email, address, and project information).
    • Verify that the assistant uses the custom tool to extract information.
  2. Check Workflow Logs:

    • Ensure the workflow received the data and updated the contact fields.
  3. Review Data Mapping:

    • Ensure the extracted data (e.g., concrete_issue, concrete_details) is stored in the correct fields.

4. Advanced Customizations

  • Multiple Conditions: Add conditions to the workflow (e.g., specific actions based on concrete_issue).
  • Dynamic Responses: Use the extracted data for tailored responses during the conversation.

5. Final Deployment

  1. Publish All Changes:
    • Publish the assistant, tool, and workflow.
  2. Automate Enrollments:
    • Add new users to workflows automatically (e.g., via CRM triggers or API calls).

6. Use Case Example

During a chat:

  • User Input: "I need help with a 1,000-square-foot concrete foundation repair."
  • Assistant Action: Extracts:
    • name: John Doe
    • email: john.doe@example.com
    • address: 123 Main St, Springfield
    • concrete_issue: Foundation repair
    • concrete_details: 1,000-square-foot residential project
  • Workflow Output: Updates contact details and sends them to the sales or support team.

Conclusion

By consolidating extractions into one tool, you streamline data collection and processing. This approach reduces complexity, ensures consistency, and prepares your assistant for scalable deployments.


Was this article helpful?