Smartlead icon

Smartlead

Interact with the Smartlead.ai API

Overview

This node interacts with the Smartlead.ai API to manage leads within campaigns. Specifically, the "List All By Campaign" operation under the "Lead" resource retrieves a paginated list of all leads associated with a specified campaign ID. This is useful for scenarios where you want to analyze or process all leads tied to a particular marketing or sales campaign.

Practical examples include:

  • Exporting or reviewing all leads from a campaign for reporting.
  • Feeding lead data into other systems for further processing or nurturing.
  • Monitoring lead engagement status filtered by email sequence or status (opened, clicked, replied).

Properties

Name Meaning
Campaign ID The unique identifier of the campaign whose leads you want to list.
Additional Options Optional parameters to refine the results:
- Limit: Maximum number of leads to return (default 50).
- Offset: Starting index for pagination (default 0).
- Email Sequence Number: Filter leads by their email sequence step number (e.g., 1, 2).
- Email Status: Filter leads by email interaction status; options are "Opened", "Clicked", "Replied".

Output

The output is a JSON array containing lead objects retrieved from the specified campaign. Each object represents a lead with its associated details as provided by the Smartlead.ai API. The exact structure depends on the API response but typically includes lead identifiers, contact information, and possibly engagement metadata.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to the Smartlead.ai API via an API key credential configured in n8n.
  • The node uses the base URL https://server.smartlead.ai/api/v1 for all requests.
  • Proper permissions on the API key to access campaign leads are necessary.

Troubleshooting

  • Common Issues:

    • Invalid or missing Campaign ID will cause the API request to fail.
    • Pagination parameters (limit, offset) set incorrectly may result in empty or incomplete data.
    • Filtering by email sequence number or status might return no results if no leads match those criteria.
  • Error Messages:

    • Authentication errors indicate issues with the API key credential setup.
    • "Not Found" errors usually mean the campaign ID does not exist or is inaccessible.
    • Rate limiting or server errors from the API should be retried after some delay.
  • Resolutions:

    • Verify the campaign ID is correct and accessible.
    • Check API credentials and permissions.
    • Adjust pagination and filter parameters to valid values.
    • Implement error handling in workflows to manage API rate limits or downtime.

Links and References

Discussion