Weekly Smartlead performance snapshot to Google Sheets

Every Monday at 8am, log last week's Smartlead campaign metrics into a shared Google Sheet so your team has one source of truth for outbound.

Deterministic Code
SmartleadGoogle SheetsSalesOperationsDaily DigestsData Sync
PromptCreate

Build me a code-based workflow that publishes a weekly Smartlead campaign performance snapshot into a shared Google Sheet, so the team has a single source of truth for outbound metrics.

Trigger: run on a cron every Monday at 8:00am local time.

Steps:

1. Call Smartlead List Campaigns to enumerate all campaigns on the connected account. Paginate through all results.

2. Compute the previous ISO week window (Monday 00:00 through Sunday 23:59 of the week before the run). This is always within Smartlead's 30-day per-request cap for the analytics-by-date endpoint.

3. For each campaign returned in step 1, call Smartlead Get Campaign Analytics by Date scoped to that previous-week window. Preserve the campaign id and name alongside the returned metrics.

4. For each campaign, build one row with these columns in order: week_of (the Monday date of the reported week, ISO format), campaign_name, sent, unique_opens, unique_clicks, replies, bounces, unsubscribes, open_rate, reply_rate, bounce_rate. Compute open_rate = unique_opens / sent, reply_rate = replies / sent, bounce_rate = bounces / sent. Guard against divide-by-zero by writing 0 when sent is 0. Format rates as decimals rounded to 4 places (the sheet can format them as percentages).

5. Call Google Sheets Append Values once with all rows for the week, targeting a spreadsheet id and a tab named "Weekly Performance". Use valueInputOption USER_ENTERED so numeric columns are stored as numbers. Append below the last row of existing data so the tab acts as a rolling history.

Inputs the user should configure on the workflow: the target Google spreadsheet id, the tab name (default "Weekly Performance"), and the timezone used to anchor "previous ISO week" and the 8am run time.

The pipeline is fully deterministic with a fixed column mapping. There is no drafting, sentiment, or reasoning step. Handle Smartlead's 429 responses with exponential backoff using the x-ratelimit-reset header, and keep the whole run idempotent enough to safely re-run if it fails partway (for example, log the campaign ids you have already written this week).

Connections needed: Smartlead (API key) and Google Sheets (OAuth with write access to the target spreadsheet).

Additional information

What does this prompt do?
  • Pulls every active Smartlead campaign each Monday morning and grabs last week's numbers for each one.
  • Appends one row per campaign to a shared Google Sheet with sent, opens, clicks, replies, bounces, unsubscribes, and the rates that go with them.
  • Builds a rolling history in the same tab so you can trend outbound performance week over week without touching a spreadsheet.
  • Runs entirely on a schedule with no manual copy-paste and no reasoning step, so the numbers are always consistent.
What do I need to use this?
  • A Smartlead account with campaigns you want to track
  • A Google account with edit access to the Google Sheet you want the report written to
  • The Google Sheet created ahead of time with a tab named Weekly Performance
How can I customize it?
  • Change the schedule from Monday 8am to a different day or time that fits your team's Monday review.
  • Pick which spreadsheet and tab the rows land in, or split by workspace across multiple sheets.
  • Add or remove columns (for example include lead count, positive reply count, or sending account) to match how your team reviews outbound.

Frequently asked questions

Does this include every campaign or just active ones?
By default it pulls every campaign in your Smartlead account and writes one row per campaign each week. If you only want active ones, you can filter by status before the sheet write.
Can I change the day and time it runs?
Yes. The schedule is a normal knob on the workflow. Point it at any day and time that fits your team's cadence, in your local timezone.
Will my old data get overwritten?
No. Each run appends fresh rows to the bottom of the Weekly Performance tab, so you build a rolling history you can chart or pivot over time.
What if I have campaigns in more than one Smartlead workspace?
Connect each Smartlead workspace as its own account. You can either write everything to one sheet with a workspace column, or split across multiple sheets.
Do I need to prep the Google Sheet first?
Yes. Create the spreadsheet, add a tab called Weekly Performance, and drop in a header row. The workflow will append underneath it every week.

Stop rebuilding your outbound report every Monday.

Connect Smartlead and Google Sheets once, and Geni logs last week's campaign numbers into your shared sheet every Monday at 8am.