Klaviyo, MySQL and Slack: Campaign Performance Digest Template
A weekly Spojit workflow that pulls your Klaviyo campaign metrics, stores them in MySQL for trending, and posts a performance digest to a Slack marketing channel.
What It Builds
This template wires up a Schedule trigger that fires once a week, a Connector node on the klaviyo connector to pull recent campaigns, a Connector node on the mysql connector to append the week's numbers to a reporting table, and a Connector node on the slack connector to post a readable digest. The MySQL table is what makes week-over-week trending possible: each run leaves a new row, so your digest can compare this week to last.
Miraxa builds the whole flow from one sentence and connects the tools for you. The result is a hands-off Monday-morning summary in your marketing channel, backed by a growing history table you can query or chart later.
The Prompt
Paste this into Miraxa and it builds the workflow, connecting the tools for you:
Build a workflow that runs every Monday at 9am. Pull the list of recent Klaviyo campaigns and their key metrics, insert a row per campaign into a MySQL table called campaign_metrics with the week date, campaign name, opens, clicks, and revenue, then post a digest to the #marketing Slack channel summarizing total opens, clicks, and revenue for the week with the top three campaigns by revenue.
Connectors Used
- Schedule trigger - runs the digest weekly on a 5-field cron with your timezone (for example
0 9 * * 1inAustralia/Sydney). - klaviyo - reads your campaigns with
list-campaigns(andlist-eventsif you want event-level detail). - mysql - appends the week's rows with
insert-rowsand can read prior weeks withexecute-queryfor trend comparisons. - slack - posts the digest with
send-messageto your marketing channel.
Customize It
Change the cron expression to shift the day or time, swap #marketing for your own channel, and rename the campaign_metrics table or its columns to match your schema. You can also adjust how many top campaigns appear in the digest, or ask the prompt to add a week-over-week percentage by reading last week's row from MySQL before posting.
Tips
- For the Klaviyo and MySQL reads and the row insert, keep those Connector nodes in Direct mode: they are predictable single-tool calls, so they stay deterministic and cost no AI credits.
- If you want the Slack message itself written in prose (a narrative summary rather than a table), use Agent mode on the slack step so the agent composes the digest text, while keeping the data steps in Direct mode.
- Set the schedule timezone explicitly. A Schedule trigger uses an IANA timezone, so
0 9 * * 1means 9am in the zone you pick, not server time.
Common Pitfalls
- Make sure the
campaign_metricstable exists with matching columns before the first run.insert-rowswrites into an existing table; create it once in MySQL up front. - Confirm your Slack connection can post to the target channel. A private channel needs the connection invited to it first, or
send-messagewill fail. - Klaviyo returns campaigns in pages. If you run a high volume of campaigns per week, ask Miraxa to page through results so the digest is not capped at the first page.