productivity
Granola Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the Granola KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.granola.*.
Use lua_read_doc("integrations.granola") inside KosmoKrator to discover the same reference at runtime.
Call Lua from the Headless CLI
Use kosmo integrations:lua when a shell script, CI job, cron job, or another coding CLI should run a deterministic
Granola workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.granola.list_notes({created_before = "example_created_before", created_after = "example_created_after", updated_after = "example_updated_after", cursor = "example_cursor", page_size = 1}))' --json kosmo integrations:lua --eval 'print(docs.read("granola"))' --json
kosmo integrations:lua --eval 'print(docs.read("granola.list_notes"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local granola = app.integrations.granola
local result = granola.list_notes({created_before = "example_created_before", created_after = "example_created_after", updated_after = "example_updated_after", cursor = "example_cursor", page_size = 1})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.granola, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.granola.default.* or app.integrations.granola.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need Granola, use the narrower mcp:lua command.
# Use mcp:lua for MCP-only scripts; use integrations:lua for this integration namespace.
kosmo mcp:lua --eval 'dump(mcp.servers())' --json Agent-Facing Lua Docs
This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.
Granola - Lua API Reference
Namespace: app.integrations.granola
Granola’s Enterprise API is currently read-only. It exposes meeting notes, individual note details, and folders. There are no official API endpoints here for creating notes, sharing meetings, or reading a current-user profile.
list_notes
List accessible meeting notes with cursor pagination and date filters.
local result = app.integrations.granola.list_notes({
page_size = 10,
created_after = "2026-01-01"
})
for _, note in ipairs(result.notes or {}) do
print(note.id .. " - " .. note.title)
end
Supported parameters:
| Name | Type | Required | Description |
|---|---|---|---|
created_before | string | no | Return notes created before this date |
created_after | string | no | Return notes created after this date |
updated_after | string | no | Return notes updated after this date |
cursor | string | no | Cursor from a previous response |
page_size | integer | no | Number of notes to return, from 1 to 30 |
Responses include notes, hasMore, and cursor.
get_note
Get one meeting note by ID. The response can include transcript, summary, attendees, owner, and calendar event data when available.
local note = app.integrations.granola.get_note({
note_id = "not_1d3tmYTlCICgjy"
})
print(note.title)
print(note.summary or "")
list_folders
List accessible folders with cursor pagination. Folder responses include
hierarchy metadata through parent_folder_id.
local result = app.integrations.granola.list_folders({
page_size = 30
})
for _, folder in ipairs(result.folders or {}) do
print(folder.id .. " - " .. folder.name)
end
Supported parameters:
| Name | Type | Required | Description |
|---|---|---|---|
cursor | string | no | Cursor from a previous response |
page_size | integer | no | Number of folders to return, from 1 to 30 |
Multi-Account Usage
app.integrations.granola.list_notes({ page_size = 10 })
app.integrations.granola.default.list_notes({ page_size = 10 })
app.integrations.granola.team.list_notes({ page_size = 10 })
All account namespaces expose the same read-only tools; only credentials and API base URL differ.
Raw agent markdown
# Granola - Lua API Reference
Namespace: `app.integrations.granola`
Granola's Enterprise API is currently read-only. It exposes meeting notes,
individual note details, and folders. There are no official API endpoints here
for creating notes, sharing meetings, or reading a current-user profile.
## list_notes
List accessible meeting notes with cursor pagination and date filters.
```lua
local result = app.integrations.granola.list_notes({
page_size = 10,
created_after = "2026-01-01"
})
for _, note in ipairs(result.notes or {}) do
print(note.id .. " - " .. note.title)
end
```
Supported parameters:
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `created_before` | string | no | Return notes created before this date |
| `created_after` | string | no | Return notes created after this date |
| `updated_after` | string | no | Return notes updated after this date |
| `cursor` | string | no | Cursor from a previous response |
| `page_size` | integer | no | Number of notes to return, from 1 to 30 |
Responses include `notes`, `hasMore`, and `cursor`.
## get_note
Get one meeting note by ID. The response can include transcript, summary,
attendees, owner, and calendar event data when available.
```lua
local note = app.integrations.granola.get_note({
note_id = "not_1d3tmYTlCICgjy"
})
print(note.title)
print(note.summary or "")
```
## list_folders
List accessible folders with cursor pagination. Folder responses include
hierarchy metadata through `parent_folder_id`.
```lua
local result = app.integrations.granola.list_folders({
page_size = 30
})
for _, folder in ipairs(result.folders or {}) do
print(folder.id .. " - " .. folder.name)
end
```
Supported parameters:
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `cursor` | string | no | Cursor from a previous response |
| `page_size` | integer | no | Number of folders to return, from 1 to 30 |
## Multi-Account Usage
```lua
app.integrations.granola.list_notes({ page_size = 10 })
app.integrations.granola.default.list_notes({ page_size = 10 })
app.integrations.granola.team.list_notes({ page_size = 10 })
```
All account namespaces expose the same read-only tools; only credentials and API
base URL differ. local result = app.integrations.granola.list_notes({created_before = "example_created_before", created_after = "example_created_after", updated_after = "example_updated_after", cursor = "example_cursor", page_size = 1})
print(result) Functions
list_notes Read
List accessible Granola meeting notes with cursor pagination and date filters.
- Lua path
app.integrations.granola.list_notes- Full name
granola.granola_list_notes
| Parameter | Type | Required | Description |
|---|---|---|---|
created_before | string | no | Return notes created before this date, such as 2026-01-27. |
created_after | string | no | Return notes created after this date, such as 2026-01-27. |
updated_after | string | no | Return notes updated after this date, such as 2026-01-27. |
cursor | string | no | Cursor from a previous response. |
page_size | integer | no | Number of notes to return, from 1 to 30. |
get_note Read
Get one Granola meeting note by ID, including transcript, summary, attendees, and calendar event details when available.
- Lua path
app.integrations.granola.get_note- Full name
granola.granola_get_note
| Parameter | Type | Required | Description |
|---|---|---|---|
note_id | string | yes | The Granola note ID, such as not_1d3tmYTlCICgjy. |
list_folders Read
List accessible Granola folders with cursor pagination.
- Lua path
app.integrations.granola.list_folders- Full name
granola.granola_list_folders
| Parameter | Type | Required | Description |
|---|---|---|---|
cursor | string | no | Cursor from a previous response. |
page_size | integer | no | Number of folders to return, from 1 to 30. |