SmartLead icon

SmartLead

Comprehensive SmartLead API integration for email marketing automation

Overview

This node integrates with the SmartLead API to retrieve and manage email marketing campaign analytics and statistics. Specifically, the Campaign Stats operation under the Analytics & Stats resource fetches detailed performance data for a given campaign by its ID. This is useful for marketers and automation specialists who want to monitor campaign effectiveness, track engagement metrics, or generate reports based on campaign activity.

Typical use cases include:

  • Fetching overall campaign statistics such as opens, clicks, bounces, and conversions.
  • Analyzing campaign performance over specific date ranges.
  • Retrieving top-level analytics summaries for high-level insights.

For example, you might use this node to automatically pull daily campaign stats into a dashboard or trigger follow-up workflows based on campaign engagement metrics.

Properties

Name Meaning
Campaign ID The unique identifier of the campaign for which statistics are requested.
Additional Fields Optional parameters to refine the query:
- Limit Number of results to return (pagination control).
- Offset Number of results to skip (pagination control).
- Status Filter campaigns by status; options are: Active, Paused, Stopped.

Note: For the Campaign Stats operation specifically, only the Campaign ID is required. The additional fields are available but not mandatory.

Output

The node outputs JSON data containing the campaign statistics retrieved from the SmartLead API. The structure typically includes various metrics related to the campaign's performance, such as:

  • Total emails sent
  • Open rates
  • Click rates
  • Bounce counts
  • Unsubscribes
  • Other engagement and delivery statistics

The exact fields depend on the SmartLead API response for campaign stats.

If multiple items are processed, the output is an array of JSON objects, each corresponding to one input item’s result.

The node does not output binary data.

Dependencies

  • Requires an API key credential for authenticating with the SmartLead API.
  • The base URL used is https://server.smartlead.ai/api/v1.
  • Proper configuration of the API key credential in n8n is necessary for successful requests.

Troubleshooting

  • Invalid Campaign ID: If the provided campaign ID does not exist or is malformed, the API will likely return an error. Verify the campaign ID is correct.
  • Authentication Errors: Ensure the API key credential is valid and has sufficient permissions.
  • Rate Limits: Excessive requests may be throttled by the API. Implement retry logic or reduce request frequency if needed.
  • JSON Parsing Errors: When providing JSON inputs (not typical for this operation), ensure the JSON is well-formed.
  • Empty Results: If no stats are returned, confirm that the campaign has recorded activity and that the correct campaign ID is used.

Common error messages come directly from the API and are surfaced by the node. Reading the message usually indicates the cause (e.g., "Unauthorized", "Not Found").

Links and References


This summary focuses on the Analytics & Stats resource and the Campaign Stats operation as requested.

Discussion