Smartlead icon

Smartlead

Interact with the Smartlead.ai API

Overview

This node integrates with the Smartlead.ai API to manage leads and campaigns. Specifically, the "Unsubscribe From Campaign" operation under the "Lead" resource allows you to unsubscribe a specific lead from a particular campaign. This is useful in scenarios where a lead no longer wishes to receive communications related to a campaign, helping maintain compliance with email marketing regulations and improving user experience.

Practical examples:

  • Automatically unsubscribing a lead who has requested to opt out of a campaign.
  • Managing lead preferences dynamically based on their interactions or requests.
  • Cleaning up campaign lists by removing uninterested leads.

Properties

Name Meaning
Campaign ID The unique identifier of the campaign from which the lead will be unsubscribed.
Lead ID The unique identifier of the lead to unsubscribe from the specified campaign.

Output

The output JSON contains the response from the Smartlead.ai API after attempting to unsubscribe the lead from the campaign. It typically includes confirmation of the action or details about the updated lead status within the campaign.

No binary data is output by this operation.

Dependencies

  • Requires an API key credential for authenticating with the Smartlead.ai API.
  • The node makes HTTP POST requests to the endpoint: https://server.smartlead.ai/api/v1/campaigns/{campaignId}/leads/{leadId}/unsubscribe.
  • Proper configuration of the API key credential in n8n is necessary for successful execution.

Troubleshooting

  • Common issues:

    • Invalid or missing Campaign ID or Lead ID parameters will cause the API call to fail.
    • Authentication errors if the API key credential is not set up correctly.
    • Network connectivity issues preventing access to the Smartlead.ai API.
  • Error messages:

    • Errors returned from the API (e.g., "Lead not found", "Campaign not found") indicate incorrect IDs or that the lead is not part of the campaign.
    • Authentication errors suggest checking the API key credential setup.
  • Resolutions:

    • Verify that both Campaign ID and Lead ID are correct and correspond to existing entities in Smartlead.ai.
    • Ensure the API key credential is valid and has appropriate permissions.
    • Check network connectivity and firewall settings.

Links and References

  • Smartlead.ai API Documentation (general reference; actual URL may vary)
  • n8n documentation on HTTP Request Node for understanding API calls
  • Email marketing compliance guidelines (e.g., GDPR, CAN-SPAM) for context on unsubscribing leads

Discussion