Time: 20 minutes | Level: Expert
Prerequisites: Sharing & Collaboration, Scheduled Reports
Requires: Pro plan or higher
Prerequisites: Sharing & Collaboration, Scheduled Reports
Requires: Pro plan or higher
What You’ll Learn
- Configure webhooks for real-time data sync
- Verify webhook signatures for security
- Build automations with Zapier, Make, and n8n
- Handle retries and error scenarios
Understanding Webhooks
Webhooks let Peanuts push data to your systems instantly when events happen—no polling required.Supported Events
| Event | Description |
|---|---|
entry.created | New entry added |
entry.updated | Entry modified |
entry.deleted | Entry removed |
Setting Up Your First Webhook
Select Events
Choose which events trigger the webhook:
- ✅ Entry created
- ✅ Entry updated
- ☐ Entry deleted
Webhook Payload
When an event fires, Peanuts sends a POST request:Security: Signature Verification
Peanuts signs every request with HMAC-SHA256. The signature is in theX-Peanuts-Signature header.
Finding Your Secret
- Go to helper Settings → Integrations
- Click Show Secret next to your webhook
- Copy for use in verification code
Verification Code
- Node.js
- Python
No-Code Integrations
Zapier
Create a Zap
Go to zapier.com → Create Zap
- Expense → Google Sheets row
- Task completed → Slack notification
- New entry → Airtable record
Make (Integromat)
n8n (Self-Hosted)
Retry Policy
Failed webhooks retry automatically:| Attempt | Delay |
|---|---|
| 1st retry | 1 minute |
| 2nd retry | 5 minutes |
| 3rd retry | 30 minutes |
Best Practices
Respond Quickly
Return 200 immediately, process async. Timeout is 30 seconds.
Implement Idempotency
Use
entry.id to detect duplicates and prevent double-processing.Log Everything
Store raw payloads for debugging failed deliveries.
Use HTTPS
Only HTTPS endpoints are accepted for security.
Quick Response Pattern
Troubleshooting
Webhooks not firing
Webhooks not firing
- Verify webhook is enabled in settings
- Check URL is correct and accessible
- Ensure endpoint returns 2xx status
- Review webhook history for errors
Signature verification failing
Signature verification failing
- Use raw request body, not parsed JSON
- Check secret has no extra whitespace
- Verify SHA256, not SHA1
- Use timing-safe comparison
Duplicate webhooks
Duplicate webhooks
Implement idempotency:
Exercise
Practice: Expense to Google Sheets
- Create a Zapier account (free tier works)
- Set up a “Catch Hook” trigger
- Add the webhook URL to your Expense Tracker
- Create action: Add row to Google Sheets
- Log 3 expenses and verify they appear in your sheet
Key Takeaways
Next Steps
API Integration
Direct API access for custom apps
Enterprise Patterns
Scale Peanuts across teams
