Install
$ agentstack add skill-mattsezgin-unofficial-smartlead-cli-clone-campaign ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
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
smartlead campaigns create --name ""
Capture the returned id as $NEW_ID. Subsequent steps need it.
Step 2 — Copy the schedule
Pull source:
smartlead campaigns get $SRC_ID --output json | jq '.scheduler'
Apply to new:
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:
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_OPENai_categorisation_optionslabels → numeric IDs (1-7)seq_delay_details.delayInDays→delay_in_days
Step 4 — Copy the sequences
Pull source sequences:
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:
smartlead campaigns email-accounts $SRC_ID --output json
Then re-assign to new:
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:
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_fieldsfrom the source propagate to the new campaign too — seedocs/learnings/campaign-cloning-runbook.md. - Always run
smartlead campaigns get $NEW_IDafter 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
- Source: 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.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.