Skip to content
⚡Automations

Automations — webhook actions and email alerts

Trigger webhooks or send emails automatically when leads are captured or events happen in your chatbot.

Updated 2 Mar 2026

What are Actions?

Actions are automated triggers — when something happens in your chatbot (like a lead being captured), Pivra can:

  • POST a webhook to your server, Zapier, or Make
  • Send an email to you or your team

Actions live under Dashboard → Actions (available on Starter+ plans).

Creating an action

  1. Go to Dashboard → Actions
  2. Click New action
  3. Fill in:
    • Name — e.g. "New lead → email me"
    • Event — what triggers it: lead.captured, conversation.created, conversation.escalated, booking.confirmed, etc.
    • Channel — Webhook or Email
    • Chatbot — which chatbot to watch (or all)
  4. Configure the channel (URL for webhook, email address for email)
  5. Optionally add Conditions — e.g. only fire if lead.email exists
  6. Save

Email actions

Set Channel → Email, enter a To address, and Pivra will send a formatted email each time the event fires. Useful for:

  • Immediate new-lead notifications
  • Daily/weekly digest summaries of chatbot activity

Activity digests

For digest emails, set the Schedule field:

  • Hourly, every 4h, every 6h, daily, every 2 days, weekly
  • Set the Timezone to your local timezone

The digest email includes: conversation count, message count, leads captured, and a table of recent leads.

Webhook actions

Set Channel → Webhook, enter your endpoint URL, and Pivra sends a signed POST request.

Payload format

{
  "id": "evt_abc123",
  "event": "lead.captured",
  "timestamp": "2026-03-02T10:00:00Z",
  "tenant_id": "your-tenant-id",
  "chatbot_id": "your-chatbot-id",
  "data": {
    "name": "Alice Smith",
    "email": "alice@example.com",
    "phone": "0412 345 678",
    "company": "Acme Pty Ltd",
    "conversation_id": "conv_xyz"
  }
}

Signature verification

Every webhook includes an X-Pivra-Signature-256 header. Verify it to confirm the request came from Pivra:

const crypto = require('crypto');

function verify(secret, body, header) {
  const expected = 'sha256=' + crypto
    .createHmac('sha256', secret)
    .update(body)
    .digest('hex');
  return header === expected;
}

Use the Secret you set when creating the action.

Testing an action

  1. Save the action
  2. Click the Test button (⚡) on the action card
  3. Pivra fires a test event with sample data
  4. Check the Logs drawer (📋 icon) to see the response status and body

Viewing logs

Click the logs icon on any action to see the last 50 deliveries, including:

  • Delivery status (delivered, failed, retrying)
  • HTTP response code
  • Latency
  • Error message (if failed)
  • Retry history

Retry behaviour

If a webhook endpoint returns a non-2xx response, Pivra retries with exponential backoff:

AttemptDelay
1st retry1 minute
2nd retry5 minutes
3rd retry30 minutes
4th retry2 hours

After the maximum attempts, the event is marked Failed and a notification appears in your dashboard.

Was this helpful?

If you have questions or suggestions, email us at support@pivra.ai .