From c69831b7ad544339547185dab9da7535f95b0d91 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Wed, 18 Nov 2026 10:14:51 -0800 Subject: [PATCH 1/6] fix(integrations): validate fathom, grain, obsidian and fireflies --- .../docs/content/docs/integrations/fathom.mdx | 10 +++ .../content/docs/integrations/fireflies.mdx | 1 + .../sim/lib/webhooks/providers/fathom.test.ts | 70 +++++++++++++++++++ apps/sim/lib/webhooks/providers/fathom.ts | 28 +++++++- apps/sim/lib/webhooks/providers/fireflies.ts | 4 ++ apps/sim/tools/grain/delete_hook.ts | 4 +- apps/sim/tools/grain/delete_hook_v2.ts | 4 +- apps/sim/tools/grain/get_recording.ts | 3 +- apps/sim/tools/grain/get_transcript.ts | 3 +- apps/sim/tools/obsidian/patch_active.ts | 1 + apps/sim/tools/obsidian/patch_note.ts | 1 + apps/sim/triggers/fathom/utils.ts | 14 ++++ .../fireflies/transcription_complete.ts | 5 ++ 13 files changed, 143 insertions(+), 5 deletions(-) create mode 100644 apps/sim/lib/webhooks/providers/fathom.test.ts diff --git a/apps/docs/content/docs/integrations/fathom.mdx b/apps/docs/content/docs/integrations/fathom.mdx index 92ef1a1073f..79747e38a74 100644 --- a/apps/docs/content/docs/integrations/fathom.mdx +++ b/apps/docs/content/docs/integrations/fathom.mdx @@ -265,7 +265,9 @@ Trigger workflow when new meeting content is ready in Fathom | --------- | ---- | ----------- | | `title` | string | Meeting title | | `meeting_title` | string | Calendar event title | +| `meeting_type` | string | Meeting type name, or null when none is assigned | | `recording_id` | number | Unique recording ID | +| `meeting_url` | string | Underlying video call URL \(Zoom, Meet, Teams\), or null | | `url` | string | URL to view the meeting in Fathom | | `share_url` | string | Shareable URL for the meeting | | `created_at` | string | ISO 8601 creation timestamp | @@ -275,9 +277,12 @@ Trigger workflow when new meeting content is ready in Fathom | `recording_end_time` | string | Recording end time | | `transcript_language` | string | Language of the transcript | | `calendar_invitees_domains_type` | string | Domain type: only_internal or one_or_more_external | +| `shared_with` | string | Sharing scope: no_teams, single_team, multiple_teams, or all_teams | | `recorded_by` | object | Recorder details | | ↳ `name` | string | Name of the recorder | | ↳ `email` | string | Email of the recorder | +| ↳ `email_domain` | string | Email domain of the recorder | +| ↳ `team` | string | Recorder team name, or null | | `calendar_invitees` | array | Array of calendar invitees with name and email | | `default_summary` | object | Meeting summary | | ↳ `template_name` | string | Summary template name | @@ -311,7 +316,9 @@ Generic webhook trigger for all Fathom events | --------- | ---- | ----------- | | `title` | string | Meeting title | | `meeting_title` | string | Calendar event title | +| `meeting_type` | string | Meeting type name, or null when none is assigned | | `recording_id` | number | Unique recording ID | +| `meeting_url` | string | Underlying video call URL \(Zoom, Meet, Teams\), or null | | `url` | string | URL to view the meeting in Fathom | | `share_url` | string | Shareable URL for the meeting | | `created_at` | string | ISO 8601 creation timestamp | @@ -321,9 +328,12 @@ Generic webhook trigger for all Fathom events | `recording_end_time` | string | Recording end time | | `transcript_language` | string | Language of the transcript | | `calendar_invitees_domains_type` | string | Domain type: only_internal or one_or_more_external | +| `shared_with` | string | Sharing scope: no_teams, single_team, multiple_teams, or all_teams | | `recorded_by` | object | Recorder details | | ↳ `name` | string | Name of the recorder | | ↳ `email` | string | Email of the recorder | +| ↳ `email_domain` | string | Email domain of the recorder | +| ↳ `team` | string | Recorder team name, or null | | `calendar_invitees` | array | Array of calendar invitees with name and email | | `default_summary` | object | Meeting summary | | ↳ `template_name` | string | Summary template name | diff --git a/apps/docs/content/docs/integrations/fireflies.mdx b/apps/docs/content/docs/integrations/fireflies.mdx index 27cf424f2d7..eaf506513c7 100644 --- a/apps/docs/content/docs/integrations/fireflies.mdx +++ b/apps/docs/content/docs/integrations/fireflies.mdx @@ -303,6 +303,7 @@ Trigger workflow when a Fireflies meeting transcription is complete | `eventType` | string | The type of event \(e.g. Transcription completed, meeting.transcribed\) | | `clientReferenceId` | string | Custom reference ID if set during upload | | `timestamp` | number | Unix timestamp in milliseconds when the event was fired \(V2 webhooks\) | +| `reprocessedAt` | number | Unix timestamp in milliseconds of the transcript or summary change that caused a resend \(V2 webhooks; absent on a meeting's first delivery\) | diff --git a/apps/sim/lib/webhooks/providers/fathom.test.ts b/apps/sim/lib/webhooks/providers/fathom.test.ts new file mode 100644 index 00000000000..7c01f861652 --- /dev/null +++ b/apps/sim/lib/webhooks/providers/fathom.test.ts @@ -0,0 +1,70 @@ +import crypto from 'node:crypto' +import { NextRequest } from 'next/server' +import { describe, expect, it } from 'vitest' +import { fathomHandler } from '@/lib/webhooks/providers/fathom' + +const SECRET_BYTES = Buffer.from('fathom-test-secret-key-padding!!!!!!') +const SIGNING_SECRET = `whsec_${SECRET_BYTES.toString('base64')}` + +function sign(msgId: string, timestamp: string, rawBody: string): string { + const sig = crypto + .createHmac('sha256', SECRET_BYTES) + .update(`${msgId}.${timestamp}.${rawBody}`, 'utf8') + .digest('base64') + return `v1,${sig}` +} + +function request(msgId: string, timestamp: string, signature: string): NextRequest { + return new NextRequest('http://localhost/test', { + headers: { + 'webhook-id': msgId, + 'webhook-timestamp': timestamp, + 'webhook-signature': signature, + }, + }) +} + +const nowSeconds = () => `${Math.floor(Date.now() / 1000)}` +const rawBody = JSON.stringify({ title: 'QBR', recording_id: 123 }) + +describe('Fathom webhook provider verifyAuth', () => { + it('rejects a forged delivery when the webhook has a signing secret', async () => { + const res = await fathomHandler.verifyAuth?.({ + webhook: {}, + workflow: {}, + request: request('msg_1', nowSeconds(), 'v1,Zm9yZ2Vk'), + rawBody, + requestId: 'fathom-t1', + providerConfig: { signingSecret: SIGNING_SECRET }, + }) + + expect(res?.status).toBe(401) + }) + + it('accepts a correctly signed delivery', async () => { + const ts = nowSeconds() + const res = await fathomHandler.verifyAuth?.({ + webhook: {}, + workflow: {}, + request: request('msg_1', ts, sign('msg_1', ts, rawBody)), + rawBody, + requestId: 'fathom-t2', + providerConfig: { signingSecret: SIGNING_SECRET }, + }) + + expect(res).toBeNull() + }) + + it('keeps accepting webhooks registered before the secret was stored', async () => { + const res = await fathomHandler.verifyAuth?.({ + webhook: {}, + workflow: {}, + request: request('msg_1', nowSeconds(), 'v1,Zm9yZ2Vk'), + rawBody, + requestId: 'fathom-t3', + providerConfig: {}, + }) + + expect(res ?? null).toBeNull() + }) +}) diff --git a/apps/sim/lib/webhooks/providers/fathom.ts b/apps/sim/lib/webhooks/providers/fathom.ts index e927b4d8fc2..a2a88483eb9 100644 --- a/apps/sim/lib/webhooks/providers/fathom.ts +++ b/apps/sim/lib/webhooks/providers/fathom.ts @@ -1,18 +1,39 @@ import { createLogger } from '@sim/logger' +import type { NextResponse } from 'next/server' import { outboundFetch } from '@/lib/core/network/outbound-fetch.server' import { validateAlphanumericId } from '@/lib/core/security/input-validation' import { getNotificationUrl, getProviderConfig } from '@/lib/webhooks/provider-subscription-utils' import { WebhookDeploymentConfigurationError } from '@/lib/webhooks/providers/errors' import type { + AuthContext, DeleteSubscriptionContext, SubscriptionContext, SubscriptionResult, WebhookProviderHandler, } from '@/lib/webhooks/providers/types' +import { verifyStandardWebhookRequest } from '@/lib/webhooks/providers/utils' const logger = createLogger('WebhookProvider:Fathom') export const fathomHandler: WebhookProviderHandler = { + /** + * Fathom signs deliveries with the Standard Webhooks scheme using the secret + * returned when Sim registers the webhook. Rows registered before Sim stored + * that secret have none and keep being accepted until they are redeployed. + */ + verifyAuth({ request, rawBody, requestId, providerConfig }: AuthContext): NextResponse | null { + const signingSecret = providerConfig.signingSecret as string | undefined + if (!signingSecret?.trim()) return null + + return verifyStandardWebhookRequest({ + request, + rawBody, + requestId, + secret: signingSecret, + providerLabel: 'Fathom', + }) + }, + async createSubscription(ctx: SubscriptionContext): Promise { const { webhook, requestId } = ctx try { @@ -109,7 +130,12 @@ export const fathomHandler: WebhookProviderHandler = { fathomWebhookId: responseBody.id, }) - return { providerConfigUpdates: { externalId: responseBody.id } } + const signingSecret = + typeof responseBody.secret === 'string' && responseBody.secret.trim() + ? responseBody.secret + : undefined + + return { providerConfigUpdates: { externalId: responseBody.id, signingSecret } } } catch (error: unknown) { if (error instanceof WebhookDeploymentConfigurationError) throw error const err = error as Error diff --git a/apps/sim/lib/webhooks/providers/fireflies.ts b/apps/sim/lib/webhooks/providers/fireflies.ts index e7e67da0599..584a6732287 100644 --- a/apps/sim/lib/webhooks/providers/fireflies.ts +++ b/apps/sim/lib/webhooks/providers/fireflies.ts @@ -55,6 +55,9 @@ export const firefliesHandler: WebhookProviderHandler = { 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 + const rawReprocessedAt = isV2 && b.reprocessed_at != null ? Number(b.reprocessed_at) : null + const reprocessedAt = + rawReprocessedAt !== null && Number.isFinite(rawReprocessedAt) ? rawReprocessedAt : null return { input: { @@ -62,6 +65,7 @@ export const firefliesHandler: WebhookProviderHandler = { eventType, clientReferenceId, ...(timestamp !== null ? { timestamp } : {}), + ...(reprocessedAt !== null ? { reprocessedAt } : {}), }, } }, diff --git a/apps/sim/tools/grain/delete_hook.ts b/apps/sim/tools/grain/delete_hook.ts index 1d97272af35..46a453f7cc4 100644 --- a/apps/sim/tools/grain/delete_hook.ts +++ b/apps/sim/tools/grain/delete_hook.ts @@ -1,5 +1,6 @@ import type { GrainDeleteHookParams, GrainDeleteHookResponse } from '@/tools/grain/types' import type { ToolConfig } from '@/tools/types' +import { safeUrlPathSegment } from '@/tools/url-path' export const grainDeleteHookTool: ToolConfig = { id: 'grain_delete_hook', @@ -23,7 +24,8 @@ export const grainDeleteHookTool: ToolConfig `https://api.grain.com/_/public-api/hooks/${params.hookId}`, + url: (params) => + `https://api.grain.com/_/public-api/hooks/${safeUrlPathSegment(params.hookId, 'hookId')}`, method: 'DELETE', headers: (params) => ({ 'Content-Type': 'application/json', diff --git a/apps/sim/tools/grain/delete_hook_v2.ts b/apps/sim/tools/grain/delete_hook_v2.ts index 8ee8ae82c7b..76a0f960c80 100644 --- a/apps/sim/tools/grain/delete_hook_v2.ts +++ b/apps/sim/tools/grain/delete_hook_v2.ts @@ -1,6 +1,7 @@ import type { GrainDeleteHookV2Params, GrainDeleteHookV2Response } from '@/tools/grain/types' import { GRAIN_CREDENTIAL_OAUTH } from '@/tools/shared/saved-credentials' import type { ToolConfig } from '@/tools/types' +import { safeUrlPathSegment } from '@/tools/url-path' export const grainDeleteHookV2Tool: ToolConfig = { @@ -26,7 +27,8 @@ export const grainDeleteHookV2Tool: ToolConfig `https://api.grain.com/_/public-api/v2/hooks/${params.hookId.trim()}`, + url: (params) => + `https://api.grain.com/_/public-api/v2/hooks/${safeUrlPathSegment(params.hookId, 'hookId')}`, method: 'DELETE', headers: (params) => ({ 'Content-Type': 'application/json', diff --git a/apps/sim/tools/grain/get_recording.ts b/apps/sim/tools/grain/get_recording.ts index 524ff15a64d..da6d23b838d 100644 --- a/apps/sim/tools/grain/get_recording.ts +++ b/apps/sim/tools/grain/get_recording.ts @@ -1,6 +1,7 @@ import type { GrainGetRecordingParams, GrainGetRecordingResponse } from '@/tools/grain/types' import { GRAIN_CREDENTIAL_OAUTH } from '@/tools/shared/saved-credentials' import type { ToolConfig } from '@/tools/types' +import { safeUrlPathSegment } from '@/tools/url-path' export const grainGetRecordingTool: ToolConfig = { @@ -63,7 +64,7 @@ export const grainGetRecordingTool: ToolConfig - `https://api.grain.com/_/public-api/v2/recordings/${params.recordingId.trim()}`, + `https://api.grain.com/_/public-api/v2/recordings/${safeUrlPathSegment(params.recordingId, 'recordingId')}`, method: 'POST', headers: (params) => ({ 'Content-Type': 'application/json', diff --git a/apps/sim/tools/grain/get_transcript.ts b/apps/sim/tools/grain/get_transcript.ts index c29cee86cc9..9faac2011a4 100644 --- a/apps/sim/tools/grain/get_transcript.ts +++ b/apps/sim/tools/grain/get_transcript.ts @@ -1,6 +1,7 @@ import type { GrainGetTranscriptParams, GrainGetTranscriptResponse } from '@/tools/grain/types' import { GRAIN_CREDENTIAL_OAUTH } from '@/tools/shared/saved-credentials' import type { ToolConfig } from '@/tools/types' +import { safeUrlPathSegment } from '@/tools/url-path' export const grainGetTranscriptTool: ToolConfig< GrainGetTranscriptParams, @@ -29,7 +30,7 @@ export const grainGetTranscriptTool: ToolConfig< request: { url: (params) => - `https://api.grain.com/_/public-api/v2/recordings/${params.recordingId.trim()}/transcript`, + `https://api.grain.com/_/public-api/v2/recordings/${safeUrlPathSegment(params.recordingId, 'recordingId')}/transcript`, method: 'GET', headers: (params) => ({ 'Content-Type': 'application/json', diff --git a/apps/sim/tools/obsidian/patch_active.ts b/apps/sim/tools/obsidian/patch_active.ts index ae72a71218b..9c04a9d9da3 100644 --- a/apps/sim/tools/obsidian/patch_active.ts +++ b/apps/sim/tools/obsidian/patch_active.ts @@ -70,6 +70,7 @@ export const patchActiveTool: ToolConfig = { Authorization: `Bearer ${params.apiKey}`, 'Content-Type': 'text/markdown', + 'Markdown-Patch-Version': '1', Operation: params.operation, 'Target-Type': params.targetType, Target: encodeURIComponent(params.target), diff --git a/apps/sim/tools/obsidian/patch_note.ts b/apps/sim/tools/obsidian/patch_note.ts index 12013d8b77f..a2cebc4ccb6 100644 --- a/apps/sim/tools/obsidian/patch_note.ts +++ b/apps/sim/tools/obsidian/patch_note.ts @@ -76,6 +76,7 @@ export const patchNoteTool: ToolConfig = { Authorization: `Bearer ${params.apiKey}`, 'Content-Type': 'text/markdown', + 'Markdown-Patch-Version': '1', Operation: params.operation, 'Target-Type': params.targetType, Target: encodeURIComponent(params.target), diff --git a/apps/sim/triggers/fathom/utils.ts b/apps/sim/triggers/fathom/utils.ts index b8b6bf750f4..c60aa4a9a32 100644 --- a/apps/sim/triggers/fathom/utils.ts +++ b/apps/sim/triggers/fathom/utils.ts @@ -42,10 +42,18 @@ export function buildMeetingOutputs(): Record { type: 'string', description: 'Calendar event title', }, + meeting_type: { + type: 'string', + description: 'Meeting type name, or null when none is assigned', + }, recording_id: { type: 'number', description: 'Unique recording ID', }, + meeting_url: { + type: 'string', + description: 'Underlying video call URL (Zoom, Meet, Teams), or null', + }, url: { type: 'string', description: 'URL to view the meeting in Fathom', @@ -82,11 +90,17 @@ export function buildMeetingOutputs(): Record { type: 'string', description: 'Domain type: only_internal or one_or_more_external', }, + shared_with: { + type: 'string', + description: 'Sharing scope: no_teams, single_team, multiple_teams, or all_teams', + }, recorded_by: { type: 'object', description: 'Recorder details', name: { type: 'string', description: 'Name of the recorder' }, email: { type: 'string', description: 'Email of the recorder' }, + email_domain: { type: 'string', description: 'Email domain of the recorder' }, + team: { type: 'string', description: 'Recorder team name, or null' }, }, calendar_invitees: { type: 'array', diff --git a/apps/sim/triggers/fireflies/transcription_complete.ts b/apps/sim/triggers/fireflies/transcription_complete.ts index 49d3e1fe52a..f8dce4cb10c 100644 --- a/apps/sim/triggers/fireflies/transcription_complete.ts +++ b/apps/sim/triggers/fireflies/transcription_complete.ts @@ -69,6 +69,11 @@ export const firefliesTranscriptionCompleteTrigger: TriggerConfig = { type: 'number', description: 'Unix timestamp in milliseconds when the event was fired (V2 webhooks)', }, + reprocessedAt: { + type: 'number', + description: + "Unix timestamp in milliseconds of the transcript or summary change that caused a resend (V2 webhooks; absent on a meeting's first delivery)", + }, }, webhook: { From fa43cc894caa984d79eae298c024606e12f3690b Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Wed, 18 Nov 2026 10:27:01 -0800 Subject: [PATCH 2/6] fix(fathom): fail closed without a signing secret and nest trigger object outputs --- .../sim/lib/webhooks/providers/fathom.test.ts | 49 ++++++++++++++++++- apps/sim/lib/webhooks/providers/fathom.ts | 32 ++++++++++-- apps/sim/triggers/fathom/utils.ts | 16 +++--- 3 files changed, 87 insertions(+), 10 deletions(-) diff --git a/apps/sim/lib/webhooks/providers/fathom.test.ts b/apps/sim/lib/webhooks/providers/fathom.test.ts index 7c01f861652..efb41a6ae78 100644 --- a/apps/sim/lib/webhooks/providers/fathom.test.ts +++ b/apps/sim/lib/webhooks/providers/fathom.test.ts @@ -1,6 +1,6 @@ import crypto from 'node:crypto' import { NextRequest } from 'next/server' -import { describe, expect, it } from 'vitest' +import { beforeEach, describe, expect, it, vi } from 'vitest' import { fathomHandler } from '@/lib/webhooks/providers/fathom' const SECRET_BYTES = Buffer.from('fathom-test-secret-key-padding!!!!!!') @@ -68,3 +68,50 @@ describe('Fathom webhook provider verifyAuth', () => { expect(res ?? null).toBeNull() }) }) + +describe('Fathom webhook provider createSubscription', () => { + const fetchMock = vi.fn() + + beforeEach(() => { + fetchMock.mockReset() + vi.stubGlobal('fetch', fetchMock) + }) + + it('stores the signing secret Fathom returns', async () => { + fetchMock.mockResolvedValueOnce({ + ok: true, + status: 201, + json: async () => ({ id: 'ikEoQ4bVoq4JYUmc', secret: SIGNING_SECRET }), + }) + + const result = await fathomHandler.createSubscription?.({ + webhook: { id: 'wh_1', path: 'p1', providerConfig: { apiKey: 'fathom_key' } }, + requestId: 'fathom-sub1', + } as never) + + expect(result?.providerConfigUpdates).toEqual({ + externalId: 'ikEoQ4bVoq4JYUmc', + signingSecret: SIGNING_SECRET, + }) + }) + + it('deletes the webhook and fails when the response omits the signing secret', async () => { + fetchMock.mockResolvedValueOnce({ + ok: true, + status: 201, + json: async () => ({ id: 'ikEoQ4bVoq4JYUmc' }), + }) + fetchMock.mockResolvedValueOnce({ ok: true, status: 204 }) + + await expect( + fathomHandler.createSubscription?.({ + webhook: { id: 'wh_2', path: 'p2', providerConfig: { apiKey: 'fathom_key' } }, + requestId: 'fathom-sub2', + } as never) + ).rejects.toThrow(/signing secret/) + + const [url, init] = fetchMock.mock.calls[1] + expect(init.method).toBe('DELETE') + expect(url).toBe('https://api.fathom.ai/external/v1/webhooks/ikEoQ4bVoq4JYUmc') + }) +}) diff --git a/apps/sim/lib/webhooks/providers/fathom.ts b/apps/sim/lib/webhooks/providers/fathom.ts index a2a88483eb9..21e6036d496 100644 --- a/apps/sim/lib/webhooks/providers/fathom.ts +++ b/apps/sim/lib/webhooks/providers/fathom.ts @@ -15,6 +15,25 @@ import { verifyStandardWebhookRequest } from '@/lib/webhooks/providers/utils' const logger = createLogger('WebhookProvider:Fathom') +/** Best-effort removal of a webhook Sim registered but cannot keep, so it does not keep firing. */ +async function deleteOrphanedFathomWebhook( + apiKey: string, + fathomWebhookId: string, + requestId: string +): Promise { + if (!validateAlphanumericId(fathomWebhookId, 'Fathom webhook ID', 100).isValid) return + try { + await outboundFetch(`https://api.fathom.ai/external/v1/webhooks/${fathomWebhookId}`, { + method: 'DELETE', + headers: { 'X-Api-Key': apiKey }, + }) + } catch (error) { + logger.warn('Failed to remove orphaned Fathom webhook; it may still be active', error, { + requestId, + }) + } +} + export const fathomHandler: WebhookProviderHandler = { /** * Fathom signs deliveries with the Standard Webhooks scheme using the secret @@ -131,9 +150,16 @@ export const fathomHandler: WebhookProviderHandler = { }) const signingSecret = - typeof responseBody.secret === 'string' && responseBody.secret.trim() - ? responseBody.secret - : undefined + typeof responseBody.secret === 'string' ? responseBody.secret.trim() : '' + if (!signingSecret) { + logger.error(`Fathom webhook creation returned no signing secret for ${webhook.id}.`, { + requestId, + }) + await deleteOrphanedFathomWebhook(apiKey, String(responseBody.id), requestId) + throw new Error( + 'Fathom created the webhook but did not return a signing secret, so deliveries could not be verified. Please try again.' + ) + } return { providerConfigUpdates: { externalId: responseBody.id, signingSecret } } } catch (error: unknown) { diff --git a/apps/sim/triggers/fathom/utils.ts b/apps/sim/triggers/fathom/utils.ts index c60aa4a9a32..cbbc835af16 100644 --- a/apps/sim/triggers/fathom/utils.ts +++ b/apps/sim/triggers/fathom/utils.ts @@ -97,10 +97,12 @@ export function buildMeetingOutputs(): Record { recorded_by: { type: 'object', description: 'Recorder details', - name: { type: 'string', description: 'Name of the recorder' }, - email: { type: 'string', description: 'Email of the recorder' }, - email_domain: { type: 'string', description: 'Email domain of the recorder' }, - team: { type: 'string', description: 'Recorder team name, or null' }, + properties: { + name: { type: 'string', description: 'Name of the recorder' }, + email: { type: 'string', description: 'Email of the recorder' }, + email_domain: { type: 'string', description: 'Email domain of the recorder' }, + team: { type: 'string', description: 'Recorder team name, or null' }, + }, }, calendar_invitees: { type: 'array', @@ -109,8 +111,10 @@ export function buildMeetingOutputs(): Record { default_summary: { type: 'object', description: 'Meeting summary', - template_name: { type: 'string', description: 'Summary template name' }, - markdown_formatted: { type: 'string', description: 'Markdown-formatted summary' }, + properties: { + template_name: { type: 'string', description: 'Summary template name' }, + markdown_formatted: { type: 'string', description: 'Markdown-formatted summary' }, + }, }, transcript: { type: 'array', From f0f9c4ef5840ec455fd5e4e82fc3bed4bbb07359 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Wed, 18 Nov 2026 10:50:08 -0800 Subject: [PATCH 3/6] fix(fathom): keep the missing-secret log message static --- apps/sim/lib/webhooks/providers/fathom.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/sim/lib/webhooks/providers/fathom.ts b/apps/sim/lib/webhooks/providers/fathom.ts index 21e6036d496..0fc1aba941b 100644 --- a/apps/sim/lib/webhooks/providers/fathom.ts +++ b/apps/sim/lib/webhooks/providers/fathom.ts @@ -152,8 +152,9 @@ export const fathomHandler: WebhookProviderHandler = { const signingSecret = typeof responseBody.secret === 'string' ? responseBody.secret.trim() : '' if (!signingSecret) { - logger.error(`Fathom webhook creation returned no signing secret for ${webhook.id}.`, { + logger.error('Fathom webhook creation returned no signing secret', { requestId, + webhookId: webhook.id, }) await deleteOrphanedFathomWebhook(apiKey, String(responseBody.id), requestId) throw new Error( From ef9d85b0c8fc96362f8f444b00ba5becda7998a9 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Wed, 18 Nov 2026 11:36:25 -0800 Subject: [PATCH 4/6] fix(fathom): log a failed orphan webhook delete --- apps/sim/lib/webhooks/providers/fathom.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/apps/sim/lib/webhooks/providers/fathom.ts b/apps/sim/lib/webhooks/providers/fathom.ts index 0fc1aba941b..d84ab0d7d15 100644 --- a/apps/sim/lib/webhooks/providers/fathom.ts +++ b/apps/sim/lib/webhooks/providers/fathom.ts @@ -23,10 +23,16 @@ async function deleteOrphanedFathomWebhook( ): Promise { if (!validateAlphanumericId(fathomWebhookId, 'Fathom webhook ID', 100).isValid) return try { - await outboundFetch(`https://api.fathom.ai/external/v1/webhooks/${fathomWebhookId}`, { - method: 'DELETE', - headers: { 'X-Api-Key': apiKey }, - }) + const response = await outboundFetch( + `https://api.fathom.ai/external/v1/webhooks/${fathomWebhookId}`, + { method: 'DELETE', headers: { 'X-Api-Key': apiKey } } + ) + if (!response.ok && response.status !== 404) { + logger.warn('Failed to remove orphaned Fathom webhook; it may still be active', { + requestId, + status: response.status, + }) + } } catch (error) { logger.warn('Failed to remove orphaned Fathom webhook; it may still be active', error, { requestId, From 47ada0cdf09ff3017629de0615c2be6b466f692a Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Wed, 18 Nov 2026 11:40:46 -0800 Subject: [PATCH 5/6] fix(fireflies): only pass through a numeric reprocessed_at --- apps/sim/lib/webhooks/providers/fireflies.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/sim/lib/webhooks/providers/fireflies.ts b/apps/sim/lib/webhooks/providers/fireflies.ts index 584a6732287..ee13f09c34f 100644 --- a/apps/sim/lib/webhooks/providers/fireflies.ts +++ b/apps/sim/lib/webhooks/providers/fireflies.ts @@ -55,9 +55,10 @@ export const firefliesHandler: WebhookProviderHandler = { 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 - const rawReprocessedAt = isV2 && b.reprocessed_at != null ? Number(b.reprocessed_at) : null const reprocessedAt = - rawReprocessedAt !== null && Number.isFinite(rawReprocessedAt) ? rawReprocessedAt : null + isV2 && typeof b.reprocessed_at === 'number' && Number.isFinite(b.reprocessed_at) + ? b.reprocessed_at + : null return { input: { From a909d60aa336c1a912fac063684d90b44202c7a0 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Wed, 18 Nov 2026 12:03:07 -0800 Subject: [PATCH 6/6] fix(fathom): keep recorder and summary outputs open and correct the legacy-webhook note --- apps/sim/lib/webhooks/providers/fathom.ts | 3 ++- apps/sim/triggers/fathom/utils.test.ts | 18 ++++++++++++++++++ apps/sim/triggers/fathom/utils.ts | 2 ++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 apps/sim/triggers/fathom/utils.test.ts diff --git a/apps/sim/lib/webhooks/providers/fathom.ts b/apps/sim/lib/webhooks/providers/fathom.ts index d84ab0d7d15..92d944ea8a0 100644 --- a/apps/sim/lib/webhooks/providers/fathom.ts +++ b/apps/sim/lib/webhooks/providers/fathom.ts @@ -44,7 +44,8 @@ export const fathomHandler: WebhookProviderHandler = { /** * Fathom signs deliveries with the Standard Webhooks scheme using the secret * returned when Sim registers the webhook. Rows registered before Sim stored - * that secret have none and keep being accepted until they are redeployed. + * that secret have none and keep being accepted until the trigger's settings + * change or it is re-created, which registers a new webhook and stores its secret. */ verifyAuth({ request, rawBody, requestId, providerConfig }: AuthContext): NextResponse | null { const signingSecret = providerConfig.signingSecret as string | undefined diff --git a/apps/sim/triggers/fathom/utils.test.ts b/apps/sim/triggers/fathom/utils.test.ts new file mode 100644 index 00000000000..9814a2a6c90 --- /dev/null +++ b/apps/sim/triggers/fathom/utils.test.ts @@ -0,0 +1,18 @@ +import { describe, expect, it } from 'vitest' +import type { OutputSchema } from '@/executor/utils/block-reference' +import { isPathInSchema } from '@/executor/utils/block-reference' +import { buildMeetingOutputs } from '@/triggers/fathom/utils' + +describe('Fathom meeting trigger outputs', () => { + const schema = buildMeetingOutputs() as unknown as OutputSchema + + it('resolves the documented recorder and summary fields', () => { + expect(isPathInSchema(schema, ['recorded_by', 'team'])).toBe(true) + expect(isPathInSchema(schema, ['default_summary', 'markdown_formatted'])).toBe(true) + }) + + it('keeps accepting sub-paths saved before the fields were declared', () => { + expect(isPathInSchema(schema, ['recorded_by', 'id'])).toBe(true) + expect(isPathInSchema(schema, ['default_summary', 'sections'])).toBe(true) + }) +}) diff --git a/apps/sim/triggers/fathom/utils.ts b/apps/sim/triggers/fathom/utils.ts index cbbc835af16..6b9e949d618 100644 --- a/apps/sim/triggers/fathom/utils.ts +++ b/apps/sim/triggers/fathom/utils.ts @@ -97,6 +97,7 @@ export function buildMeetingOutputs(): Record { recorded_by: { type: 'object', description: 'Recorder details', + open: true, properties: { name: { type: 'string', description: 'Name of the recorder' }, email: { type: 'string', description: 'Email of the recorder' }, @@ -111,6 +112,7 @@ export function buildMeetingOutputs(): Record { default_summary: { type: 'object', description: 'Meeting summary', + open: true, properties: { template_name: { type: 'string', description: 'Summary template name' }, markdown_formatted: { type: 'string', description: 'Markdown-formatted summary' },