Actions39
- Campaign Actions
- Campaign Statistic Actions
- Client Actions
- Email Account Actions
- Lead Actions
- Master Inbox Actions
- Webhook Actions
Overview
The "Add To Campaign" operation of the Lead resource in this node allows users to add one or more leads to a specified campaign within the Smartlead.ai platform. This is useful for marketing automation, sales outreach, and lead management workflows where you want to programmatically enroll leads into email campaigns or sequences.
Typical use cases include:
- Automatically adding new contacts collected from forms or CRM systems into targeted email campaigns.
- Enriching lead data with custom fields before adding them to campaigns.
- Controlling campaign inclusion behavior by ignoring global block lists, unsubscribe lists, or duplicate leads across campaigns.
For example, you might use this node to add a new lead with their email, name, company info, and custom attributes to a specific campaign, while optionally bypassing certain blocklists to ensure delivery.
Properties
| Name | Meaning |
|---|---|
| Campaign ID | The unique identifier of the campaign to which the lead will be added. |
| The email address of the lead to add. | |
| First Name | The lead's first name (optional). |
| Last Name | The lead's last name (optional). |
| Phone Number | The lead's phone number (optional). |
| Company Name | The name of the lead's company (optional). |
| Website | The lead's website URL (optional). |
| Location | The geographical location of the lead (optional). |
| LinkedIn Profile URL | URL to the lead's LinkedIn profile (optional). |
| Company URL | URL to the lead's company website (optional). |
| Custom Fields | A collection of key-value pairs representing additional custom attributes for the lead (e.g., Title, Department). Multiple custom fields can be added. |
| Advanced Settings | Collection of boolean options to control how the lead is added: • Ignore Global Block List • Ignore Unsubscribe List • Ignore Community Bounce List • Ignore Duplicate Leads in Other Campaigns |
Output
The output JSON contains the response from the Smartlead.ai API after attempting to add the lead(s) to the campaign. This typically includes details about the created or updated lead entry, confirmation of success, or error information if the operation failed.
The structure generally reflects the API's lead list response, including the lead data and any relevant metadata.
This node does not output binary data.
Dependencies
- Requires an active connection to the Smartlead.ai API.
- Needs an API authentication credential configured in n8n to authorize requests.
- The base URL for API calls is
https://server.smartlead.ai/api/v1.
Troubleshooting
- Missing Required Fields: Ensure that the "Campaign ID" and "Email" properties are provided; these are mandatory.
- API Authentication Errors: Verify that the API key or token credential is correctly set up and has sufficient permissions.
- Blocked Leads: If leads are not being added as expected, check if the lead's email/domain is on any block or unsubscribe lists unless overridden by advanced settings.
- Duplicate Leads: If duplicates are ignored due to existing leads in other campaigns, consider enabling the option to ignore duplicates if appropriate.
- Invalid Custom Fields: Custom field keys and values should be valid strings; malformed entries may cause API errors.
Common error messages usually come directly from the API and indicate issues such as invalid campaign IDs, unauthorized access, or validation failures on lead data.
Links and References
- Smartlead.ai API Documentation (for detailed API endpoints and payload structures)
- n8n Documentation on Creating Custom Nodes