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
3 changes: 2 additions & 1 deletion apps/sim/blocks/blocks/granola.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ export const GranolaBlock: BlockConfig = {
invitees: { type: 'json', description: 'Calendar event invitee emails' },
transcript: {
type: 'json',
description: 'Meeting transcript entries (speaker, speakerLabel, text, startTime, endTime)',
description:
'Meeting transcript entries (speaker, speakerLabel, speakerName, text, startTime, endTime)',
},
},
}
Expand Down
12 changes: 9 additions & 3 deletions apps/sim/tools/granola/get_note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const getNoteTool: ToolConfig<GranolaGetNoteParams, GranolaGetNoteRespons
ownerEmail: data.owner?.email ?? '',
createdAt: data.created_at ?? '',
updatedAt: data.updated_at ?? '',
webUrl: data.web_url ?? null,
webUrl: data.web_url ?? '',
summaryText: data.summary_text ?? '',
summaryMarkdown: data.summary_markdown ?? null,
attendees: (data.attendees ?? []).map((a: { name: string | null; email: string }) => ({
Expand All @@ -79,13 +79,14 @@ export const getNoteTool: ToolConfig<GranolaGetNoteParams, GranolaGetNoteRespons
transcript: data.transcript
? data.transcript.map(
(t: {
speaker: { source: string; diarization_label?: string }
speaker: { source: string; diarization_label?: string; name?: string }
text: string
start_time: string
end_time: string
}) => ({
speaker: t.speaker?.source ?? 'unknown',
speakerLabel: t.speaker?.diarization_label ?? null,
speakerName: t.speaker?.name ?? null,
text: t.text ?? '',
startTime: t.start_time ?? '',
endTime: t.end_time ?? '',
Expand All @@ -103,7 +104,7 @@ export const getNoteTool: ToolConfig<GranolaGetNoteParams, GranolaGetNoteRespons
ownerEmail: { type: 'string', description: 'Note owner email' },
createdAt: { type: 'string', description: 'Creation timestamp' },
updatedAt: { type: 'string', description: 'Last update timestamp' },
webUrl: { type: 'string', description: 'URL to view the note in Granola', optional: true },
webUrl: { type: 'string', description: 'URL to view the note in Granola' },
summaryText: { type: 'string', description: 'Plain text summary of the meeting' },
summaryMarkdown: {
type: 'string',
Expand Down Expand Up @@ -155,6 +156,11 @@ export const getNoteTool: ToolConfig<GranolaGetNoteParams, GranolaGetNoteRespons
description: 'Diarization label for the speaker (e.g., Speaker A)',
optional: true,
},
speakerName: {
type: 'string',
description: 'Resolved name of the identified speaker, when available',
optional: true,
},
text: { type: 'string', description: 'Transcript text' },
startTime: { type: 'string', description: 'Segment start time' },
endTime: { type: 'string', description: 'Segment end time' },
Expand Down
3 changes: 2 additions & 1 deletion apps/sim/tools/granola/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export interface GranolaGetNoteResponse extends ToolResponse {
ownerEmail: string
createdAt: string
updatedAt: string
webUrl: string | null
webUrl: string
summaryText: string
summaryMarkdown: string | null
attendees: { name: string | null; email: string }[]
Expand All @@ -72,6 +72,7 @@ export interface GranolaGetNoteResponse extends ToolResponse {
| {
speaker: string
speakerLabel: string | null
speakerName: string | null
text: string
startTime: string
endTime: string
Expand Down
Loading