SmartLead icon

SmartLead

Comprehensive SmartLead API integration for email marketing automation

Overview

The "Unsubscribe from All" operation in the Lead Management resource allows users to unsubscribe a lead (identified by their email address) from all email campaigns managed via the SmartLead platform. This is useful for compliance with email marketing regulations, managing user preferences, or cleaning up mailing lists by ensuring that a lead no longer receives any campaign emails.

Common scenarios:

  • A lead requests to opt out of all communications.
  • Automatically unsubscribing leads who have marked emails as spam or requested removal.
  • Managing global unsubscribe preferences across multiple campaigns.

Practical example:
You have a lead with the email john.doe@example.com who wants to stop receiving all marketing emails. Using this node operation, you provide the email address, and the node sends a request to unsubscribe that lead from every campaign they are part of.


Properties

Name Meaning
Email Address The email address of the lead to unsubscribe from all campaigns.
Additional Fields Optional parameters such as Limit (number of results), Offset (pagination offset), and Status (campaign status filter). These fields are generally used in other operations but are available here as additional options.

Note: For this specific operation ("Unsubscribe from All"), only the Email Address property is required and directly relevant.


Output

The node outputs JSON data representing the response from the SmartLead API after attempting to unsubscribe the lead from all campaigns.

  • The output JSON typically contains confirmation of the unsubscribe action or details about the lead's updated subscription status.
  • If an error occurs (e.g., invalid email format or lead not found), the output will contain an error message.
  • No binary data is produced by this operation.

Example output structure (simplified):

{
  "success": true,
  "message": "Lead unsubscribed from all campaigns",
  "email": "john.doe@example.com"
}

Dependencies

  • Requires an active connection to the SmartLead API service.
  • Needs an API authentication token configured in n8n credentials (referred generically as "an API key credential").
  • The base URL for API requests is https://server.smartlead.ai/api/v1.
  • Proper permissions on the API key to manage leads and perform unsubscribe actions.

Troubleshooting

Common Issues

  • Invalid JSON input: Although this operation does not require JSON input, other lead-related operations do. Ensure JSON inputs are correctly formatted.
  • Invalid or missing email address: The email must be provided and valid; otherwise, the API will reject the request.
  • API authentication errors: Ensure the API key credential is valid and has sufficient permissions.
  • Network issues: Connectivity problems can cause request failures.

Common Error Messages

  • "Invalid JSON in lead data" — Not applicable here but relevant for other operations involving JSON input.
  • "Lead not found" — The specified email does not exist in the system.
  • "Unauthorized" — API key is missing or invalid.
  • "Bad Request" — Missing required parameters or invalid parameter values.

Resolution Tips:

  • Double-check the email address format.
  • Verify API credentials and permissions.
  • Review network connectivity.
  • Use the node's "Continue On Fail" option to handle errors gracefully in workflows.

Links and References


If you need further details on other operations or resources, feel free to ask!

Discussion