Ready-to-use recipes for connecting Walnut demo analytics to your CRM, BI tools, automation platform, or AI workflows. Each recipe includes the API call, what to do with the data, and practical tips.
Pick the recipes that match your stack — you don't need all of them.
CRM Sync
HubSpot — Daily Session Sync to Deals
Goal: Every morning, pull yesterday's prospect sessions and log them as timeline events on the matching HubSpot deal.
Step 1 — Pull yesterday's external sessions:
curl -H "x-api-key: YOUR_API_KEY" \\ "<https://customer-api.teamwalnut.com/demo-sessions?start_date=2026-03-08&end_date=2026-03-08&user_type=external&fields=demo_name,demo_owner_name,started_at,is_completed,interaction_count,screen_views_count,geo_country_name,origin_url&limit=10000>"
Step 2 — Match to HubSpot deals:
- Use
demo_owner_nameto find the deal owner in HubSpot - Use
demo_nameto identify which demo was sent for which deal - Use
origin_urlto trace back to the specific share link
Step 3 — Log as HubSpot timeline event or note:
- Completed + high interaction (
is_completed=true,interaction_count > 5) → Log as "Demo: High Intent View" - Bounced (
is_completed=false,screen_views_count=1) → Log as "Demo: Bounced" - Everything else → Log as "Demo: Viewed"
💡Pro tip: Create a HubSpot workflow that triggers a task for the deal owner when a "High Intent View" event is logged. Strike while the iron is hot.
Salesforce — Weekly Demo Engagement Report
Goal: Push a weekly summary of demo engagement per opportunity into Salesforce.
Step 1 — Pull last 7 days, grouped by demo:
curl -H "x-api-key: YOUR_API_KEY" \\ "<https://customer-api.teamwalnut.com/demo-sessions?start_date=2026-03-01&end_date=2026-03-07&user_type=external&group_by=demo_id>"
Step 2 — For your top demos, pull detail:
curl -H "x-api-key: YOUR_API_KEY" \\ "<https://customer-api.teamwalnut.com/demo-sessions?start_date=2026-03-01&end_date=2026-03-07&user_type=external&demo_id=DEMO_UUID&fields=demo_name,started_at,is_completed,is_bounced,interaction_count,geo_country_name>"
Step 3 — Update Salesforce:
- Create a custom object "Demo Engagement" on the Opportunity
- Fields: Demo Name, Sessions This Week, Completion Rate, Avg Interactions, Top Country
- Or simpler: update a custom text field on the Opportunity with a weekly summary
BI Dashboards
Looker / Tableau / Power BI — Trend Dashboard
Goal: Build a demo performance dashboard with daily trends, top demos, and engagement metrics.
Data source 1 — Daily trend (for line charts):
curl -H "x-api-key: YOUR_API_KEY" \\ "<https://customer-api.teamwalnut.com/demo-sessions?group_by=date&start_date=2026-01-01&user_type=external>"
This gives you {"date": count} pairs — perfect for a time-series chart.
Data source 2 — Summary snapshot (for KPI cards):
curl -H "x-api-key: YOUR_API_KEY" \\ "<https://customer-api.teamwalnut.com/demo-sessions/summary?start_date=2026-01-01>"
Use this for:
- KPI cards: Total sessions, completion rate (
completed/sessions), bounce rate (bounced/sessions) - Pie charts:
by_user_type,by_viewer_type,by_embed - Bar chart:
top_demosranked by session count - Map:
top_countries
Data source 3 — Embed vs. direct (for comparison):
curl -H "x-api-key: YOUR_API_KEY" \\ "<https://customer-api.teamwalnut.com/demo-sessions?group_by=date,is_embed&start_date=2026-01-01&user_type=external>"
The response uses date|true and date|false keys — split on the | to create two series for embedded vs. direct link trends.
💡Refresh schedule: Most BI tools can call REST APIs on a schedule. Set daily refresh at 6am — the data will be ready for morning standups.
Google Sheets — Simple Reporting
Goal: For teams that live in spreadsheets, pull demo data directly into Google Sheets.
Option A — Apps Script (automated):
Paste this into Extensions → Apps Script:
function pullDemoSummary() {
var url = "<https://customer-api.teamwalnut.com/demo-sessions/summary>";
var options = {
"headers": { "x-api-key": "YOUR_API_KEY" }
};
var response = UrlFetchApp.fetch(url, options);
var data = JSON.parse(response.getContentText());
var sheet = SpreadsheetApp.getActiveSheet();
sheet.getRange("A1").setValue("Total Sessions");
sheet.getRange("B1").setValue(data.totals.sessions);
sheet.getRange("A2").setValue("Completed");
sheet.getRange("B2").setValue(data.totals.completed);
sheet.getRange("A3").setValue("Bounced");
sheet.getRange("B3").setValue(data.totals.bounced);
sheet.getRange("A4").setValue("Avg Duration (sec)");
sheet.getRange("B4").setValue(data.averages.duration_seconds);
sheet.getRange("A5").setValue("Avg Interactions");
sheet.getRange("B5").setValue(data.averages.interactions);
}
Set a daily trigger (Edit → Triggers) to auto-refresh.
Option B — Manual paste:
Run the cURL from the Quick-Start Guide, paste the JSON into a sheet, and use Google Sheets' SPLIT and REGEXEXTRACT formulas to parse.
Automation Platforms
Zapier / n8n — Hot Lead Alerts
Goal: Get a Slack (or email) alert whenever a prospect completes a demo with high engagement.
Workflow:
- Schedule trigger — Run every 30 minutes
- HTTP Request — Call the API:
GET <https://customer-api.teamwalnut.com/demo-sessions?user_type=external&start_date=TODAY&fields=demo_name,demo_owner_name,started_at,is_completed,interaction_count,screen_views_count,geo_country_name&limit=100>
Headers: x-api-key: YOUR_API_KEY
- Filter — Keep only rows where:
is_completed=trueinteraction_count> 5
- Deduplicate — Check session
idagainst previously seen IDs (store in a Google Sheet or Zapier Storage) - Send alert — Post to Slack:
🔥 High-Intent Demo View
Demo: Product Overview Demo
Owner: Jane Smith
Interactions: 12 clicks, 8 screens viewed
Location: Dallas, United States
Time: 10:37 AM UTC
💡Why 30 minutes? Fast enough to alert sales while the prospect is still engaged. The API rate limit (50 req/s) can easily handle this frequency for hundreds of customers.
Re-Engagement Trigger — Bounced Demos
Goal: When a prospect bounces from a demo tied to an open deal, automatically notify the rep to send a shorter or more targeted demo.
API call:
curl -H "x-api-key: YOUR_API_KEY" \\ "<https://customer-api.teamwalnut.com/demo-sessions?user_type=external&start_date=2026-03-08&fields=demo_name,demo_owner_name,is_bounced,started_at,origin_url&limit=500>"
Filter for: is_bounced = true
Action: Send the demo owner an email/Slack message:
"A prospect bounced from your Product Overview Demo today. Consider sending a shorter, more focused demo or a playlist instead."
AI & LLM Workflows
MCP Integration — Ask Questions About Your Demo Data
Goal: Connect the API to Claude (or another LLM) via MCP so your team can ask natural-language questions about demo performance.
What this enables:
- "How many demos were completed last week?"
- "Which demo has the highest engagement?"
- "Compare embed vs. direct link performance this month"
- "Show me the trend for bounce rate over the last 90 days"
Setup: Your Walnut account team can help configure the MCP server. Once connected, any MCP-compatible AI tool can query your demo data conversationally.
AI-Powered Weekly Digest
Goal: Generate a natural-language summary of demo performance for leadership — no dashboard login needed.
Step 1 — Pull the summary:
curl -H "x-api-key: YOUR_API_KEY" \\ "<https://customer-api.teamwalnut.com/demo-sessions/summary?start_date=2026-03-01&end_date=2026-03-07>"
Step 2 — Feed to an LLM with a prompt like:
"Summarize this demo analytics data for a VP of Sales. Highlight wins, concerns, and recommended actions. Keep it to 5 bullet points."
Step 3 — Deliver via Slack or email every Monday morning.
Pagination Recipe — For Large Data Pulls
If you need to export all sessions (e.g., for a data warehouse), you'll need to paginate. The API returns max 10,000 rows per request.
Python example:
import requests
API_KEY = "YOUR_API_KEY"
BASE_URL = "<https://customer-api.teamwalnut.com/demo-sessions>"
LIMIT = 5000
offset = 0
all_sessions = []
while True:
response = requests.get(
BASE_URL,
headers={"x-api-key": API_KEY},
params={
"limit": LIMIT,
"offset": offset,
"user_type": "external",
"start_date": "2026-01-01"
}
)
data = response.json()
all_sessions.extend(data["data"])
if data["count"] < LIMIT:
break
offset += LIMIT
print(f"Total sessions pulled: {len(all_sessions)}")
⚠️ Tip: For very large datasets (100K+ sessions), run the export during off-hours and use start_date/end_date to break it into monthly chunks.
Which Recipe Should You Start With?
| Your Priority | Start Here | Time to Set Up |
|---|---|---|
| Sales wants faster follow-up | Hot Lead Alerts (Zapier/Slack) | ~1 hour |
| Leadership wants visibility | BI Dashboard or AI Weekly Digest | ~2 hours |
| RevOps wants CRM attribution | HubSpot or Salesforce daily sync | ~3 hours |
| Team wants to explore data freely | MCP / AI integration | ~30 min with Walnut team |
| Quick win, minimal effort | Google Sheets summary | ~15 minutes |