Actions74
- šÆ Campaign Management Actions
- š„ Lead Management Actions
- š§ Email Accounts Actions
- š Analytics & Stats Actions
- š Smart Delivery Actions
- Get Region Provider IDs
- Create Manual Placement Test
- Create Automated Placement Test
- Get Spam Test Details
- Delete Tests in Bulk
- Stop Automated Test
- List All Tests
- Get Provider Report
- Get Geo Report
- Get Sender Account Report
- Get Spam Filter Report
- Get DKIM Details
- Get SPF Details
- Get rDNS Report
- Get Sender Account List
- Get Blacklists
- Get Domain Blacklist
- Get Spam Test Email Content
- Get Email Reply Headers
- Get Schedule History
- Get IP Details
- Get Mailbox Summary
- Get Mailbox Count
- Get All Folders
- Create Folder
- Get Folder by ID
- Delete Folder
- š Webhooks Actions
- šØ Smart Senders Actions
Overview
This node integrates with the SmartLead API to manage email marketing campaigns, leads, email accounts, analytics, and related services. Specifically, for the Email Accounts resource and the Remove from Campaign operation, it allows users to remove an email account from a specified campaign. This is useful when you want to stop using a particular email account in a campaign, for example, if the account is no longer active or you want to reassign resources.
Practical scenarios include:
- Cleaning up campaigns by removing inactive or problematic email accounts.
- Managing campaign resources dynamically based on performance or availability.
- Automating campaign maintenance workflows where email accounts are added or removed programmatically.
Properties
| Name | Meaning |
|---|---|
| Campaign ID | The unique identifier of the campaign from which the email account will be removed. |
| Email Account ID | The unique identifier of the email account to remove from the campaign. (Implicit in code) |
| Additional Fields | Not applicable specifically for this operation. |
Note: The provided properties JSON only lists "Campaign ID" and "Additional Fields" for some operations, but the code shows that the email account ID is also required for this operation (passed as emailAccountId).
Output
The output is a JSON array representing the response data from the SmartLead API after attempting to remove the email account from the campaign. The structure depends on the API's response but generally includes confirmation of removal or error details.
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential for authenticating with the SmartLead API.
- The base URL used is
https://server.smartlead.ai/api/v1. - The node uses HTTP DELETE method to remove the email account from the campaign endpoint.
- No additional environment variables are explicitly required beyond the API authentication.
Troubleshooting
- Invalid or missing Campaign ID or Email Account ID: The operation requires both IDs; ensure they are correctly provided.
- API Authentication Errors: If the API key is invalid or missing, requests will fail. Verify credentials in n8n.
- Network or Server Errors: Temporary network issues or server downtime can cause failures. Retry or check SmartLead service status.
- Error Messages: The node throws errors with messages from the API or JSON parsing errors if input data is malformed. Review error messages for clues.
- Continue On Fail: If enabled, the node will continue processing other items even if one fails, returning error details in the output.
Links and References
- SmartLead API Documentation (Assumed official API docs)
- n8n Documentation on Creating Custom Nodes
- General REST API usage and HTTP methods references
Summary of execute() logic for Remove from Campaign (Email Accounts)
- Reads input parameters:
campaignIdandemailAccountId. - Constructs the URL:
https://server.smartlead.ai/api/v1/campaigns/{campaignId}/email-accounts/{emailAccountId}. - Sends an HTTP DELETE request to that URL.
- Returns the API response data as JSON output.
- Handles errors gracefully, optionally continuing on failure.