# n8n-nodes-smartlead-v1-8-0

🚀 **SmartLead API v1.8.0** - Complete Email Marketing Automation for n8n

A comprehensive n8n community node for [SmartLead](https://smartlead.ai) - the most powerful email marketing automation platform for outbound sales.

## ✨ Features

### 🎯 Campaign Management (10 Operations)

- **Get All Campaigns** - Retrieve all campaigns
- **Get Campaign by ID** - Get detailed campaign information
- **Create Campaign** - Create new email campaigns
- **Update Schedule** - Modify campaign timing settings
- **Update Settings** - Configure campaign parameters
- **Save Sequence** - Create/update email sequences
- **Update Status** - Start, pause, or stop campaigns
- **Get Sequence** - Fetch campaign email sequence
- **Export Data** - Download campaign results
- **Delete Campaign** - Remove campaigns

### 👥 Lead Management (14 Operations)

- **Get All by Campaign** - Retrieve campaign leads
- **Get Categories** - Fetch lead categorization options
- **Get by Email** - Find leads by email address
- **Add to Campaign** - Upload leads to campaigns (max 350 per batch)
- **Resume/Pause/Delete** - Control lead status
- **Unsubscribe** - Remove from campaign or all campaigns
- **Block List** - Add to global block list
- **Update/Update Category** - Modify lead information
- **Message History** - View email conversations
- **Reply to Lead** - Respond from master inbox

### 📧 Email Account Management (9 Operations)

- **Get All for User** - List all connected accounts
- **Get All for Campaign** - Campaign-specific accounts
- **Get by ID** - Account details
- **Create/Update** - Manage account settings
- **Add/Remove from Campaign** - Account-campaign linking
- **Update Warmup** - Configure deliverability settings
- **Reconnect Failed** - Fix connection issues

### 📊 Analytics & Stats (4 Operations)

- **Campaign Stats** - Performance metrics (opens, clicks, replies)
- **Campaign Stats by Date** - Time-range analytics
- **Warmup Stats** - Email account health monitoring
- **Top Level Analytics** - Account overview

## 📦 Installation

1. Install in n8n:

   ```bash
   npm install n8n-nodes-smartlead-v1-8-0
   ```

2. Restart your n8n instance

3. The **SmartLead** node will appear in your node palette

## 🔐 Authentication

1. Get your API key from SmartLead:

   - Go to **Settings** → **API Access**
   - Click "Activate API"
   - Copy your API key

2. In n8n:
   - Create new **SmartLead API** credentials
   - Paste your API key
   - Save the credentials

## 🚀 Quick Start

### Example 1: Get All Campaigns

```
1. Add SmartLead node
2. Select Resource: "🎯 Campaign Management"
3. Select Operation: "Get All"
4. Execute
```

### Example 2: Add Leads to Campaign

```
1. Add SmartLead node
2. Select Resource: "👥 Lead Management"
3. Select Operation: "Add to Campaign"
4. Enter Campaign ID
5. Provide lead data in JSON format:
   {
     "email": "john@example.com",
     "first_name": "John",
     "last_name": "Doe",
     "company": "Example Corp"
   }
```

### Example 3: Get Campaign Performance

```
1. Add SmartLead node
2. Select Resource: "📊 Analytics & Stats"
3. Select Operation: "Campaign Stats"
4. Enter Campaign ID
5. Execute to get metrics
```

## 📊 Rate Limits

- **60 requests per 60 seconds** per API key
- **350 leads maximum** per batch upload
- Monitor headers: `x-ratelimit-remaining`, `x-ratelimit-reset`

## 🛠️ API Coverage

This node covers **37 operations** across all major SmartLead API endpoints:

- ✅ All Campaign Management endpoints
- ✅ All Lead Management endpoints
- ✅ All Email Account endpoints
- ✅ All Analytics endpoints
- ✅ Proper authentication handling
- ✅ Error handling and validation
- ✅ Rate limit awareness

## 🔗 Resources

- [SmartLead Website](https://smartlead.ai)
- [SmartLead API Documentation](https://api.smartlead.ai/reference)
- [n8n Community Nodes](https://docs.n8n.io/integrations/community-nodes/)

## 📝 License

MIT License - feel free to use in your automations!

## 🐛 Issues & Support

For issues with this n8n node, please check:

1. Your API key is valid and has proper permissions
2. You're within rate limits (60 req/60s)
3. Campaign/Lead/Account IDs are correct

---

**Happy Automating!** 🚀

_Built with ❤️ for the n8n community_
