InTouch Hub · Blue Isle Software

Klaviyo

Sync e-commerce profiles and trigger email/SMS flows via the Klaviyo events and campaigns API.

Provided free and as is, without warranty of any kind — including merchantability, fitness for a particular purpose, and the accuracy or completeness of any result. See the licence. You are responsible for checking what this produces before relying on it.

emailimportmarketingmarketing-emailordersmsstatussync

Klaviyo

Sync e-commerce customer profiles and trigger email/SMS flows via the Klaviyo API.

What it does

Klaviyo flows (automations) are triggered by events: when you post an event (a metric like Placed Order) for a profile, any flow whose trigger is that metric fires and delivers its configured email/SMS. This tool lets InTouch jobs upsert profiles, fire those triggering events, and inspect campaigns — all with the credential held in InTouch, never in the AI context.

Operations

operation method / endpoint purpose
get-profiles GET /api/profiles/ List profiles; optional email filter / pageSize
upsert-profile POST /api/profile-import/ Create or update a profile (matched on email/phone)
create-event POST /api/events/ Fire an event/metric for a profile → triggers matching flows
get-campaigns GET /api/campaigns/ List campaigns (filtered by channel, default email)

Inputs

Output

Publishes result (the Klaviyo JSON response body as a string) and status (the HTTP status code). create-event returns 202 Accepted with an empty body on success; the tool emits {"accepted": true, "metric": "..."}.

API key setup

  1. In Klaviyo, go to Settings → API keys.
  2. Click Create Private API Key, name it (e.g. intouch), and grant the scopes you need (Profiles, Events, Campaigns).
  3. Copy the key (starts with pk_…) and pass it as the apiKey input.

Examples

Upsert a profile:

{
  "apiKey": "pk_xxx",
  "operation": "upsert-profile",
  "email": "[email protected]",
  "firstName": "Jane",
  "properties": "{\"plan\":\"pro\"}"
}

Trigger a flow by firing an event:

{
  "apiKey": "pk_xxx",
  "operation": "create-event",
  "email": "[email protected]",
  "metric": "Placed Order",
  "value": "129.00",
  "properties": "{\"order_id\":\"A-1001\"}"
}

List email campaigns:

{ "apiKey": "pk_xxx", "operation": "get-campaigns", "channel": "email" }

Look up a profile by email:

{ "apiKey": "pk_xxx", "operation": "get-profiles", "email": "[email protected]" }

Publishes

The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.

Input Properties

Every property this tool accepts, from its own tool.iml.

Property Type Required Default Description
apiKey string yes — DEPRECATED — bind an API Key credential to the task with credentialName instead. A key pasted here is stored in the workflow definition in clear and appears in every export of it. Still honoured for workflows built before the change.
operation string yes — One of: get-profiles, upsert-profile, create-event, get-campaigns
revision string no — Optional Klaviyo API revision date sent in the required 'revision' header (e.g. 2024-10-15). Defaults to a stable revision when blank.
email string no — Profile email. Required (or phoneNumber) for upsert-profile and create-event; optional filter for get-profiles.
phoneNumber string no — Profile phone number in E.164 (e.g. +15551234567). Used for upsert-profile and create-event when no email.
firstName string no — upsert-profile: profile first name.
lastName string no — upsert-profile: profile last name.
metric string no — create-event: the metric/event name to fire (e.g. 'Placed Order'). Flows triggered by this metric will run.
value string no — create-event: optional numeric monetary value for the event (e.g. order total).
properties string no — upsert-profile / create-event: optional JSON object of custom properties, e.g. {"plan":"pro"}.
channel string no — get-campaigns: channel to filter on, 'email' or 'sms'. Defaults to email (Klaviyo requires a channel filter).
pageSize string no — get-profiles: optional page size (cursor pagination).