| name | klaviyo-debug-bundle |
| description | Collect Klaviyo debug evidence for support tickets and troubleshooting.
Use when a Klaviyo integration is failing, when preparing a support ticket,
or when collecting diagnostic information for a Klaviyo API problem.
Trigger with phrases like "klaviyo debug", "klaviyo support bundle",
"collect klaviyo logs", "klaviyo diagnostic", "klaviyo troubleshoot".
|
| allowed-tools | Bash(grep:*), Bash(curl:*), Bash(tar:*), Bash(npm:*) |
| version | 1.7.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","klaviyo","email-marketing","cdp"] |
| compatibility | Designed for Claude Code |
Klaviyo Debug Bundle
Overview
Collect all diagnostic information needed for a Klaviyo support ticket into one
redacted, shareable tarball: SDK version, API connectivity, auth result, rate
limit status, recent errors, and environment config. Every secret (API keys,
emails, phone numbers, webhook secrets) is redacted before packaging, so the
bundle is safe to attach to a ticket.
The workflow builds a single shell script (klaviyo-debug-bundle.sh) in five
steps, then runs it. The full script and a programmatic TypeScript alternative
live in the reference files linked below.
Prerequisites
- The
klaviyo-api SDK installed (npm list klaviyo-api to confirm).
- The
KLAVIYO_PRIVATE_KEY environment variable set to a private API key.
- Read access to your application's log directory (defaults scanned:
logs/,
/var/log/app/).
curl, tar, and python3 available on the host.
Instructions
Assemble the five blocks below (verbatim from the reference) into one
klaviyo-debug-bundle.sh, make it executable, and run it from your application
root so the log-collection step can find logs/.
- Create the bundle dir — timestamped
klaviyo-debug-YYYYMMDD-HHMMSS/ and a summary.txt header.
- Collect environment info — Node/npm/OS versions,
klaviyo-api SDK version, and a redacted API-key presence check.
- Run connectivity tests — DNS resolve, an authenticated
GET /api/accounts/ (captures the HTTP code), rate-limit headers, and the Klaviyo status page.
- Collect logs — grep known log dirs for Klaviyo errors, redacting keys and emails inline.
- Package and clean up —
tar -czf the dir, remove the working copy, print the tarball path.
The skeleton of step 1:
#!/bin/bash
set -euo pipefail
BUNDLE_DIR="klaviyo-debug-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$BUNDLE_DIR"