AgentStack
SKILL verified MIT Self-run

Clone Campaign

skill-mattsezgin-unofficial-smartlead-cli-clone-campaign · by MattSezgin

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.

No reviews yet
0 installs
14 views
0.0% view→install

Install

$ agentstack add skill-mattsezgin-unofficial-smartlead-cli-clone-campaign

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No 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.

Are you the author of Clone Campaign? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

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_OPENDONT_TRACK_EMAIL_OPEN
  • ai_categorisation_options labels → numeric IDs (1-7)
  • seq_delay_details.delayInDaysdelay_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 delayInDaysdelay_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_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.

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

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.