Advanced
React to events by emailing Deck
Some context is best captured the moment it happens. A meeting gets booked, a deal moves stage, a transcript finishes uploading — instead of polling on a schedule, hook into the event and email Deck right then.
The pattern
A webhook flow has three steps:
- Receive — a small HTTP endpoint accepts the webhook (Calendly, Cal.com, Granola, Stripe, Linear, your own backend — anyone who sends them).
- Compose — pull the fields you care about and write a short email body.
- Send — email your assistant address with a subject prefix that routes the event to the right project. Deck files it.
Then, when you want to act on what's been filed — a meeting prep brief, a deal-stage recap, a daily summary of events — either ask Deck directly or set up a scheduled task that runs on top of the stored events on a cadence.
A worked example: a new meeting was just booked
A Cal.com booking fires a webhook. Your endpoint emails one short note to Deck with the booking details so the meeting lives in your calendar context.
DECK_EMAIL = "your-name@agent.hellodeck.ai"
def notify(invitee_name, invitee_email, start, end, event_type, notes=""):
creds = get_credentials()
body = f"""New meeting booked. Store this in my calendar context.
## New meeting
- **With:** {invitee_name} ({invitee_email})
- **When:** {start} – {end}
- **Type:** {event_type}
- **Notes:** {notes or 'None'}
"""
send_email(creds, DECK_EMAIL, f"Brain — New meeting: {invitee_name}", body)
Cal.com payload → handler:
def handle_calcom(payload):
booking = payload["payload"]
invitee = (booking.get("attendees") or [{}])[0]
notify(
invitee_name=invitee.get("name", "Unknown"),
invitee_email=invitee.get("email", ""),
start=booking.get("startTime", ""),
end=booking.get("endTime", ""),
event_type=booking.get("title", "Meeting"),
notes=booking.get("description", ""),
)
Now Deck has the meeting on file. To get prep before the call, pair this with a scheduled task — for example, a daily 7 AM brief: "for every meeting on today's calendar, give me what I have on the person in Pipeline — past threads, stage, any commitments still open." Or ask Deck directly anytime: "I have a meeting with Jane at Acme this afternoon — what do I know about her?"
Event-to-email recipes
| Event source | Trigger | What you email Deck |
|---|---|---|
| Calendly / Cal.com | New meeting booked | File the meeting in Brain; daily task pulls prep from Pipeline. |
| Fireflies / Granola | Recording finished | File the transcript in Pipeline against the right deal. |
| HubSpot / Salesforce | Deal stage changes | File the stage move in Pipeline; weekly task surfaces what's drifted. |
| Linear / Jira | Issue marked blocked | File the block in Product; scheduled task digests blockers daily. |
| Stripe | Subscription created or cancelled | File the event in Pipeline; weekly task flags churn-risk patterns. |
| GitHub | PR merged on critical repo | File the PR summary in Product. |
| Your own backend | Anything important | Anything you want filed for later querying. |
Where to host the endpoint
You need a public URL that accepts a POST. Some good options:
| Option | Best for | Notes |
|---|---|---|
| Pipedream | No-code or low-code, free tier | Built-in HTTP trigger + email sender. You can write the body in a JS/Python step. Best place to start if you don't already have infra. |
| Cloudflare Workers | Fast, free, low-friction code | One file, deploy with wrangler. Great for stateless webhook receivers. |
| Vercel / Next.js API routes | You already have a Vercel app | Drop a file in app/api/webhooks/[source]/route.ts and you're done. |
| AWS Lambda + API Gateway | You're already on AWS | Familiar if your team already has the stack. More moving parts. |
Modal @web_endpoint | Python team, want code-first | One decorator turns a function into a URL. Pairs well with the cron examples. |
| Zapier / Make.com | Pure no-code, you want clicks instead of code | Webhook → "Send email" step. Slightly less flexible bodies. |
Security and reliability
- Verify webhook signatures. Most providers sign their webhooks (HMAC). Verify before sending the email so a stranger can't pipe junk into your assistant.
- Retry on failure. If sending the email fails, log it and retry. Most hosts (Pipedream, Cloudflare, Lambda) handle this if you don't swallow the error.
- Rate-limit your own endpoint. If a source could fire a thousand events in a minute, batch them on your side before emailing Deck.
- Gate noisy sources at the edge. Drop or coalesce events in your handler before they hit Deck — a single source that fires hundreds of times an hour will bury the signal you actually wanted.
Common questions
Can I do this without writing any code?
Yes. Pipedream, Zapier, and Make.com all let you wire "when X happens, send this email" with a few clicks. Point them at your assistant address, build the subject + body from the payload fields, and deploy.
What if my source doesn't send webhooks?
Use the scheduled snapshots pattern instead — poll the API on a schedule and email any new items.
Will Deck send anything to the webhook source?
No. Deck's replies only go back to you, and only in response to messages you've sent. Webhooks file events into Deck; nothing flows the other direction.
How do I act on filed events?
Either ask Deck directly when you want context ("what new meetings landed today?") or set up a scheduled task that runs on top of the stored events on a cadence ("every weekday at 7 AM, give me prep for today's meetings").
Next
- Project structure — design projects so webhook emails route cleanly.
- Drive Deck with Claude — generate the handler with a Claude skill.