# Clone Campaign

> Clone a Smartlead campaign by running the 6-step API recipe (Smartlead has no native clone endpoint). Creates a new campaign and copies schedule, settings, sequences, sender mailboxes, and optionally leads from the source. Use when the user wants to duplicate a campaign, run a V2/V3 of a winning campaign, or copy a campaign template to a new audience.

- **Type:** Skill
- **Install:** `agentstack add skill-mattsezgin-unofficial-smartlead-cli-clone-campaign`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [MattSezgin](https://agentstack.voostack.com/s/mattsezgin)
- **Installs:** 0
- **Category:** [Communication](https://agentstack.voostack.com/c/communication)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [MattSezgin](https://github.com/MattSezgin)
- **Source:** https://github.com/MattSezgin/unofficial-smartlead-cli/tree/main/.claude/skills/clone-campaign
- **Website:** https://github.com/MattSezgin/unofficial-smartlead-cli

## Install

```sh
agentstack add skill-mattsezgin-unofficial-smartlead-cli-clone-campaign
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# /clone-campaign

> **Before running:** verify exact flag names with `smartlead campaigns  --help`. Flag shapes shown below are illustrative — confirm against the actual CLI.

You're cloning an existing campaign. **Smartlead has no `clone` endpoint.** Cloning is a 6-step sequence of real API calls. The CLI exposes each step as its own subcommand — chain them.

## What you need from the user

- **Source campaign ID** to copy from
- **New campaign name**
- Whether to also copy leads (default: NO — V2 usually wants a fresh audience)

## The 6 steps

### Step 1 — Create the new campaign shell

```bash
smartlead campaigns create --name ""
```

Capture the returned `id` as `$NEW_ID`. Subsequent steps need it.

### Step 2 — Copy the schedule

Pull source:
```bash
smartlead campaigns get $SRC_ID --output json | jq '.scheduler'
```

Apply to new:
```bash
smartlead campaigns schedule $NEW_ID \
  --timezone "..." --days "..." \
  --start-hour "..." --end-hour "..." \
  --min-time-between-emails N --max-new-leads-per-day N
```

### Step 3 — Copy the settings

Pull source settings, then POST to the new campaign:
```bash
smartlead campaigns settings $NEW_ID [flags from source]
```

⚠️ Translate field names before posting — see `docs/learnings/settings-api-quirks.md`:
- `DONT_EMAIL_OPEN` → `DONT_TRACK_EMAIL_OPEN`
- `ai_categorisation_options` labels → numeric IDs (1-7)
- `seq_delay_details.delayInDays` → `delay_in_days`

### Step 4 — Copy the sequences

Pull source sequences:
```bash
smartlead campaigns sequences $SRC_ID --output json
```

For each step, POST to the new campaign. The `delayInDays` → `delay_in_days` translation applies here too.

### Step 5 — Assign sender mailboxes

Pull source assignments:
```bash
smartlead campaigns email-accounts $SRC_ID --output json
```

Then re-assign to new:
```bash
smartlead campaigns email-accounts $NEW_ID --add [ids from source]
```

### Step 6 — Upload leads (optional)

Only if user asked for `--with-leads`. Usually skip — V2 wants a fresh audience.

If yes:
```bash
smartlead leads list $SRC_ID --output json > leads.json
# Convert to upload format, then:
smartlead leads add $NEW_ID --csv leads.csv
```

## Important caveats

- **The clone is NOT atomic.** If step 4 fails you have an orphan campaign with schedule+settings but no sequences. Decide whether to delete (`smartlead campaigns delete $NEW_ID`) or fix-forward.
- **Webhook configurations don't clone.** Reattach manually with `smartlead webhooks ...` if the source has webhooks.
- **Lead records are shared across campaigns by email.** If you copy leads, `custom_fields` from the source propagate to the new campaign too — see `docs/learnings/campaign-cloning-runbook.md`.
- **Always run `smartlead campaigns get $NEW_ID` after each step** to verify state before moving on.

## Reference

Full recipe with field translation details: `docs/learnings/campaign-cloning-runbook.md`.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [MattSezgin](https://github.com/MattSezgin)
- **Source:** [MattSezgin/unofficial-smartlead-cli](https://github.com/MattSezgin/unofficial-smartlead-cli)
- **License:** MIT
- **Homepage:** https://github.com/MattSezgin/unofficial-smartlead-cli

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-mattsezgin-unofficial-smartlead-cli-clone-campaign
- Seller: https://agentstack.voostack.com/s/mattsezgin
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
