Skip to content

Commit 3ce86b8

Browse files
committed
fix(granola): use string comparison for includeTranscript to avoid truthy string bug
1 parent 67492a6 commit 3ce86b8

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

apps/sim/blocks/blocks/granola.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ export const GranolaBlock: BlockConfig = {
120120
tool: (params) => `granola_${params.operation}`,
121121
params: (params) => {
122122
const result: Record<string, unknown> = {}
123-
if (params.includeTranscript === 'true') result.includeTranscript = true
124123
if (params.pageSize) result.pageSize = Number(params.pageSize)
125124
return result
126125
},

apps/sim/tools/granola/get_note.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const getNoteTool: ToolConfig<GranolaGetNoteParams, GranolaGetNoteRespons
2222
description: 'The note ID (e.g., not_1d3tmYTlCICgjy)',
2323
},
2424
includeTranscript: {
25-
type: 'boolean',
25+
type: 'string',
2626
required: false,
2727
visibility: 'user-or-llm',
2828
description: 'Whether to include the meeting transcript',
@@ -32,7 +32,7 @@ export const getNoteTool: ToolConfig<GranolaGetNoteParams, GranolaGetNoteRespons
3232
request: {
3333
url: (params) => {
3434
const url = new URL(`https://public-api.granola.ai/v1/notes/${params.noteId.trim()}`)
35-
if (params.includeTranscript) url.searchParams.append('include', 'transcript')
35+
if (params.includeTranscript === 'true') url.searchParams.append('include', 'transcript')
3636
return url.toString()
3737
},
3838
method: 'GET',

apps/sim/tools/granola/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export interface GranolaListNotesParams {
1212
export interface GranolaGetNoteParams {
1313
apiKey: string
1414
noteId: string
15-
includeTranscript?: boolean
15+
includeTranscript?: string
1616
}
1717

1818
export interface GranolaListNotesResponse extends ToolResponse {

0 commit comments

Comments
 (0)