Log Klaviyo campaign results to an Airtable table
A Klaviyo + Airtable agent flow
Open rate, click rate, revenue per recipient: the numbers that decide what the next campaign looks like live in Klaviyo's reporting view, one campaign at a time, hard to chart side by side. Dropped into an Airtable table, a quarter of sends becomes one sortable grid. The agent pulls a campaign's numbers with get_campaign_report and writes them as a row with create_record, one record per campaign, carrying the name, send date, recipients, opens, clicks, and attributed revenue. Klaviyo returns the report when the agent asks, so this runs after a send completes or on a weekly cadence, and a campaign already logged is left alone.
The flow
get_campaign_reportGets a report of your campaign performance.
create_recordCreate a new record in a table with the given field values.
Step by step
- Build the table
Create an Airtable table with fields for campaign name, send date, recipients, open rate, click rate, and revenue, so each report maps cleanly onto columns.
- Pull the campaign report
The agent calls get_campaign_report for the campaigns in your window and reads the performance metrics each one returns.
- Write a row per campaign
It calls create_record once per campaign with the metrics mapped to your fields, storing the Klaviyo campaign ID so a re-run can recognize what's already there.
Tell your agent
Every Monday, get the Klaviyo campaign report for campaigns sent in the last 7 days. For each one, create a record in the Campaign Performance table in Airtable with the name, send date, recipients, open rate, click rate, and attributed revenue. Store the campaign ID and skip campaigns already logged.
Setup
This flow needs both servers connected to your agent. Follow each install guide:
Worth knowing
- get_campaign_report covers performance metrics, but you need each campaign's ID first. The agent lists campaigns with get_campaigns for the window, then pulls a report per campaign.
- Klaviyo attributes revenue over a conversion window, so a report read the morning after a send understates totals. Decide whether to log once after the window closes or update the row as numbers settle.
- create_record adds a row every call. Use the campaign ID as a dedupe key and update_records when re-reading, or the same campaign lands twice.
Questions
- Can it log flow performance too, not just campaigns?
- Yes, with a different read. get_flow_report returns flow metrics; point the agent at that and a second Airtable table to track automated flows alongside one-off campaigns.
- Does it pull per-recipient data?
- No. get_campaign_report is aggregate performance, not a recipient list. Logging individual opens or clicks would mean reading events with get_events, which is a much larger pull.