Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/sim/blocks/blocks/fireflies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,10 @@ Return ONLY the summary text - no quotes, no labels.`,
meetingId: { type: 'string', description: 'Meeting/transcript ID from webhook' },
eventType: { type: 'string', description: 'Webhook event type' },
clientReferenceId: { type: 'string', description: 'Custom reference ID if set during upload' },
timestamp: {
type: 'number',
description: 'Unix timestamp in milliseconds when the event was fired',
},
},
triggers: {
enabled: true,
Expand Down
18 changes: 15 additions & 3 deletions apps/sim/lib/webhooks/providers/fireflies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,23 @@ function validateFirefliesSignature(secret: string, signature: string, body: str
export const firefliesHandler: WebhookProviderHandler = {
async formatInput({ body }: FormatInputContext): Promise<FormatInputResult> {
const b = body as Record<string, unknown>

// Fireflies V2 webhooks use snake_case field names and "event" instead of "eventType".
// Both meeting_id and event are required in every V2 payload, so AND is the correct check.
const isV2 = typeof b.meeting_id === 'string' && typeof b.event === 'string'

const meetingId = ((isV2 ? b.meeting_id : b.meetingId) || '') as string
const eventType = ((isV2 ? b.event : b.eventType) || 'Transcription completed') as string
const clientReferenceId = ((isV2 ? b.client_reference_id : b.clientReferenceId) || '') as string
const rawTimestamp = b.timestamp != null ? Number(b.timestamp) : null
const timestamp = rawTimestamp !== null && Number.isFinite(rawTimestamp) ? rawTimestamp : null

return {
input: {
meetingId: (b.meetingId || '') as string,
eventType: (b.eventType || 'Transcription completed') as string,
clientReferenceId: (b.clientReferenceId || '') as string,
meetingId,
eventType,
clientReferenceId,
...(timestamp !== null ? { timestamp } : {}),
},
}
},
Expand Down
10 changes: 7 additions & 3 deletions apps/sim/triggers/fireflies/transcription_complete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ export const firefliesTranscriptionCompleteTrigger: TriggerConfig = {
defaultValue: [
'Go to <a href="https://app.fireflies.ai/settings" target="_blank" rel="noopener noreferrer">app.fireflies.ai/settings</a>',
'Navigate to the <strong>Developer settings</strong> tab',
'In the <strong>Webhook</strong> section, paste the Webhook URL above',
'In the <strong>Webhook</strong> or <strong>Webhooks V2</strong> section, paste the Webhook URL above',
'Enter a <strong>Secret</strong> (16-32 characters) and save it here as well',
'Click <strong>Save</strong> in Fireflies to activate the webhook',
'Your workflow will now trigger when any meeting transcription completes',
'Both Webhook V1 and V2 formats are supported automatically',
]
.map(
(instruction, index) =>
Expand All @@ -59,12 +59,16 @@ export const firefliesTranscriptionCompleteTrigger: TriggerConfig = {
},
eventType: {
type: 'string',
description: 'The type of event (Transcription completed)',
description: 'The type of event (e.g. Transcription completed, meeting.transcribed)',
},
clientReferenceId: {
type: 'string',
description: 'Custom reference ID if set during upload',
},
timestamp: {
type: 'number',
description: 'Unix timestamp in milliseconds when the event was fired (V2 webhooks)',
},
},

webhook: {
Expand Down
Loading