|
| 1 | +import { FathomIcon } from '@/components/icons' |
| 2 | +import { AuthMode, type BlockConfig } from '@/blocks/types' |
| 3 | +import type { FathomResponse } from '@/tools/fathom/types' |
| 4 | +import { getTrigger } from '@/triggers' |
| 5 | +import { fathomTriggerOptions } from '@/triggers/fathom/utils' |
| 6 | + |
| 7 | +export const FathomBlock: BlockConfig<FathomResponse> = { |
| 8 | + type: 'fathom', |
| 9 | + name: 'Fathom', |
| 10 | + description: 'Access meeting recordings, transcripts, and summaries', |
| 11 | + authMode: AuthMode.ApiKey, |
| 12 | + triggerAllowed: true, |
| 13 | + longDescription: |
| 14 | + 'Integrate Fathom AI Notetaker into your workflow. List meetings, get transcripts and summaries, and manage team members and teams. Can also trigger workflows when new meeting content is ready.', |
| 15 | + docsLink: 'https://docs.sim.ai/tools/fathom', |
| 16 | + category: 'tools', |
| 17 | + bgColor: '#181C1E', |
| 18 | + icon: FathomIcon, |
| 19 | + subBlocks: [ |
| 20 | + { |
| 21 | + id: 'operation', |
| 22 | + title: 'Operation', |
| 23 | + type: 'dropdown', |
| 24 | + options: [ |
| 25 | + { label: 'List Meetings', id: 'fathom_list_meetings' }, |
| 26 | + { label: 'Get Summary', id: 'fathom_get_summary' }, |
| 27 | + { label: 'Get Transcript', id: 'fathom_get_transcript' }, |
| 28 | + { label: 'List Team Members', id: 'fathom_list_team_members' }, |
| 29 | + { label: 'List Teams', id: 'fathom_list_teams' }, |
| 30 | + ], |
| 31 | + value: () => 'fathom_list_meetings', |
| 32 | + }, |
| 33 | + { |
| 34 | + id: 'recordingId', |
| 35 | + title: 'Recording ID', |
| 36 | + type: 'short-input', |
| 37 | + required: { field: 'operation', value: ['fathom_get_summary', 'fathom_get_transcript'] }, |
| 38 | + placeholder: 'Enter the recording ID', |
| 39 | + condition: { field: 'operation', value: ['fathom_get_summary', 'fathom_get_transcript'] }, |
| 40 | + }, |
| 41 | + { |
| 42 | + id: 'includeSummary', |
| 43 | + title: 'Include Summary', |
| 44 | + type: 'dropdown', |
| 45 | + options: [ |
| 46 | + { label: 'No', id: 'false' }, |
| 47 | + { label: 'Yes', id: 'true' }, |
| 48 | + ], |
| 49 | + value: () => 'false', |
| 50 | + condition: { field: 'operation', value: 'fathom_list_meetings' }, |
| 51 | + }, |
| 52 | + { |
| 53 | + id: 'includeTranscript', |
| 54 | + title: 'Include Transcript', |
| 55 | + type: 'dropdown', |
| 56 | + options: [ |
| 57 | + { label: 'No', id: 'false' }, |
| 58 | + { label: 'Yes', id: 'true' }, |
| 59 | + ], |
| 60 | + value: () => 'false', |
| 61 | + condition: { field: 'operation', value: 'fathom_list_meetings' }, |
| 62 | + }, |
| 63 | + { |
| 64 | + id: 'includeActionItems', |
| 65 | + title: 'Include Action Items', |
| 66 | + type: 'dropdown', |
| 67 | + options: [ |
| 68 | + { label: 'No', id: 'false' }, |
| 69 | + { label: 'Yes', id: 'true' }, |
| 70 | + ], |
| 71 | + value: () => 'false', |
| 72 | + condition: { field: 'operation', value: 'fathom_list_meetings' }, |
| 73 | + }, |
| 74 | + { |
| 75 | + id: 'includeCrmMatches', |
| 76 | + title: 'Include CRM Matches', |
| 77 | + type: 'dropdown', |
| 78 | + options: [ |
| 79 | + { label: 'No', id: 'false' }, |
| 80 | + { label: 'Yes', id: 'true' }, |
| 81 | + ], |
| 82 | + value: () => 'false', |
| 83 | + condition: { field: 'operation', value: 'fathom_list_meetings' }, |
| 84 | + }, |
| 85 | + { |
| 86 | + id: 'createdAfter', |
| 87 | + title: 'Created After', |
| 88 | + type: 'short-input', |
| 89 | + placeholder: 'ISO 8601 timestamp (e.g., 2025-01-01T00:00:00Z)', |
| 90 | + condition: { field: 'operation', value: 'fathom_list_meetings' }, |
| 91 | + mode: 'advanced', |
| 92 | + wandConfig: { |
| 93 | + enabled: true, |
| 94 | + prompt: 'Generate an ISO 8601 timestamp. Return ONLY the timestamp string.', |
| 95 | + generationType: 'timestamp', |
| 96 | + }, |
| 97 | + }, |
| 98 | + { |
| 99 | + id: 'createdBefore', |
| 100 | + title: 'Created Before', |
| 101 | + type: 'short-input', |
| 102 | + placeholder: 'ISO 8601 timestamp (e.g., 2025-12-31T23:59:59Z)', |
| 103 | + condition: { field: 'operation', value: 'fathom_list_meetings' }, |
| 104 | + mode: 'advanced', |
| 105 | + wandConfig: { |
| 106 | + enabled: true, |
| 107 | + prompt: 'Generate an ISO 8601 timestamp. Return ONLY the timestamp string.', |
| 108 | + generationType: 'timestamp', |
| 109 | + }, |
| 110 | + }, |
| 111 | + { |
| 112 | + id: 'recordedBy', |
| 113 | + title: 'Recorded By', |
| 114 | + type: 'short-input', |
| 115 | + placeholder: 'Filter by recorder email', |
| 116 | + condition: { field: 'operation', value: 'fathom_list_meetings' }, |
| 117 | + mode: 'advanced', |
| 118 | + }, |
| 119 | + { |
| 120 | + id: 'teams', |
| 121 | + title: 'Team', |
| 122 | + type: 'short-input', |
| 123 | + placeholder: 'Filter by team name', |
| 124 | + condition: { |
| 125 | + field: 'operation', |
| 126 | + value: ['fathom_list_meetings', 'fathom_list_team_members'], |
| 127 | + }, |
| 128 | + mode: 'advanced', |
| 129 | + }, |
| 130 | + { |
| 131 | + id: 'cursor', |
| 132 | + title: 'Pagination Cursor', |
| 133 | + type: 'short-input', |
| 134 | + placeholder: 'Cursor from a previous response', |
| 135 | + condition: { |
| 136 | + field: 'operation', |
| 137 | + value: ['fathom_list_meetings', 'fathom_list_team_members', 'fathom_list_teams'], |
| 138 | + }, |
| 139 | + mode: 'advanced', |
| 140 | + }, |
| 141 | + { |
| 142 | + id: 'apiKey', |
| 143 | + title: 'API Key', |
| 144 | + type: 'short-input', |
| 145 | + required: true, |
| 146 | + placeholder: 'Enter your Fathom API key', |
| 147 | + password: true, |
| 148 | + }, |
| 149 | + { |
| 150 | + id: 'selectedTriggerId', |
| 151 | + title: 'Trigger Type', |
| 152 | + type: 'dropdown', |
| 153 | + mode: 'trigger', |
| 154 | + options: fathomTriggerOptions, |
| 155 | + value: () => 'fathom_new_meeting', |
| 156 | + required: true, |
| 157 | + }, |
| 158 | + ...getTrigger('fathom_new_meeting').subBlocks, |
| 159 | + ...getTrigger('fathom_webhook').subBlocks, |
| 160 | + ], |
| 161 | + tools: { |
| 162 | + access: [ |
| 163 | + 'fathom_list_meetings', |
| 164 | + 'fathom_get_summary', |
| 165 | + 'fathom_get_transcript', |
| 166 | + 'fathom_list_team_members', |
| 167 | + 'fathom_list_teams', |
| 168 | + ], |
| 169 | + config: { |
| 170 | + tool: (params) => { |
| 171 | + return params.operation || 'fathom_list_meetings' |
| 172 | + }, |
| 173 | + }, |
| 174 | + }, |
| 175 | + inputs: { |
| 176 | + operation: { type: 'string', description: 'Operation to perform' }, |
| 177 | + apiKey: { type: 'string', description: 'Fathom API key' }, |
| 178 | + recordingId: { type: 'string', description: 'Recording ID for summary or transcript' }, |
| 179 | + includeSummary: { type: 'string', description: 'Include summary in meetings response' }, |
| 180 | + includeTranscript: { type: 'string', description: 'Include transcript in meetings response' }, |
| 181 | + includeActionItems: { |
| 182 | + type: 'string', |
| 183 | + description: 'Include action items in meetings response', |
| 184 | + }, |
| 185 | + includeCrmMatches: { |
| 186 | + type: 'string', |
| 187 | + description: 'Include linked CRM matches in meetings response', |
| 188 | + }, |
| 189 | + createdAfter: { type: 'string', description: 'Filter meetings created after this timestamp' }, |
| 190 | + createdBefore: { |
| 191 | + type: 'string', |
| 192 | + description: 'Filter meetings created before this timestamp', |
| 193 | + }, |
| 194 | + recordedBy: { type: 'string', description: 'Filter by recorder email' }, |
| 195 | + teams: { type: 'string', description: 'Filter by team name' }, |
| 196 | + cursor: { type: 'string', description: 'Pagination cursor for next page' }, |
| 197 | + }, |
| 198 | + outputs: { |
| 199 | + meetings: { type: 'json', description: 'List of meetings' }, |
| 200 | + template_name: { type: 'string', description: 'Summary template name' }, |
| 201 | + markdown_formatted: { type: 'string', description: 'Markdown-formatted summary' }, |
| 202 | + transcript: { type: 'json', description: 'Meeting transcript entries' }, |
| 203 | + members: { type: 'json', description: 'List of team members' }, |
| 204 | + teams: { type: 'json', description: 'List of teams' }, |
| 205 | + next_cursor: { type: 'string', description: 'Pagination cursor' }, |
| 206 | + }, |
| 207 | + triggers: { |
| 208 | + enabled: true, |
| 209 | + available: ['fathom_new_meeting', 'fathom_webhook'], |
| 210 | + }, |
| 211 | +} |
0 commit comments