Skip to content

The moment it happens

Send your app's events into Klaviyo

Actions in your own product become Klaviyo events you can use in flows and segments.

Runs
The moment it happens
Apps
Klaviyo
AI
Not needed
Access
write (events)

Send this to your assistant

Create a ClickRuntime automation: give me a link my app can post to. When it sends an email and an event name like Trial Started, record that event on the profile in Klaviyo.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

Klaviyo can only personalize messages with the behavior it knows about. If your product or service tracks things Klaviyo never sees, such as a trial that started, a booking that was confirmed or a lesson that was completed, you end up sending generic emails to people who just did something specific. Developers can write custom code for each event, but marketers do not want to wait on an engineering sprint.

When your app sends a webhook to ClickRuntime, the automation creates an event in Klaviyo and ties it to the right profile, identified by email. That event is then available for segments, flow triggers and filters exactly like a native Klaviyo event, and it arrives as soon as your app posts it.

It suits SaaS products, booking tools and membership sites that track activity outside the store.

What you get out of it

  • Messages respond to real behavior

    A flow triggered when a trial begins or a project is completed reaches the user at the right moment. That relevance is what separates useful lifecycle email from a weekly blast.

  • Marketing is not blocked by engineering

    Once your app can post a simple webhook, the marketer controls what happens in Klaviyo. There is no need to ask developers to rebuild a Klaviyo integration for each new event.

  • Segments can use new signals

    Events from your app let you build segments such as people who started a trial but never invited a teammate. These are audiences Klaviyo could not build with store data alone.

  • Profiles stay in one place

    Attaching each event to the profile by email keeps behavior, orders and messages in the same record. Support and marketing then see a consistent history of a customer. Support can then answer questions with the whole story in view.

  • Experiments get cheaper to run

    Adding a new tracked event means changing one webhook payload instead of a code project. Trying a new trigger for a flow becomes something you can do in an afternoon.

How it works

What happens, step by step

  1. When your product sends an action to your ClickRuntime link, such as a trial starting, the automation runs straight away.

  2. It takes the action's name, the person's email and any extra details you included.

  3. It records the action on that person's profile in Klaviyo, ready to use in your flows and segments. Each action is recorded only once, even if it is sent twice.

Before it runs live

  • Connect Klaviyo
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Send your app's events into Klaviyojust nowSucceeded
Klaviyo · Activity feeddana@acme.example · Trial Started

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Klaviyo steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
record_events_from_a_webhook.pyexample
from clickruntime import on_event, credentials, http

def klaviyo():
    return {"Authorization": f"Klaviyo-API-Key {credentials.secret('KLAVIYO_API_KEY')}",
            "revision": "2024-10-15", "accept": "application/vnd.api+json", "content-type": "application/vnd.api+json"}

@on_event
def handle(event):
    body = event.json
    payload = {"data": {"type": "event", "attributes": {
        "properties": body.get("properties", {}),
        "metric": {"data": {"type": "metric", "attributes": {"name": body["event"]}}},
        "profile": {"data": {"type": "profile", "attributes": {"email": body["email"]}}},
        "unique_id": event.event_id}}}
    http.post("https://a.klaviyo.com/api/events", json=payload, headers=klaviyo()).raise_for_status()
    return {"recorded": body["event"]}

FAQ

Common questions

What does the webhook payload need to contain?
At minimum it needs the profile's email address and an event name. Additional fields, such as a plan name, an amount or a product, can be included as event properties. Klaviyo can then use those properties in flow filters and in email content.
What happens if the profile does not exist yet?
The event creation call includes the profile details, so Klaviyo creates or matches the profile as it records the event. That means the first event for a new email address will make the profile. Consent for marketing messages is a separate matter.
Can I send several event types through one webhook?
Yes. Include an event name in the payload and the automation passes it along as the Klaviyo metric. A single endpoint can handle signup, upgrade and cancellation events, though many teams keep separate endpoints to make troubleshooting easier.
What permissions does it need?
write (events). Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Send your app's events into Klaviyo” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.