How to Trigger Klaviyo Campaigns from Workflow Events
Start Klaviyo email flows based on events detected by your Spojit workflows.
What This Integration Does
Klaviyo flows are built to react to events. Out of the box, those events are limited to what Klaviyo's native integrations fire (order placed, viewed product, etc.). This workflow extends that surface area to anything your Spojit workflows can detect - low inventory, support ticket closed, contract signed, NPS submitted, internal approval completed. Any business event becomes a flow trigger.
The pattern is simple: detect the event upstream, push it to Klaviyo with create-event, then build a Klaviyo flow on that event in Klaviyo's UI. Events carry both a profile reference (email) and an arbitrary properties payload, so flows can branch on the event data without making extra API calls.
Prerequisites
- A Klaviyo connection with event write access.
- An agreed naming convention for custom events (e.g.
Inventory Low,Support Ticket Resolved,Quote Approved). - Klaviyo flows configured to listen on those custom event names.
Step 1: Detect the Business Event
Pick a Trigger appropriate to the event:
- Webhook for events pushed by another system (Zendesk, internal ERP, Front).
- Schedule for "every hour check inventory and fire low-stock events".
- Email trigger if the event arrives as an inbound email (RFP response, approval reply).
The downstream steps do not care which trigger fires - they only need the resulting event payload.
Step 2: Resolve the Target Profile
Klaviyo events are scoped to a profile (by email). If the event payload already has the customer's email, skip this step. Otherwise add a Connector node that fetches it - for example, shopify get-order if the event references an order id, or your CRM connector if it references a contact id.
Step 3: Transform - Build the Event Payload
Add a Transform node to assemble the Klaviyo event:
{
"metric": "Quote Approved",
"profile": { "email": "{{ customer.email }}" },
"properties": {
"quoteId": event.quoteId,
"quoteAmount": event.amount,
"currency": event.currency,
"approvedBy": event.approver,
"expiresAt": event.expiresAt
},
"unique_id": "{{ event.quoteId }}",
"time": "{{ event.approvedAt }}"
}
Keep the metric name human-readable - it appears in Klaviyo's UI.
Step 4: Push the Event to Klaviyo
Add a Connector node on klaviyo with the create-event tool. Pass the object from the previous step. The response contains the event id - keep it in a variable so you can log it.
Step 5: Confirm the Flow Exists
This is a one-time setup step but worth automating as a sanity check. Add a Connector node on klaviyo using list-flows and a Condition node that warns (via slack send-message or front send-message) if no flow is configured to trigger on the metric you just fired. Otherwise the event sits unused in Klaviyo and nobody notices.
Step 6: Log to MongoDB for Audit
Add a final Connector node on mongodb with insert-documents to log (metric, profile email, properties, fired_at). When marketing asks "did we actually fire 47 'Quote Approved' events last week?" you have an answer.
Tips
- Use
unique_idon every event - Klaviyo deduplicates on it, so accidental re-runs do not double-fire flows. - Pick a small, stable set of metric names and stick to them. Renaming a metric breaks every flow listening on the old name.
- Send a test event first when wiring up a new flow, and confirm Klaviyo's flow analytics show one entry.
Common Pitfalls
- Unknown profiles - events for emails that do not exist as Klaviyo profiles are accepted but never enter flows. Pre-create or look up the profile first.
- Sensitive data in properties - anything you put in event properties is visible in Klaviyo's UI. Do not push internal account numbers or PII you would not want a marketing user to see.
- Backfills - re-firing historical events with their original timestamps can confuse Klaviyo's flow time windows. Always set
timedeliberately.
Testing
Fire one test event with your own email as the profile. Check Klaviyo's profile timeline - the event should appear instantly. If a flow is configured on that metric, confirm you receive the resulting email.