Klaviyo Integration
Alva integrates with Klaviyo through webhooks in flows. When a flow fires, a webhook action sends a request to Alva, which processes the delivery and fires an event back to Klaviyo to trigger your email.
How it works
Section titled “How it works”Klaviyo Flow → Webhook Action → Alva → "Download Ready" Event → Klaviyo Email- A trigger event happens (e.g., an order is placed).
- Your Klaviyo flow reaches the webhook action.
- The webhook sends the customer’s data to Alva.
- Alva creates a secure download link and fires an Alva Download Ready event back to Klaviyo.
- A second flow (triggered by the Alva event) sends the email with the download link.
Setting up the webhook
Section titled “Setting up the webhook”Step 1: Find your webhook details
Section titled “Step 1: Find your webhook details”In Alva, go to Settings > Webhook Configuration (or open a specific bundle). You’ll see:
- Webhook URL — e.g.,
https://klaviyo.alvaapps.com/webhook/your-endpoint-slug - Webhook Secret — click “Reveal” to see it, then copy it.
Step 2: Create or edit a Klaviyo flow
Section titled “Step 2: Create or edit a Klaviyo flow”- In Klaviyo, go to Flows.
- Open the flow you want to add file delivery to (e.g., a post-purchase flow), or create a new one.
- In the flow builder, add a Webhook action at the point where you want to trigger delivery.
Step 3: Configure the webhook action
Section titled “Step 3: Configure the webhook action”- Set the URL to your webhook endpoint URL from Alva.
- Under Headers, add a custom header:
- Key:
x-alva-webhook-secret - Value: your webhook secret from Alva
- Key:
- Leave the method as POST and content type as JSON.
- Save the webhook action.
Step 4: Create the email flow
Section titled “Step 4: Create the email flow”You need a separate flow to send the download email:
- Create a new flow triggered by the Alva Download Ready metric.
- Add an Email action.
- In the email template, use the event variables to include the download link:
| Variable | Description |
|---|---|
{{ event.DownloadPageURL }} | The customer’s unique download page link |
{{ event.ProductName }} | Name of the download bundle |
{{ event.FileCount }} | Number of files in the bundle |
{{ event.ExpiresAt }} | When the download link expires |
{{ event.MaxDownloads }} | Maximum number of downloads allowed |
Example email snippet:
Your files are ready! Click the link below to download:
{{ event.DownloadPageURL }}
You have {{ event.MaxDownloads }} downloads available.This link expires on {{ event.ExpiresAt }}.Step 5: Test the setup
Section titled “Step 5: Test the setup”- In Alva, go to Settings > Webhook Configuration and click Send Test.
- Enter a test email address.
- Check that:
- A delivery appears in your Deliveries page.
- The download page URL works.
- The email arrives (if your email flow is active).
Multiple bundles, multiple webhooks
Section titled “Multiple bundles, multiple webhooks”Each download bundle has its own unique webhook endpoint. This means you can:
- Deliver different files from different flows.
- Use one flow for “Photography Presets” and another for “E-book”.
- Each webhook URL routes to the correct bundle automatically.
Webhook payload
Section titled “Webhook payload”When Klaviyo sends the webhook, it includes the customer profile data from the flow. Alva uses this to:
- Identify the customer (email, name).
- Create or update the customer record.
- Associate the delivery with the correct profile in Klaviyo.
No additional configuration is needed — Klaviyo sends the profile data automatically as part of the webhook payload.
Troubleshooting webhooks
Section titled “Troubleshooting webhooks”| Symptom | Cause | Fix |
|---|---|---|
| No delivery created | Wrong webhook URL | Check the URL matches what’s shown in Alva |
| 401 error | Missing or wrong secret | Verify the x-alva-webhook-secret header value |
| Duplicate deliveries | Flow triggers multiple times | Alva handles this — duplicates are automatically detected and ignored |
| Delivery stuck as “Pending” | Fraud check flagged it | Check the delivery details for the fraud score and reason |
| No email received | Missing email flow | Create a flow triggered by “Alva Download Ready” |
See the FAQ for more troubleshooting tips.