# 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="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-355cf6c3a7628ecc7d924c79313c36cac8138be4%2FScreenshot%202025-06-19%20at%201.17.10%E2%80%AFPM.png?alt=media" 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="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-fec387f8903e330abbfbe328d7868cde36247bb2%2FScreenshot%202025-06-19%20at%201.16.05%E2%80%AFPM.png?alt=media" 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="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-b27d5f99d441780d6aa47d0791d9978f83eb95fe%2FScreenshot%202025-06-19%20at%201.12.27%E2%80%AFPM.png?alt=media" alt="" width="290"><figcaption></figcaption></figure>
