# 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.\
   \
   ![](/files/RrDwPsVK8MF5pmzddD8E)<br>
2. Select **Credentials** from the dropdown.
3. Click the **➕** button next to HubSpot.<br>

   <figure><img src="/files/iC1Y9luAmNHk0EUPMXM6" 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](/integrations/hubspot-private-app-setup.md)
   * Click **Save**.<br>

     <div align="left"><figure><img src="/files/Srb34QpePSd5BGnaiseC" 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="/files/1o4qD9L7BFjhkvBDsP8j" alt=""><figcaption><p><br><br></p></figcaption></figure>

  <figure><img src="/files/1Uhcd4L6g9dhkvzAoYnl" alt=""><figcaption><p><br><br></p></figcaption></figure>

  <div align="left"><figure><img src="/files/UYVfAlgdHskjCXZZQXx6" 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="/files/ryZmD6j5nXVOtt1uFh6U" 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](/flow-studio/setting-up-triggers-in-flow-studio.md)\
   \
   ![](/files/2K9I5NM47XXjwQKiTMEy)<br>

   <figure><img src="/files/pRRmm6LsJEsCKhWhVvCW" 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.\
     [🔗](/flow-studio/setting-up-triggers-in-flow-studio.md)[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="/files/H82PaSel5h89yg8UJNZs" 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="/files/QclpmntknL6HbwMbMIoP" 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.\
   \
   \
   ![](/files/pX9ZUvRUjwYK2sxmBBo1)\
   \
   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="/files/sihoFM6FNzDK0KeBB8rW" 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`.\
   \
   ![](/files/VyN45Jp34qWUrvkBMZi2)\
   \
   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](/ai-voice-agents/how-to-set-up-your-ai-voice-agent/voice-agent-settings-guide.md)\
     \
     ![](/files/hftjBZaKAoBZhXEts4IL)<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](/ai-voice-agents/extracting-information-from-your-calls.md)\
\
**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.\
\
![](/files/Qgb5XQ1TUjMlpGesaxOe)\
\
**3. Optional Add Post‑Call Fields**\
Under **Post Call Data Retrieval**, click **“+ Add”** to define the insights you want extracted.

<figure><img src="/files/zxLa78KEOHvgdAj2XwYx" 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="/files/Dtm1eovKRVPg1oPXV0bh" 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.\
    \
    ![](/files/JTvegTNxyyJexAsHwAw0)\ <br>

    <div align="left"><figure><img src="/files/nhZO01csK8ZETwNdH0rS" 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="/files/Cywkz8jTmOf9pQdzjUWP" alt="" width="177"><figcaption></figcaption></figure></div>

  <div align="left"><figure><img src="/files/y2x4tRFHhTF0LcijBEBc" 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.\
       \
       ![](/files/5CeLAhBcFLDN8wcBIcIr)<br>
     * In the **Request Body** panel, click **“Copy to input.”**\
       \
       ![](/files/jvkqfGe9tRPqrQluMfAA)\ <br>

       **View Request Body**

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

       \
       ![](/files/tnLsH4BvmYoM8Fg5mtnm)<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.**\
       \
       ![](/files/q0pLlRlOWVqoyyh8gX4v)<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dapta.ai/ai-voice-agents/voice-agent-use-case-calling-and-logging-hubspot-leads.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
