Warpflow
For Developers

Integration Recipes

Common automation patterns with code examples for connecting Warpflow Signals to forms, CRMs, email, and notification systems.

Overview

These recipes are copy-paste-ready patterns for the most common Warpflow integrations. Each one shows the HTTP request, expected response, and how to use the result.

All examples use curl but work identically in Zapier (Webhooks by Zapier), Make (HTTP module), n8n (HTTP Request node), or any language with an HTTP client.

Replace YOUR_TENANT_ID and YOUR_API_KEY with your actual values.

Recipe 1: Form submission → Score + Slack alert

Use case: A Typeform, JotForm, or Gravity Forms submission comes in. Score the lead and send a Slack message if they're hot.

Step 1: Send the form data to Warpflow (sync mode)

curl -X POST \
  "https://api.warpflow.ai/api/v1/webhook/custom/YOUR_TENANT_ID/typeform?mode=sync" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contact": {
      "name": "Jane Doe",
      "email": "jane@example.com",
      "phone": "+15551234567"
    },
    "content": {
      "body": "Service: Kitchen remodel. Budget: $40k. Timeline: next month.",
      "subject": "Quote Request Form"
    },
    "source": "typeform"
  }'

Step 2: Check the response

{
  "score": { "tier": "hot", "value": 82 },
  "classification": { "intent": "quote_request", "urgency": "medium" },
  "reply": { "body": "Hi Jane! Thanks for reaching out..." }
}

Step 3: If score.tier === "hot", post to Slack

curl -X POST https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \
  -H "Content-Type: application/json" \
  -d '{
    "text": "🔥 Hot lead: Jane Doe (82/100) — Kitchen remodel, $40k budget. Reply sent automatically."
  }'

Recipe 2: Classify inbound email → Tag in CRM

Use case: An email arrives. Classify it and update the contact's tags in your CRM based on intent.

Step 1: Classify the message

curl -X POST \
  "https://api.warpflow.ai/api/v1/actions/zapier/YOUR_TENANT_ID/classify-conversation" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "I was referred by Dr. Thompson. Looking for a second opinion on my implant treatment plan.",
    "contact": { "name": "John Smith", "email": "john@example.com" }
  }'

Step 2: Use the classification result

{
  "intent": "consultation_request",
  "urgency": "medium",
  "sentiment": "neutral",
  "confidence": 0.91
}

Step 3: Map intent → CRM tag

IntentCRM Tag
appointment_requestappointment-requested
quote_requestquote-requested
consultation_requestconsultation-requested
complaintneeds-attention
billing_inquirybilling

Apply the tag in your CRM (GHL, HubSpot, etc.) using their API or a Zapier action.

Recipe 3: After-hours voicemail → AI reply + callback queue

Use case: Someone calls after hours and leaves a message. Score the lead, send an immediate SMS acknowledgment, and queue for morning callback.

This pattern works automatically when you configure routing rules in the Signals dashboard — no code needed. But here's how to trigger it manually via API:

Step 1: Send the voicemail transcript

curl -X POST \
  "https://api.warpflow.ai/api/v1/webhook/custom/YOUR_TENANT_ID/voicemail?mode=sync" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contact": { "name": "Unknown", "phone": "+15559876543" },
    "content": {
      "body": "Hi, I have a water heater emergency. Hot water is leaking everywhere. Please call me back ASAP.",
      "subject": "After-Hours Voicemail"
    },
    "source": "voicemail"
  }'

Step 2: Check the classification

{
  "classification": { "intent": "emergency_service", "urgency": "critical" },
  "score": { "tier": "hot", "value": 95 },
  "matched_rules": [
    { "name": "Emergency - immediate dispatch", "actions": ["send_template", "escalate"] }
  ]
}

If you have routing rules configured for urgency: critical, Warpflow automatically sends the template and escalates — no additional API calls needed.

Recipe 4: Bulk score contacts from a CSV

Use case: You have a list of contacts from a CRM export and want to score them all through Warpflow.

#!/bin/bash
# Score each contact from a CSV (name, email, phone, last_message)
while IFS=',' read -r name email phone message; do
  curl -s -X POST \
    "https://api.warpflow.ai/api/v1/actions/zapier/YOUR_TENANT_ID/score-contact" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d "{
      \"message\": \"$message\",
      \"contact\": { \"name\": \"$name\", \"email\": \"$email\", \"phone\": \"$phone\" }
    }" | jq '{email: "'$email'", tier: .tier, score: .score}'
  sleep 0.5  # respect rate limits
done < contacts.csv

Recipe 5: Email reply via API

Use case: A contact emails your support address. You want to generate an AI reply and send it back via the email API.

Step 1: Generate a reply

curl -X POST \
  "https://api.warpflow.ai/api/v1/actions/zapier/YOUR_TENANT_ID/generate-reply" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Do you accept Delta Dental insurance for dental implants?",
    "contact": { "name": "Sarah Johnson" }
  }'

Response:

{
  "reply": "Hi Sarah! Yes, we accept Delta Dental PPO and Premier plans for dental implant procedures. Coverage typically ranges from 50-80% depending on your specific plan. Would you like to schedule a free consultation so we can review your coverage and discuss your options?",
  "guardrail_passed": true
}

Step 2: Send the reply via email

curl -X POST \
  "https://api.warpflow.ai/api/v1/tenants/YOUR_TENANT_ID/email/send" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": [{ "name": "Sarah Johnson", "email": "sarah@example.com" }],
    "subject": "Re: Insurance Question",
    "body": "Hi Sarah! Yes, we accept Delta Dental PPO and Premier plans...",
    "reply_to_message_id": "nylas-msg-original-id"
  }'

Tips

  • Use sync mode (?mode=sync) for recipes where you need the result immediately. Use async (default) for fire-and-forget.
  • Respect rate limits. Add a short delay between requests in bulk operations. The API returns 429 with a Retry-After header if you exceed limits.
  • Check guardrail_passed before sending AI-generated replies. If it's false, the reply may contain content that violates your Signal Guard rules.
  • Use external_id in the contact object to match contacts across systems without relying on email/phone matching.

On this page

We use cookies to understand how you use our site and improve your experience. Privacy Policy