Actions37
- 🎯 Campaign Management Actions
- 👥 Lead Management Actions
- 📧 Email Accounts Actions
- 📊 Analytics & Stats Actions
Overview
This node integrates with the SmartLead API to manage lead categories within an email marketing automation workflow. Specifically, the Get Categories operation under the Lead Management resource fetches all lead categories available in the SmartLead system.
This operation is useful when you want to retrieve and display or process the different categories of leads that exist in your SmartLead account. For example, you might use it to dynamically populate dropdowns in subsequent nodes or to segment leads based on their categories for targeted campaigns.
Practical examples:
- Fetching all lead categories to allow users to select a category for filtering leads.
- Synchronizing lead categories from SmartLead into another CRM or database.
- Automating workflows that branch logic depending on lead categories.
Properties
| Name | Meaning |
|---|---|
| Additional Fields | Optional parameters to refine the request: |
| - Limit | Number of results to return (default 100) |
| - Offset | Number of results to skip (default 0) |
| - Status | Campaign status filter; options are: Active, Paused, Stopped (default: Active) |
Note: Although "Additional Fields" includes campaign-related filters like status, limit, and offset, for the Get Categories operation these fields are not used in the API call as per the static code analysis.
Output
The output JSON contains an array of lead categories retrieved from the SmartLead API endpoint /leads/categories. Each item in the array represents a lead category object with its properties as defined by the API response.
The node returns this data as standard JSON; there is no binary data output for this operation.
Example output structure (simplified):
[
{
"id": "category_id_1",
"name": "Category Name 1",
"description": "Description of category 1"
},
{
"id": "category_id_2",
"name": "Category Name 2",
"description": "Description of category 2"
}
]
Dependencies
- Requires an API key credential configured in n8n for authenticating requests to the SmartLead API.
- The base URL for API requests is
https://server.smartlead.ai/api/v1. - The node uses HTTP GET method to fetch categories from the
/leads/categoriesendpoint.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication errors.
- Network connectivity problems can prevent reaching the SmartLead API server.
- If the API rate limits are exceeded, requests may fail temporarily.
Error messages:
- Authentication failures typically return 401 Unauthorized errors. Ensure the API key credential is correctly set up.
- 404 Not Found errors may indicate incorrect resource or operation selection.
- 500 Internal Server Error indicates server-side issues; retry after some time.
Resolution tips:
- Verify API credentials and permissions.
- Check network access and proxy settings if applicable.
- Review SmartLead API status for outages.
Links and References
- SmartLead API Documentation (Assumed URL based on base URL)
- n8n Documentation on Creating Custom Nodes
- General REST API best practices for error handling and authentication