# Add contacts to a campaign via Flow Studio

🧱 **Step 1: Add the “Add Contact To Campaign” Node**\
In Flow Studio, start by adding the **Add Contact To Campaign** node to your flow.

1. Open the **Templates** panel
2. Search for **"Add Contacts To Campaign"**
3. Drag and drop the node into your flow

This node allows you to send contacts into a voice campaign directly from your data source. In the next steps, you’ll connect it to a list of leads from tools like HubSpot.

<figure><img src="/files/h0DmsIDRux2cz0BNuzMY" alt=""><figcaption></figcaption></figure>

***

🧱 **Step 2: What the “Add Contact To Campaign” Node Does**\
This node sends each contact into a specific Dapta campaign.

You must provide:

* ✅ **Campaign name** (already created in Dapta)
* 📞 **Valid phone number**
* 🔑 Optional mapped fields (e.g., name, email, external ID)

🚫 Contacts missing phone numbers or with invalid formatting will be skipped automatically.

<figure><img src="/files/o4c3rK223tNO5fAKoVCs" alt=""><figcaption></figcaption></figure>

***

🚀 **Step 3: Example Flow**

**Goal**: Sync all new HubSpot leads created after yesterday into a campaign.

#### 🛠 Node Breakdown:

1️⃣ **Trigger** – Scheduled Task (e.g., daily at 8 AM)\
2️⃣ **Search Record (HubSpot)** – Pulls new contacts using filters like `createdate > yesterday`\
3️⃣ **Loop List** – Iterates through each matching contact\
4️⃣ **Add Contact To Campaign** – Sends each contact to Dapta with mapped values:

| Property      | Value                                       |
| ------------- | ------------------------------------------- |
| Phone Number  | `{{contacts.item.properties.phone}}`        |
| Contact Name  | `{{contacts.item.properties.firstname}}`    |
| Contact Email | `{{contacts.item.properties.email}}`        |
| External ID   | `{{contacts.item.properties.hs_object_id}}` |

<figure><img src="/files/SQJQEqW5cJ938EvvKepV" alt="" width="290"><figcaption></figcaption></figure>


---

# 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/how-to-create-your-first-campaign-in-dapta/add-contacts-to-a-campaign-via-flow-studio.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.
