-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Expand file tree
/
Copy pathwebhook.ts
More file actions
116 lines (112 loc) · 3.11 KB
/
webhook.ts
File metadata and controls
116 lines (112 loc) · 3.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
import { FathomIcon } from '@/components/icons'
import type { TriggerConfig } from '@/triggers/types'
import { buildGenericOutputs, fathomSetupInstructions } from './utils'
export const fathomWebhookTrigger: TriggerConfig = {
id: 'fathom_webhook',
name: 'Fathom Webhook',
provider: 'fathom',
description: 'Generic webhook trigger for all Fathom events',
version: '1.0.0',
icon: FathomIcon,
subBlocks: [
{
id: 'apiKey',
title: 'API Key',
type: 'short-input',
placeholder: 'Enter your Fathom API key',
description: 'Required to create the webhook in Fathom.',
password: true,
required: true,
mode: 'trigger',
condition: {
field: 'selectedTriggerId',
value: 'fathom_webhook',
},
},
{
id: 'triggeredFor',
title: 'Trigger For',
type: 'dropdown',
options: [
{ label: 'My Recordings', id: 'my_recordings' },
{ label: 'Shared External Recordings', id: 'shared_external_recordings' },
{ label: 'My Shared With Team Recordings', id: 'my_shared_with_team_recordings' },
{ label: 'Shared Team Recordings', id: 'shared_team_recordings' },
],
value: () => 'my_recordings',
description: 'Which recording types should trigger this webhook.',
mode: 'trigger',
condition: {
field: 'selectedTriggerId',
value: 'fathom_webhook',
},
},
{
id: 'includeSummary',
title: 'Include Summary',
type: 'switch',
description: 'Include the meeting summary in the webhook payload.',
defaultValue: true,
mode: 'trigger',
condition: {
field: 'selectedTriggerId',
value: 'fathom_webhook',
},
},
{
id: 'includeTranscript',
title: 'Include Transcript',
type: 'switch',
description: 'Include the full transcript in the webhook payload.',
defaultValue: false,
mode: 'trigger',
condition: {
field: 'selectedTriggerId',
value: 'fathom_webhook',
},
},
{
id: 'includeActionItems',
title: 'Include Action Items',
type: 'switch',
description: 'Include action items extracted from the meeting.',
defaultValue: false,
mode: 'trigger',
condition: {
field: 'selectedTriggerId',
value: 'fathom_webhook',
},
},
{
id: 'includeCrmMatches',
title: 'Include CRM Matches',
type: 'switch',
description: 'Include matched CRM contacts, companies, and deals from your linked CRM.',
defaultValue: false,
mode: 'trigger',
condition: {
field: 'selectedTriggerId',
value: 'fathom_webhook',
},
},
{
id: 'triggerInstructions',
title: 'Setup Instructions',
hideFromPreview: true,
type: 'text',
defaultValue: fathomSetupInstructions('All Events'),
mode: 'trigger',
condition: {
field: 'selectedTriggerId',
value: 'fathom_webhook',
},
},
],
outputs: buildGenericOutputs(),
webhook: {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
},
}