Granola
Granola
Connect Granola so your agents can find recent meetings, read their AI summaries, attendees and calendar details, and go through full transcripts. They can browse by date, folder or space, for example to prepare a weekly recap, pull action items into another tool, or answer questions about what was said in a call.
Access is read-only: agents cannot create, edit or delete notes. They see exactly the notes your Granola API key can read. A personal key covers your own and shared notes, and a workspace key covers team notes. Granola API keys require a Business or Enterprise plan.
Setup instructions
Setup instructions
Connect Granola
Requires a Business or Enterprise workspace. Enterprise admins control allowed scopes under Workspace → General → API access for members.
- In Granola, open Settings → Connectors → API keys → Create new key.
- Choose Personal notes (owned or shared with you) and/or Public notes (visible to the workspace), then Generate API Key.
- Copy the
grn_key into Houston's API key and save.
Advanced
Admins can create a workspace-owned key under Connectors → Workspace API keys. It reads public notes and spaces with Allow Granola API access enabled, never private notes, and keeps working after its creator leaves.
Only notes with a generated summary and transcript appear. Replace expired or revoked keys in Houston. Audit and legal hold keys are unsupported.
Files
Files
connector.luau
-- Granola public API v1, read-only. Arguments and results keep Granola's native field names. type Options = {[string]: any} type Endpoint = {path: string, id: string?, list: string?, maximum: number?, query: {[string]: string}, help: string} local API = "https://public-api.granola.ai/v1" local PAGE = {cursor = "text", page_size = "size"} local endpoints: {[string]: Endpoint} = { listNotes = {path = "/notes", list = "notes", maximum = 30, query = {created_after = "date", created_before = "date", updated_after = "date", folder_id = "fol", space_id = "spa", cursor = "text", page_size = "size"}, help = "List note summaries `{id, object, title, owner = {name, email}, created_at, updated_at, deleted_at}` the key can read. Optional created_after, created_before and updated_after take `YYYY-MM-DD` or RFC 3339 date-times. folder_id (`fol_…`, includes child folders) and space_id (`spa_…`) filter by location. Only notes with a generated summary and transcript are listed. Keys that read all workspace notes also see deleted notes: skip rows whose deleted_at is not null."}, getNote = {path = "/notes/{id}", id = "not", query = {include = "transcript"}, help = "Read one note (`not_…`): title, owner, attendees, calendar_event (event_title, invitees, organiser, scheduled times), folder_membership, space_membership, summary_text, summary_markdown, attachments (photo URLs anyone with the link can open), web_url, and private_notes_* (only for the note owner's key). Pass include = \"transcript\" to inline the transcript; if Granola answers HTTP 413 TRANSCRIPT_TOO_LARGE, page it with getTranscript."}, getTranscript = {path = "/notes/{id}/transcript", id = "not", list = "transcript", maximum = 100, query = PAGE, help = "Page a note's transcript: `{transcript = {{speaker = {source, attribution?, name?, diarization_label?}, text, start_time, end_time}}, hasMore, cursor}`. attribution is me (the note owner) or them (others) and may be absent; name or diarization_label identify the speaker when known. source is the audio stream only: iOS reports microphone for everyone."}, listFolders = {path = "/folders", list = "folders", maximum = 30, query = PAGE, help = "List folders alphabetically: `{id, object, name, parent_folder_id, space_id}`. Pass an id as listNotes folder_id."}, listSpaces = {path = "/spaces", list = "spaces", maximum = 30, query = PAGE, help = "List spaces `{id, object, name}`. Pass an id as listNotes space_id."}, } local function text(value: any, field: string): string assert(type(value) == "string" and value ~= "", field .. " must be a nonempty string") return value end local function identifier(value: any, field: string, prefix: string): string local id = text(value, field) assert(#id == 18 and string.match(string.lower(id), "^" .. prefix .. "_%w+$"), field .. " must be a Granola " .. prefix .. "_ ID") return id end local function queryValue(value: any, field: string, kind: string, maximum: number?): string if kind == "size" then assert(type(value) == "number" and value % 1 == 0 and value >= 1 and value <= (maximum :: number), field .. " must be an integer from 1 to " .. tostring(maximum)) return tostring(value) elseif kind == "date" then local date = text(value, field) local zone = string.match(date, "^%d%d%d%d%-%d%d%-%d%dT%d%d:%d%d:%d%d%.?%d*(.*)$") assert(string.match(date, "^%d%d%d%d%-%d%d%-%d%d$") or zone == "Z" or (zone and string.match(zone, "^[+-]%d%d:%d%d$")), field .. " must be YYYY-MM-DD or an RFC 3339 date-time") return url.encode(date) elseif kind == "transcript" then assert(value == "transcript", field .. " must be \"transcript\"") elseif kind ~= "text" then identifier(value, field, kind) end return url.encode(text(value, field)) end local function failure(name: string, endpoint: Endpoint, response: HttpResponse): never local status = response.statusCode local prefix = await(response.body:readPrefix(4096)) local ok, body = pcall(json.decode, prefix) if not ok or type(body) ~= "table" then body = {code = string.match(prefix, '^%s*{%s*"code"%s*:%s*"([%w_]+)"')} end local message = "Granola HTTP " .. tostring(status) local code = body.code or body.error if type(code) == "string" then message ..= " " .. string.sub(code, 1, 64) end if type(body.message) == "string" then message ..= ": " .. string.sub(body.message, 1, 300) end if status == 401 then message ..= " (check the API key; personal keys can expire or be revoked)" elseif status == 404 and endpoint.id then message ..= " (the note may not exist, lack a summary and transcript, or be outside the key's access scopes)" elseif status == 413 then message ..= " (use getTranscript to page the transcript)" end local retry = response.headers["retry-after"] if status == 429 and retry and retry[1] then message ..= "; retry after " .. string.sub(retry[1], 1, 32) .. "s" end return houston.fail({operation = name, layer = "upstream", upstream_status = status, retryable = status == 429 or status >= 500, message = message}) end local function request(name: string, endpoint: Endpoint, id: any, input: any): any assert(input == nil or type(input) == "table", name .. " options must be a table") local path = endpoint.path if endpoint.id then path = string.gsub(path, "{id}", identifier(id, "id", endpoint.id :: string)) end local query: {string} = {} for field, value in (input or {}) :: Options do local kind = endpoint.query[field] assert(type(field) == "string" and kind, name .. " received an unknown option " .. tostring(field)) table.insert(query, field .. "=" .. queryValue(value, field, kind, endpoint.maximum)) end table.sort(query) local target = API .. path .. (if #query > 0 then "?" .. table.concat(query, "&") else "") local response = await(http.request({method = "GET", url = target, headers = {Accept = {"application/json"}}})) if response.statusCode < 200 or response.statusCode >= 300 then failure(name, endpoint, response) end local raw = await(response.body:readAll()) local ok, value = pcall(json.decode, raw) if not ok or type(value) ~= "table" or not string.match(raw, "^%s*{") or (endpoint.list and type(value[endpoint.list]) ~= "table") then houston.fail({operation = name, layer = "upstream", upstream_status = response.statusCode, retryable = false, message = "Granola returned an unexpected response"}) end return value end local functions: {[string]: any} = {} for name, endpoint in endpoints do if endpoint.id then functions[name] = function(id: any, opts: Options?) if type(id) == "table" then assert(opts == nil, name .. " takes (id, opts?) or one table with id") local args = table.clone(id) args.id = nil return request(name, endpoint, id.id, args) end return request(name, endpoint, id, opts) end else functions[name] = function(opts: Options?) return request(name, endpoint, nil, opts) end end end function functions.help(): string local sections = {"Granola: read-only access to the meeting notes, transcripts, folders and spaces this API key can read. Credentials stay on Houston. Each call makes one request and returns Granola's JSON unchanged. Calls return completed values; do not wrap them in await(). IDs are a prefix plus 14 letters or digits (not_, fol_, spa_). Unknown options are rejected.", "Paged calls take cursor and page_size (Granola defaults to 10, or 50 for getTranscript) and return hasMore and cursor: while hasMore is true, pass the returned cursor to fetch the next page, and stop as soon as you have enough. Granola allows bursts of 25 requests and 5 per second; HTTP 429 errors are retryable. Notes cannot be created or edited through this API."} local names: {string} = {} for name in endpoints do table.insert(names, name) end table.sort(names) for _, name in names do local endpoint = endpoints[name] local signature = if endpoint.id then "(id, opts?)" else "(opts?)" local section = "## " .. name .. signature .. "\n\nGET /v1" .. endpoint.path .. ". " .. endpoint.help if endpoint.maximum then section ..= " page_size: 1–" .. tostring(endpoint.maximum) .. "." end table.insert(sections, section) end table.insert(sections, [[## Example Here granola is the configured Granola connection. ```lua local page = granola.listNotes({created_after = "2026-10-01T00:00:00Z", page_size = 30}) local summaries = {} for _, row in page.notes do local note = granola.getNote(row.id) table.insert(summaries, {title = note.title, summary = note.summary_markdown}) end -- While page.hasMore, repeat listNotes with the same filters and cursor = page.cursor. if page.notes[1] then local lines = granola.getTranscript(page.notes[1].id, {page_size = 100}) -- lines.transcript[i].speaker.attribution and .text; continue with cursor = lines.cursor while lines.hasMore. end ``` Reference: https://docs.granola.ai/introduction]]) return table.concat(sections, "\n\n") end return functionshouston.json
{ "schema_version": 2, "name": "Granola", "files": [ "connector.luau" ], "icon": "icon.svg", "auth": { "token": { "type": "manual", "label": "API key", "config": { "token": { "type": "secret", "label": "API key", "description": "A Granola personal or workspace API key, starting with grn_.", "required": true } } } }, "proxy": [ { "match": { "protocol": "http", "host": [ "public-api.granola.ai" ], "method": [ "GET" ], "path": [ "/v1/folders", "/v1/notes", "/v1/notes/{note_id}", "/v1/notes/{note_id}/transcript", "/v1/spaces" ] }, "action": { "headers": { "set": { "Authorization": "Bearer {{auth.token.token}}" } } } } ] }icon.svg
README.md
--- description: Search and read your Granola meeting notes, AI summaries and transcripts. --- # Granola Connect Granola so your agents can find recent meetings, read their AI summaries, attendees and calendar details, and go through full transcripts. They can browse by date, folder or space, for example to prepare a weekly recap, pull action items into another tool, or answer questions about what was said in a call. Access is read-only: agents cannot create, edit or delete notes. They see exactly the notes your Granola API key can read. A personal key covers your own and shared notes, and a workspace key covers team notes. Granola API keys require a Business or Enterprise plan. [Connect your Granola account](SETUP.md).SETUP.md
# Connect Granola > Requires a Business or Enterprise workspace. Enterprise admins control allowed > scopes under **Workspace → General → API access for members**. 1. In Granola, open **Settings → Connectors → API keys → Create new key**. 2. Choose **Personal notes** (owned or shared with you) and/or **Public notes** (visible to the workspace), then **Generate API Key**. 3. Copy the `grn_` key into Houston's **API key** and save. [Official API key guide](https://docs.granola.ai/help-center/sharing/integrations/granola-api). ## Advanced Admins can create a workspace-owned key under **Connectors → Workspace API keys**. It reads public notes and spaces with **Allow Granola API access** enabled, never private notes, and keeps working after its creator leaves. Only notes with a generated summary and transcript appear. Replace expired or revoked keys in Houston. Audit and legal hold keys are unsupported.tests
authentication.luau
return { contract = function(m) m.authentication({ { auth = { token = "synthetic-method-secret" }, config = {}, endpoint = { "GET", "https://public-api.granola.ai/v1/notes" }, expected = "Bearer synthetic-method-secret", header = "Authorization", method = "token", publisher = {}, }, }) end, }errors.luau
return { scenario = {publisher = {}, config = {}, auth_method = "token", auth_config = {token = "grn_fixture-private-key"}}, configure = function() calls = 0 status = 200 payload = "{}" responseHeaders = {} http = {request = function(req) calls += 1 return fixture.operation({statusCode = status, headers = responseHeaders, body = fixture.reader(payload)}) end} end, run = function(granola) local NOTE = "not_1d3tmYTlCICgjy" local function upstream(code, body, headers, call, expected, absent) status, payload, responseHeaders = code, body, headers local before = calls local ok, err = pcall(call) for _, text in expected do assert(not ok and string.find(tostring(err), text, 1, true), "missing " .. text .. " in " .. tostring(err)) end if absent then assert(not string.find(tostring(err), absent, 1, true), "unbounded error: " .. #tostring(err)) end assert(calls == before + 1, "a failed request was repeated") end local function list() granola.listNotes() end local function note() granola.getNote(NOTE, {include = "transcript"}) end upstream(401, '{"code":"INVALID_API_KEY","message":"Invalid API key format","requestId":"r1","timestamp":"2026-10-25T00:00:00Z"}', {}, list, {"HTTP 401", "INVALID_API_KEY", "Invalid API key format", "check the API key", '"retryable":false'}) upstream(413, '{"code":"TRANSCRIPT_TOO_LARGE","message":"Transcript is too large to include"}', {}, note, {"HTTP 413", "TRANSCRIPT_TOO_LARGE", "getTranscript", '"retryable":false'}) upstream(404, '{"error":"not_found","message":"The requested endpoint does not exist"}', {}, note, {"HTTP 404", "not_found", "access scopes"}) upstream(404, '{"error":"not_found","message":"The requested endpoint does not exist"}', {}, list, {"HTTP 404", "not_found"}, "note may not exist") upstream(400, '{"code":"VALIDATION_ERROR","message":"' .. string.rep("x", 1000) .. '"}', {}, list, {"HTTP 400", "VALIDATION_ERROR: " .. string.rep("x", 300)}, string.rep("x", 301)) upstream(400, '{"code":"VALIDATION_ERROR","message":"' .. string.rep("x", 5000) .. '"}', {}, list, {"HTTP 400 VALIDATION_ERROR"}, "xxx") upstream(429, '{"code":"RATE_LIMITED","message":"Too many requests"}', {["retry-after"] = {"7"}}, list, {"HTTP 429", "retry after 7s", '"retryable":true'}) upstream(503, "<html>Unavailable</html>", {}, list, {"HTTP 503", '"retryable":true'}) upstream(200, "<html>Maintenance</html>", {}, list, {"unexpected response", '"retryable":false'}) upstream(200, "[]", {}, note, {"unexpected response"}) upstream(200, '{"notes":null,"hasMore":false}', {}, list, {"unexpected response"}) upstream(200, '{"folders":[]}', {}, list, {"unexpected response"}) end, }manifest.luau
return { contract = function(m) -- TestGranolaReadOnlyRoutes do do local _, err = m.resolve(nil, nil, nil, "token") if err == nil then m.fail("accepted missing API key") end end local r, err = m.resolve(nil, nil, { token = "grn_fixture" }, "token") assert(not err, tostring(err)) local api = "https://public-api.granola.ai/v1" m.routes(r, "Bearer grn_fixture", true, { "GET " .. api .. "/notes?created_after=2026-10-01&page_size=30", "GET " .. api .. "/notes/not_1d3tmYTlCICgjy?include=transcript", "GET " .. api .. "/notes/not_1d3tmYTlCICgjy/transcript?cursor=c1", "GET " .. api .. "/folders", "GET " .. api .. "/spaces", }) m.routes(r, "Bearer grn_fixture", false, { "POST " .. api .. "/notes", "DELETE " .. api .. "/notes/not_1d3tmYTlCICgjy", "HEAD " .. api .. "/notes", "GET " .. api .. "/webhook-endpoints", "POST " .. api .. "/webhook-endpoints", "GET " .. api .. "/audit", "GET " .. api .. "/legal-holds", "GET " .. api .. "/notes/%2e%2e/transcript", "GET " .. api .. "/folders/fol_4y6LduVdwSKC27", "GET https://api.granola.ai/v1/notes", "GET https://public-api.granola.ai.example.com/v1/notes", "GET https://mcp.granola.ai/mcp", "GET http://public-api.granola.ai:8080/v1/notes", }) end end, }reads.luau
return { scenario = {publisher = {}, config = {}, auth_method = "token", auth_config = {token = "grn_fixture-private-key"}}, configure = function() requests = {} payload = "{}" http = {request = function(req) table.insert(requests, req) assert(req.method == "GET" and req.body == nil, "Granola reads must be bodiless GETs") assert(req.headers.Authorization == nil, "credentials must remain in the proxy") assert(req.headers.Accept[1] == "application/json") return fixture.operation({statusCode = 200, headers = {}, body = fixture.reader(payload)}) end} end, run = function(granola) local API = "https://public-api.granola.ai/v1" local NULL = json.decode("null") local NOTE, FOLDER, SPACE = "not_1d3tmYTlCICgjy", "fol_4y6LduVdwSKC27", "spa_8kTq2mWxLp4Rz7" local function last() return requests[#requests].url end local function rejected(fn, expected) local before = #requests local ok, err = pcall(fn) assert(not ok and string.find(tostring(err), expected, 1, true), "wrong validation error: " .. tostring(err)) assert(#requests == before, "invalid input reached Granola") end local names = {} for name, fn in granola do assert(type(fn) == "function") table.insert(names, name) end table.sort(names) assert(table.concat(names, ",") == "getNote,getTranscript,listFolders,listNotes,listSpaces", table.concat(names, ",")) assert(#requests == 0, "initialization reached Granola") payload = '{"notes":[{"id":"' .. NOTE .. '","object":"note","title":null,"owner":{"name":"Ana","email":"[email protected]"},"deleted_at":null}],"hasMore":true,"cursor":"eyJ+/="}' local opts = {created_after = "2026-10-01T00:00:00-07:00", created_before = "2026-10-24T09:30:00.250Z", updated_after = "2026-10-02", folder_id = FOLDER, space_id = SPACE, page_size = 30, cursor = "start+/="} local page = granola.listNotes(opts) assert(last() == API .. "/notes?created_after=2026-10-01T00%3A00%3A00-07%3A00&created_before=2026-10-24T09%3A30%3A00.250Z&cursor=start%2B%2F%3D" .. "&folder_id=" .. FOLDER .. "&page_size=30&space_id=" .. SPACE .. "&updated_after=2026-10-02", last()) assert(opts.page_size == 30 and opts.cursor == "start+/=", "caller options were modified") assert(page.hasMore == true and page.cursor == "eyJ+/=" and page.notes[1].title == NULL and page.notes[1].owner.name == "Ana") granola.listNotes({cursor = page.cursor}) assert(last() == API .. "/notes?cursor=eyJ%2B%2F%3D", last()) payload = '{"notes":[],"hasMore":false,"cursor":null}' local empty = granola.listNotes() assert(last() == API .. "/notes" and json.encode(empty.notes) == "[]" and empty.cursor == NULL) payload = '{"id":"' .. NOTE .. '","title":"Weekly sync","attendees":[],"summary_markdown":"## Decisions","transcript":null,"calendar_event":{"organiser":"[email protected]","invitees":[{"email":"[email protected]"}]}}' local note = granola.getNote(NOTE) assert(last() == API .. "/notes/" .. NOTE) assert(note.summary_markdown == "## Decisions" and note.transcript == NULL and json.encode(note.attendees) == "[]") assert(note.calendar_event.invitees[1].email == "[email protected]") granola.getNote(NOTE, {include = "transcript"}) assert(last() == API .. "/notes/" .. NOTE .. "?include=transcript") local named = {id = "NOT_1d3tmYTlCICgjy", include = "transcript"} granola.getNote(named) assert(named.id == "NOT_1d3tmYTlCICgjy" and named.include == "transcript", "caller table was modified") assert(last() == API .. "/notes/NOT_1d3tmYTlCICgjy?include=transcript", "IDs are case-insensitive") payload = '{"transcript":[{"speaker":{"source":"microphone","attribution":"me"},"text":"Hello","start_time":"2026-10-24T10:00:00Z","end_time":"2026-10-24T10:00:02Z"}],"hasMore":true,"cursor":"t2"}' local lines = granola.getTranscript(NOTE, {page_size = 100}) assert(last() == API .. "/notes/" .. NOTE .. "/transcript?page_size=100") assert(lines.transcript[1].speaker.source == "microphone" and lines.cursor == "t2") payload = '{"transcript":[],"hasMore":false,"cursor":null}' assert(json.encode(granola.getTranscript({id = NOTE, cursor = "t2"}).transcript) == "[]") assert(last() == API .. "/notes/" .. NOTE .. "/transcript?cursor=t2") payload = '{"folders":[{"id":"' .. FOLDER .. '","object":"folder","name":"Customers","parent_folder_id":null,"space_id":"' .. SPACE .. '"}],"hasMore":false,"cursor":null}' local folders = granola.listFolders({page_size = 1}) assert(last() == API .. "/folders?page_size=1" and folders.folders[1].parent_folder_id == NULL) payload = '{"folders":[],"hasMore":false,"cursor":null}' assert(json.encode(granola.listFolders().folders) == "[]" and last() == API .. "/folders") payload = '{"spaces":[{"id":"' .. SPACE .. '","object":"space","name":"Team"}],"hasMore":false,"cursor":null}' assert(granola.listSpaces().spaces[1].name == "Team" and last() == API .. "/spaces") payload = '{"spaces":[],"hasMore":false,"cursor":null}' assert(json.encode(granola.listSpaces({cursor = "s2"}).spaces) == "[]" and last() == API .. "/spaces?cursor=s2") rejected(function() granola.getNote("not_1d3tmYTlCICgj/") end, "not_ ID") rejected(function() granola.getNote("../not_1d3tmYTlCI") end, "not_ ID") rejected(function() granola.getNote(FOLDER) end, "not_ ID") rejected(function() granola.getNote("not_1d3tmYTlCICgjyX") end, "not_ ID") rejected(function() granola.getNote("") end, "nonempty") rejected(function() granola.getNote({include = "transcript"}) end, "nonempty") rejected(function() granola.getNote({id = NOTE}, {}) end, "one table") rejected(function() granola.getNote(NOTE, {include = "summary"}) end, "\"transcript\"") rejected(function() granola.getNote(NOTE, {includeTranscript = true}) end, "unknown option includeTranscript") rejected(function() granola.getTranscript(NOTE, {page_size = 101}) end, "1 to 100") rejected(function() granola.listNotes({page_size = 31}) end, "1 to 30") rejected(function() granola.listNotes({page_size = 0}) end, "1 to 30") rejected(function() granola.listNotes({page_size = 2.5}) end, "1 to 30") rejected(function() granola.listNotes({created_after = "yesterday"}) end, "RFC 3339") rejected(function() granola.listNotes({created_after = "2026-10-01 junk"}) end, "RFC 3339") rejected(function() granola.listNotes({updated_after = "2026-10-01T09:00"}) end, "RFC 3339") rejected(function() granola.listNotes({created_before = "2026-10-01T09:00:00+0200"}) end, "RFC 3339") rejected(function() granola.listNotes({created_after = 20261001}) end, "nonempty string") rejected(function() granola.listNotes({folder_id = SPACE}) end, "fol_ ID") rejected(function() granola.listNotes({space_id = "spa_x&page_size=99"}) end, "spa_ ID") rejected(function() granola.listNotes({cursor = ""}) end, "nonempty") rejected(function() granola.listNotes({limit = 10}) end, "unknown option limit") rejected(function() granola.listFolders({folder_id = FOLDER}) end, "unknown option folder_id") rejected(function() granola.listSpaces("next") end, "must be a table") end, }