# Voice Agent Use Case: Calling & Logging HubSpot Leads

{% embed url="<https://www.loom.com/share/3a6c73a0575d443eb11c30c51eb42b30>" %}

**🎯 Campaign Objective**

Call newly added HubSpot contacts from a specific list and deliver a quick product intro using your voice agent. Log the call details and outcomes back to HubSpot for follow-up by your sales team.<br>

**🔧 Workflow Overview**

1. **Connect your HubSpot account**
2. **Fetch a list of contacts from HubSpot**
3. **Trigger calls using your AI voice agent**
4. **Capture call data (recording, transcript, status)**
5. **Log results and update contact records in HubSpot**

Let’s start with Step 1: **Connecting HubSpot credentials and configuring the “Get List” node** 👉\
\
🔑 **Step 1: Connect Your HubSpot Account**

To get started, you'll need to authorize your HubSpot account so Dapta can pull contact data and update records.

**🧭 How to Connect HubSpot:**

1. Click your profile avatar in the bottom-left corner of Dapta.\
   \
   ![](https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-78610fae8f4765cc74b7d91c557696154369a285%2FScreenshot%202025-06-23%20at%2010.30.19%E2%80%AFAM.png?alt=media)<br>
2. Select **Credentials** from the dropdown.
3. Click the **➕** button next to HubSpot.<br>

   <figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-d089f69fc8f1d5c90890901fc8cd33a4f1bf88fa%2FScreenshot%202025-06-23%20at%2010.30.30%E2%80%AFAM.png?alt=media" alt=""><figcaption></figcaption></figure>
4. In the modal:
   * **Name** your connection (e.g., “HubSpot Main”).
   * Paste your **HubSpot Private App Token**.\
     [🔗 Learn more about Hubspot Private App Setup](https://docs.dapta.ai/integrations/hubspot-private-app-setup)
   * Click **Save**.<br>

     <div align="left"><figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-b38f9205e833570b3f449d17eb6b305c7118b258%2FScreenshot%202025-06-23%20at%2010.30.50%E2%80%AFAM.png?alt=media" alt="" width="549"><figcaption></figcaption></figure></div>

Once connected, you’ll be able to use HubSpot in any flow via the “Get List,” “Search Record,” and “Update Record” nodes.

✅ **Step 2: Create Your Flow and Add the “Get List” Node**

🆕 **Start a Flow**\
From the Flow Studio:

* Click **New Flow** > **New Flow From Scratch**<br>

  <figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-ea92a875fc78c8e31d05b04ec81704325f9c71f6%2FScreenshot%202025-06-23%20at%203.31.56%E2%80%AFPM.png?alt=media" alt=""><figcaption><p><br><br></p></figcaption></figure>

  <figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-eacc3e451c77077e24e781cd274231a82c0f6a06%2FScreenshot%202025-06-23%20at%203.30.53%E2%80%AFPM.png?alt=media" alt=""><figcaption><p><br><br></p></figcaption></figure>

  <div align="left"><figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-5cce331a28c83067274ab35fd7e6ffb7485def92%2FScreenshot%202025-06-23%20at%203.30.59%E2%80%AFPM.png?alt=media" alt=""><figcaption></figcaption></figure></div>
* **Note:** You can also choose from pre-built templates here (e.g., “Update Contact and Log Call in HubSpot”)

🔌 **Add the “Get List” Node**\
Once inside your flow:

* Search for **“Get List”** in the right sidebar
* Drag it onto the canvas

<div align="left"><figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-f4be341d5c43f5ab99456e91c34ec3f86e57f48d%2FScreenshot%202025-06-23%20at%203.40.29%E2%80%AFPM.png?alt=media" alt=""><figcaption></figcaption></figure></div>

1. **Connect to Trigger**\
   Link the **Trigger** node (already present in every new flow) to the **Get List** node by dragging from the bottom of the Trigger to the top of Get List.\
   \
   ⚡ About the Trigger Node

   Every new Dapta flow begins with a Trigger node. This is what starts the flow when a condition is met.<br>

   There are two main trigger types:

   * **Webhook (HTTP Request)** – Starts the flow when an external service sends a request to this URL. Useful for syncing data from CRMs like HubSpot or responding to user actions.
   * **Schedule** – Runs the flow automatically on a schedule (e.g., daily, hourly).

   For this use case, we’re using a **Webhook Trigger** with a `GET` method so the flow activates when a GET request is sent to the provided Webhook URL.

   [🔗 Learn more about Trigger types](https://docs.dapta.ai/flow-studio/setting-up-triggers-in-flow-studio)\
   \
   ![](https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-fe227448a45940d6c7c5f86d81f94c14a4e89503%2FScreenshot%202025-06-23%20at%2010.58.43%E2%80%AFAM.png?alt=media)<br>

   <figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-8d41ff80806c501859423b6f415a239e2a05d50e%2Fhttps___files.gitbook.com_v0_b_gitbook-x-prod.appspot.com_o_spaces%202FCy5rSNtQmtqYCGzJlNEB%202Fuploads%202FbCYZ9xYhhnbb8475aE3M%202FScreenshot%20202025-06-23%2020at%20203.15.47%20E2%2080%20AFPM%20copy.png?alt=media" alt=""><figcaption></figcaption></figure>
2. **Configure the Get List Node**
   * **Credentials**: Select your authorized **HubSpot** account.
   * **List**: Choose the list of contacts you want to retrieve.\
     [🔗](https://docs.dapta.ai/flow-studio/setting-up-triggers-in-flow-studio)[Learn More about HubSpot Lists](https://knowledge.hubspot.com/lists/create-active-or-static-lists)
   * **Output Properties (optional)**: Define which fields you want to pull (e.g., `email`, `company`, `createdate`, etc.).\ <br>

     <figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-f8fc9280e2676f2cf022750bd2964ce431d32064%2FScreenshot%202025-06-23%20at%2011.06.25%E2%80%AFAM.png?alt=media" alt=""><figcaption></figcaption></figure>

This sets up your flow to pull a contact list from HubSpot each time it’s triggered.

#### 🔁 Step 3: Add the “Loop List” Node (Dapta Action)

Now that we’ve pulled your contacts from HubSpot, we need to loop through them one by one.

1. **Search & Add Node**\
   In the **Actions** panel, search for `Loop List`.\
   You’ll see it labeled as a **Dapta Action**.\
   Drag it onto the canvas.\ <br>

   <figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-17e2f7cd388203d13d38b170d0cc3e50a5158e57%2FScreenshot%202025-06-23%20at%203.26.27%E2%80%AFPM.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>
2. **Connect It**\
   Link the `Get List` node to the `Loop List` node to start iterating through your contact list.\
   \
   \
   ![](https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-881f0d2c3fe32dbc6934206c0b0eac475ab4cd4b%2FScreenshot%202025-06-23%20at%2011.13.04%E2%80%AFAM.png?alt=media)\
   \
   3\. **Configure the Loop**\
   \
   In the **List of Items to Process** field, enter:\
   `{{get_list.response.results}}`\
   This tells Dapta to loop over each contact in the list. Each item will be accessible with the `item` variable in the following steps.\ <br>

   <figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-64998f5769c7502e322e327bfae0c2d68d9f9a3f%2FScreenshot%202025-06-23%20at%2011.15.31%E2%80%AFAM.png?alt=media" alt=""><figcaption></figcaption></figure>

   **📞 Step 4: Add the “Dapta Phone Call” Node**<br>

   Now that we’re looping through each contact, it’s time to place the calls.

   **Search & Add Node**\
   In the Actions panel, search for `Dapta Phone Call`.\
   \
   ![](https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-29d08ad0bb565ddf9f5e3740c9e272eedd01dc8f%2FScreenshot%202025-06-23%20at%2012.53.31%E2%80%AFPM.png?alt=media)\
   \
   Drag it into the canvas and connect it to the Loop List node.

   **Configure the Call**\
   Click into the node to set your call parameters:

   * Choose your **Voice Agent**
   * You can map the variables like `{{item.firstname}}`, `{{item.phone}}`, etc.
   * Adjust call speed and retry logic if needed\
     [🔗 Learn more about Voice Agent Settings](https://docs.dapta.ai/ai-voice-agents/how-to-set-up-your-ai-voice-agent/voice-agent-settings-guide)\
     \
     ![](https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-287585480be26a7ccb2b6935933e10961d880837%2FScreenshot%202025-06-23%20at%2012.53.54%E2%80%AFPM.png?alt=media)<br>

   This node will dial each contact in your HubSpot list using the selected voice agent, one at a time.

📤 **Step 4: Configure Post‑Call Data Retrieval**\
\
[🔗 Learn Extraction Information From Your Calls](https://docs.dapta.ai/ai-voice-agents/extracting-information-from-your-calls)\
\
**1. Go to Your Agent Settings**\
Open your agent in Dapta, then navigate to the **Call Analysis** tab.\
\
**2. Select a Call Analysis Flow**\
Click **“Select Call Analysis Flow”** and choose a Dapta flow you’ve created.\
\
![](https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-5f00875120101d10fa60fe7ee3a188e8281e8c99%2FScreenshot%202025-06-23%20at%201.08.47%E2%80%AFPM.png?alt=media)\
\
**3. Optional Add Post‑Call Fields**\
Under **Post Call Data Retrieval**, click **“+ Add”** to define the insights you want extracted.

<figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-cf6d4674e49df246c9cdb3512a9446dcb6f65b76%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

Example fields:

* `detailed_call_summary` → *“Give a detailed call summary regarding the details of the call.”*
* `reason_to_buy` → *“What was the main reason the contact was interested?”*

These instructions guide the AI on what to extract after the call ends.<br>

<figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-ee2f0a04b7049161d218eebbfe8b595118992079%2FScreenshot%202025-06-23%20at%201.08.23%E2%80%AFPM.png?alt=media" alt="" width="494"><figcaption></figcaption></figure>

**4. Build the New Receiving Flow**\
Create a new Dapta flow to handle incoming post-call data:

* Start with a **Webhook Trigger**
  * Method: `POST`
  * Accept parameters like: `event`, `call`, and `data`
* Add your logic to update your CRM using values from:
  * `call_analysis.call_summary`
  * `call_analysis.custom_analysis_data.detailed_call_summary`, etc.\
    \
    ![](https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-f67e0a01d52e2c972a3e503fee9801c41bd8b06e%2FScreenshot%202025-06-23%20at%201.30.07%E2%80%AFPM.png?alt=media)\ <br>

    <div align="left"><figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-6b83d3e97ce5d92256b802ce122d33bfaac0209e%2Fhttps___files.gitbook.com_v0_b_gitbook-x-prod.appspot.com_o_spaces%202FCy5rSNtQmtqYCGzJlNEB%202Fuploads%202Fyv6uvwejNX8cqueWNUYn%202FScreenshot%20202025-06-23%2020at%20201.30.15%20E2%2080%20AFPM%20copy%202.png?alt=media" alt=""><figcaption><p><br></p></figcaption></figure></div>

✅ **Final Step: Connect the HubSpot Logging Node**

To push the analyzed call data into your CRM, connect the final **Log Phone Call** node.

**Required Fields:**

* **Call Data:** `{{trigger.body.call}}`\
  ⚠️ *Important:* This must be set to `trigger.body.call`. Dapta handles some CRM update mechanics in the background, so this specific structure is required for logging to work properly.
* **Call Name:** `{{trigger.body.call.call_id}}`
* **HubSpot Contact ID or Phone Number:** `{{trigger.body.call.to_number}}`\ <br>

  <div align="left"><figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-02ecd72d57776715e708449c044aae4cd152c09d%2FScreenshot%202025-06-23%20at%201.40.56%E2%80%AFPM.png?alt=media" alt="" width="177"><figcaption></figcaption></figure></div>

  <div align="left"><figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-757e7dce79979fd01f031fb3f786d11a6b22650e%2FScreenshot%202025-06-23%20at%201.41.11%E2%80%AFPM.png?alt=media" alt="" width="375"><figcaption></figcaption></figure></div>

  **🧪 Test and Debug Post-Call Logging**

  1. **Open the Flow**
     * Go to your webhook-triggered flow that receives post-call data.
  2. **Run a Previous Execution**
     * Go to the **Executions** tab in your Call Analysis Flow.
     * Click the 👁️ icon on a successful run.\
       \
       ![](https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-27387158aeb682ddf5b8485f135a094a46d9b399%2FScreenshot%202025-06-23%20at%201.30.31%E2%80%AFPM.png?alt=media)<br>
     * In the **Request Body** panel, click **“Copy to input.”**\
       \
       ![](https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-942ba22ca1ebd464f13d3c12ab20eff78ca46e87%2FScreenshot%202025-06-23%20at%201.33.11%E2%80%AFPM.png?alt=media)\ <br>

       **View Request Body**

       * Expand the **Request Body** panel to inspect exactly what data was sent.

       \
       ![](https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-a5b44eed291d8c3b7f0288529a219b2e14e8fcea%2FScreenshot%202025-06-23%20at%201.32.06%E2%80%AFPM.png?alt=media)<br>
  3. **Trigger the Logging Flow**
     * Hit **“Run Flow”**
  4. **Confirm CRM Logging**
     * Check HubSpot Contacts to verify the call was logged correctly.\
       \
       ✅ **Once the flow runs successfully, the call will be logged inside the contact’s activity timeline in HubSpot.**\
       \
       ![](https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-7d8dad7e2b1dd0b91538f4b9535ca449de1c1272%2FScreenshot%202025-06-23%20at%201.51.02%E2%80%AFPM.png?alt=media)<br>
