Notification Functions
Five edge functions handle outbound notifications: email confirmations, reminders, onboarding emails, Slack messages, and incoming Fathom webhooks.
send-booking-notification
Sends booking confirmation emails to both the booker and the meeting owner when a meeting is scheduled.
See Booking & Meeting Functions for full documentation.
| Property | Value |
|---|---|
| Trigger | Called by create-calendar-event after event creation |
| API | Resend (RESEND_API_KEY secret) |
| Recipients | Booker email + meeting owner email |
| Side Effect | Sets confirmation_sent_at on meeting record |
send-onboarding-email
Sends a welcome email to new clients when they are onboarded onto the platform.
Input
interface OnboardingRequest {
clientId: string; // UUID of the new client
userEmail: string; // Email of the new client user
userName: string; // Display name
tempPassword?: string; // Temporary password (if set)
}
Email Content
The welcome email includes:
- Welcome message with the client organization name
- Login URL (
https://app.1hourrecruitment.com/auth) - User's email and temporary password (if applicable)
- Quick start guide links
- Support contact information
Flow
Side Effects
- Sends 1 email via Resend API
- No database updates (fire-and-forget)
send-slack-notification
Sends notifications to a Slack channel via webhook when significant events occur (primarily meeting-related).
Input
interface SlackRequest {
event: 'meeting_booked' | 'meeting_cancelled' | 'meeting_completed';
meetingId?: string;
salesMeetingId?: string;
message?: string; // Custom message override
}
Slack Webhook
const webhookUrl = Deno.env.get('SLACK_WEBHOOK_URL');
await fetch(webhookUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
text: message,
blocks: [
{
type: 'section',
text: {
type: 'mrkdwn',
text: `*New Meeting Booked* :calendar:\n${bookerName} booked a meeting for ${formattedDate}`,
},
},
],
}),
});
Message Templates
| Event | Message Format |
|---|---|
meeting_booked | "New Meeting Booked: {bookerName} booked with {ownerName} for {date}" |
meeting_cancelled | "Meeting Cancelled: {bookerName}'s meeting on {date} was cancelled" |
meeting_completed | "Meeting Completed: {ownerName} completed meeting with {bookerName}" |
Required Secret
| Secret | Value |
|---|---|
SLACK_WEBHOOK_URL | Slack incoming webhook URL |
fathom-meeting-webhook
Receives incoming webhooks from Fathom (AI meeting recorder). Updates meeting records with Fathom recording data.
Endpoint
POST /fathom-meeting-webhook
Fathom Payload
{
"event": "recording.completed",
"recording": {
"id": "fathom_recording_id",
"title": "Meeting Title",
"calendar_event_id": "google_event_id",
"summary": "AI-generated meeting summary",
"action_items": ["Follow up on proposal", "Send case studies"],
"recording_url": "https://fathom.video/...",
"transcript_url": "https://fathom.video/.../transcript",
"duration_seconds": 1800
}
}
Flow
Side Effects
- Updates
meetingsorsales_meetingswith Fathom summary data - Sets meeting
statusto'completed' - Stores Fathom recording URL and summary in
outcome_notes - Matches using
calendar_event_id(the Google/Outlook event ID)
send-meeting-reminder
Sends reminder emails at 24 hours and 1 hour before scheduled meetings.
See Booking & Meeting Functions for full documentation.
| Property | Value |
|---|---|
| Trigger | Scheduled (cron or manual invocation) |
| API | Resend (RESEND_API_KEY secret) |
| Recipients | Booker email |
| Side Effect | Sets reminder_24h_sent_at or reminder_1h_sent_at |
Required Secrets Summary
| Secret | Used By |
|---|---|
RESEND_API_KEY | send-booking-notification, send-meeting-reminder, send-onboarding-email |
SLACK_WEBHOOK_URL | send-slack-notification |