Actions37
- 🎯 Campaign Management Actions
- 👥 Lead Management Actions
- 📧 Email Accounts Actions
- 📊 Analytics & Stats Actions
Overview
This node integrates with the SmartLead API to manage leads and their subscriptions within email marketing campaigns. Specifically, the "Unsubscribe from Campaign" operation allows users to unsubscribe a lead (identified by their email address) from a specific campaign using the campaign's ID. This is useful for managing opt-outs and ensuring compliance with email marketing regulations by removing leads who no longer wish to receive communications from a particular campaign.
Practical examples:
- Automatically unsubscribing a user who clicks an unsubscribe link in an email.
- Removing leads who have requested to stop receiving emails from a specific campaign without affecting their subscription status in other campaigns.
- Managing lead preferences dynamically based on user interactions or support requests.
Properties
| Name | Meaning |
|---|---|
| Campaign ID | The unique identifier of the campaign from which the lead will be unsubscribed. |
| Email Address | The email address of the lead to unsubscribe from the specified campaign. |
| Additional Fields | Not applicable for this operation (present in other operations). |
Output
The output JSON contains the response data returned by the SmartLead API after attempting to unsubscribe the lead from the campaign. Typically, this includes confirmation of the unsubscription action or details about the lead's updated subscription status.
The output structure is an array of JSON objects representing the API response data under the json field. No binary data is involved in this operation.
Example output snippet (conceptual):
[
{
"success": true,
"message": "Lead unsubscribed from campaign successfully",
"email": "lead@example.com",
"campaignId": "12345"
}
]
Dependencies
- Requires an active API key credential for authenticating with the SmartLead API.
- The node makes HTTP POST requests to the SmartLead API endpoint:
https://server.smartlead.ai/api/v1/campaigns/{campaignId}/leads/unsubscribe. - Proper configuration of the API credential in n8n is necessary for successful authentication.
Troubleshooting
Common issues:
- Invalid or missing Campaign ID or Email Address parameters will cause the API request to fail.
- Network connectivity problems or incorrect API credentials can result in authentication errors.
- Attempting to unsubscribe an email not associated with the campaign may return an error or no effect.
Error messages and resolutions:
- "Unauthorized" or "Authentication failed": Verify that the API key credential is correctly configured and has sufficient permissions.
- "Campaign not found": Check that the Campaign ID is correct and the campaign exists.
- "Lead not found in campaign": Confirm that the email address is subscribed to the specified campaign before unsubscribing.
- "Invalid request body": Ensure the email parameter is provided and properly formatted.
Links and References
- SmartLead API Documentation (hypothetical link)
- General best practices for email unsubscribe management: CAN-SPAM Act Compliance