SuperAPI AI 工具集

granola-sdk-patterns

办公与效率

查看项目

更新于 10-16 09:10

技能介绍

概述

Granola 没有传统意义上的 SDK。集成通过三条渠道实现:Zapier(8000+ 应用连接)、Enterprise API(REST,工作区级只读访问)以及原生集成(Slack、Notion、HubSpot、Attio、Affinity)。本技能覆盖这三类渠道的自动化模式。

前提条件

  • Granola Business 计划($14/用户/月)用于 Zapier + 原生 CRM
  • Enterprise 计划($35+/用户/月)用于 API 访问
  • 用于自动化工作流的 Zapier 账户

使用方式

第 1 步 — 了解 Zapier 触发器

Granola 提供两个 Zapier 触发器:

触发器 触发时机 使用场景
Note Added to Granola Folder 笔记被放入特定文件夹 按会议类型自动路由
Note Shared to Zapier 你手动将笔记分享到 Zapier 重要会议的选择性分享

Webhook 载荷可用数据:

  • title — 来自日历的会议标题
  • creator_name / creator_email — 笔记创建者
  • attendees[] — {name, email} 对象数组
  • calendar_event_title — 原始日历事件名称
  • calendar_event_datetime — 会议日期/时间
  • note_content — 增强后的笔记内容(Markdown)

第 2 步 — 构建常见 Zap 模式

模式 1:会议笔记到 Notion(自动归档)

Trigger: Note Added to Granola Folder ("All Meetings")
Action: Notion — Create Database Item
  Database: Meeting Archive
  Title: "{{title}}"
  Date: "{{calendar_event_datetime}}"
  Content: "{{note_content}}"
  Attendees: "{{attendees}}"

模式 2:行动项到 Asana/Linear

Trigger: Note Shared to Zapier
Filter: note_content contains "Action Items"
Code Step (JavaScript):
  const lines = inputData.note_content.split('\n');
  const actions = lines
    .filter(l => l.match(/^- \[ \]/))
    .map(l => l.replace('- [ ] ', ''));
  output = actions.map(a => ({task: a}));
Action: Linear — Create Issue (for each action)
  Title: "{{task}}"
  Team: Engineering
  Label: "meeting-action"

模式 3:销售电话摘要到 Slack + HubSpot

Trigger: Note Added to Granola Folder ("Sales Calls")
Path A — Slack:
  Action: Post Message to #sales-updates
  Message: |
    *New Sales Call:* {{title}}
    *Attendees:* {{attendees}}

    {{note_content}}

    [View full notes in Granola]

Path B — HubSpot (via Zapier if not using native):
  Action: Find Contact by Email ({{attendees[0].email}})
  Action: Create Engagement Note
    Body: "{{note_content}}"

模式 4:会议跟进邮件

Trigger: Note Shared to Zapier
Action: ChatGPT — Generate Follow-Up Email
  Prompt: "Write a professional follow-up email based on: {{note_content}}"
Action: Gmail — Create Draft
  To: "{{attendees}}"
  Subject: "Follow-up: {{title}}"
  Body: "{{chatgpt_response}}"
Action: Slack — Notify
  Message: "Follow-up draft ready for: {{title}}"

第 3 步 — 使用 Enterprise API

Enterprise 计划可用。API 密钥在 Settings > API Keys 生成(每个工作区最多 5 个)。

# List all accessible notes (paginated)
curl -s "https://api.granola.ai/v0/notes" \
  -H "Authorization: Bearer $GRANOLA_API_KEY" \
  -H "Content-Type: application/json" | jq '.notes[:3]'

# Get a specific note with transcript
curl -s "https://api.granola.ai/v0/notes/{note_id}" \
  -H "Authorization: Bearer $GRANOLA_API_KEY" | jq '{title, summary, action_items}'

API 特性:

  • Bearer token 认证
  • 对工作区内公开分享的笔记进行只读访问
  • 按工作区限流(超出时返回 429 响应)
  • 列表端点支持分页

逆向工程端点(非官方,仅供参考):

POST https://api.granola.ai/v2/get-documents    # List documents (paginated)
POST https://api.granola.ai/v1/get-document-transcript  # Get transcript
POST https://api.granola.ai/v1/get-workspaces    # List workspaces
POST https://api.granola.ai/v1/get-documents-batch  # Bulk fetch by IDs

认证使用 WorkOS,通过 POST https://api.workos.com/user_management/authenticate 进行刷新令牌轮换。

第 4 步 — 多步骤自动化链

名称:完整会议跟进流水线

Step 1 — Trigger:
  Granola: Note Added to Folder ("Client Meetings")

Step 2 — Filter:
  Only continue if attendees contain external email domains

Step 3 — Action:
  ChatGPT: Generate structured summary and follow-up email

Step 4 — Action:
  Gmail: Create draft follow-up email to external attendees

Step 5 — Action:
  Notion: Create page in Client Meeting Log database

Step 6 — Action:
  Linear: Create issues from action items with "client" label

Step 7 — Action:
  Slack: Post summary to #client-updates channel

Step 8 — Action:
  HubSpot: Log meeting note on matched Contact/Deal

第 5 步 — 基于文件夹的路由

组织 Granola 文件夹以驱动不同的 Zap 行为:

文件夹 Zapier 触发器 动作
Sales Calls 自动 Slack #sales + HubSpot + 跟进邮件
Engineering 自动 Linear 任务 + Notion wiki
All Hands 自动 Slack #general + Google Drive 归档
Interviews 手动分享 Greenhouse 评分卡 + 招聘小组 Slack
1-on-1s 无 私密,无自动化

输出

  • 配置用于自动笔记处理的 Zapier 工作流
  • 为自定义集成建立 API 访问
  • 按会议类型路由的多步骤自动化链
  • 实施基于文件夹的路由策略

错误处理

错误 原因 修复
Zapier 触发器未触发 文件夹触发器配置错误 验证 Zapier 中的确切文件夹名称与 Granola 匹配
缺少笔记内容 笔记仍在处理中 在 Zap 开头添加 2 分钟延迟步骤
API 429 Too Many Requests 超出速率限制 在请求之间添加延迟,实现退避
API 401 Unauthorized API 密钥无效或过期 在 Settings > API Keys 重新生成密钥
参会者数据为空 日历事件没有参会者列表 将参会者添加到日历事件

资源

  • Zapier Granola App
  • Automate Granola (4 Ways)
  • Granola Enterprise API
  • Enterprise API Docs

后续步骤

继续前往 granola-common-errors 进行故障排除。