streak

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Streak CRM

Streak CRM

Streak is a CRM built entirely inside Gmail. Use this skill to manage pipelines, boxes (deals), contacts, organizations, tasks, and email threads via the Streak API.
Official docs:
https://streak.readme.io/reference

Streak是完全内嵌在Gmail中的CRM。你可以通过Streak API使用该技能来管理销售管道、box(交易)、联系人、组织、任务和邮件线程。
官方文档:
https://streak.readme.io/reference

When to Use

适用场景

Use this skill when you need to:
  • Manage sales pipelines and deal stages
  • Track leads, contacts, and organizations
  • Associate email threads with deals
  • Create tasks and comments on deals
  • Search across boxes, contacts, and organizations

当你需要完成以下操作时使用该技能:
  • 管理销售管道和交易阶段
  • 追踪线索、联系人和组织
  • 将邮件线程与交易关联
  • 为交易创建任务和评论
  • 跨box、联系人、组织进行搜索

Prerequisites

前置要求

  1. Install the Streak extension in Gmail
  2. Navigate to Gmail > Streak icon > Integrations > Streak API > Create New Key
  3. Copy your API key
Set environment variable:
bash
export STREAK_TOKEN="your-api-key"

Important: When using
$VAR
in a command that pipes to another command, wrap the command containing
$VAR
in
bash -c '...'
. Due to a Claude Code bug, environment variables are silently cleared when pipes are used directly.
bash
bash -c 'curl -s "https://api.example.com" -H "Authorization: Bearer $API_KEY"'
  1. 在Gmail中安装Streak扩展
  2. 进入Gmail > Streak图标 > 集成 > Streak API > 创建新密钥
  3. 复制你的API密钥
设置环境变量:
bash
export STREAK_TOKEN="your-api-key"

重要提示:在需要管道传输到其他命令的命令中使用
$VAR
时,请将包含
$VAR
的命令包裹在
bash -c '...'
中。由于Claude Code的bug,直接使用管道时环境变量会被静默清除。
bash
bash -c 'curl -s "https://api.example.com" -H "Authorization: Bearer $API_KEY"'

How to Use

使用指南

Authentication

鉴权

Streak uses HTTP Basic Auth with your API key as the username and no password. In curl, use
-u ${STREAK_TOKEN}:
(note the trailing colon).

Streak使用HTTP基本认证,将你的API密钥作为用户名,无需密码。在curl中使用
-u ${STREAK_TOKEN}:
(注意末尾的冒号)。

1. Get Current User

1. 获取当前用户

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/users/me" -u "${STREAK_TOKEN}:"'

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/users/me" -u "${STREAK_TOKEN}:"'

2. List All Pipelines

2. 列出所有管道

Pipelines represent business processes (Sales, Hiring, Projects, etc.).
bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/pipelines" -u "${STREAK_TOKEN}:"'

管道代表业务流程(销售、招聘、项目等)。
bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/pipelines" -u "${STREAK_TOKEN}:"'

3. Get a Pipeline

3. 获取单个管道

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/pipelines/{pipelineKey}" -u "${STREAK_TOKEN}:"'

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/pipelines/{pipelineKey}" -u "${STREAK_TOKEN}:"'

4. Create a Pipeline

4. 创建管道

Write to
/tmp/streak_request.json
:
json
{
  "name": "New Sales Pipeline"
}
Then run:
bash
bash -c 'curl -s -X PUT "https://api.streak.com/api/v1/pipelines" -u "${STREAK_TOKEN}:" --header "Content-Type: application/json" -d @/tmp/streak_request.json'

写入内容到
/tmp/streak_request.json
json
{
  "name": "New Sales Pipeline"
}
然后运行:
bash
bash -c 'curl -s -X PUT "https://api.streak.com/api/v1/pipelines" -u "${STREAK_TOKEN}:" --header "Content-Type: application/json" -d @/tmp/streak_request.json'

5. List Boxes in Pipeline

5. 列出管道下的所有Box

Boxes are the core data objects (deals, leads, projects) within a pipeline.
bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/pipelines/{pipelineKey}/boxes" -u "${STREAK_TOKEN}:"'

Box是管道中的核心数据对象(对应交易、线索、项目等)。
bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/pipelines/{pipelineKey}/boxes" -u "${STREAK_TOKEN}:"'

6. Get a Box

6. 获取单个Box

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/boxes/{boxKey}" -u "${STREAK_TOKEN}:"'

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/boxes/{boxKey}" -u "${STREAK_TOKEN}:"'

7. Create a Box

7. 创建Box

Write to
/tmp/streak_request.json
:
json
{
  "name": "Acme Corp Deal"
}
Then run:
bash
bash -c 'curl -s -X POST "https://api.streak.com/api/v1/pipelines/{pipelineKey}/boxes" -u "${STREAK_TOKEN}:" --header "Content-Type: application/json" -d @/tmp/streak_request.json'

写入内容到
/tmp/streak_request.json
json
{
  "name": "Acme Corp Deal"
}
然后运行:
bash
bash -c 'curl -s -X POST "https://api.streak.com/api/v1/pipelines/{pipelineKey}/boxes" -u "${STREAK_TOKEN}:" --header "Content-Type: application/json" -d @/tmp/streak_request.json'

8. Update a Box

8. 更新Box

Write to
/tmp/streak_request.json
:
json
{
  "name": "Updated Deal Name",
  "stageKey": "stageKey123"
}
Then run:
bash
bash -c 'curl -s -X POST "https://api.streak.com/api/v1/boxes/{boxKey}" -u "${STREAK_TOKEN}:" --header "Content-Type: application/json" -d @/tmp/streak_request.json'

写入内容到
/tmp/streak_request.json
json
{
  "name": "Updated Deal Name",
  "stageKey": "stageKey123"
}
然后运行:
bash
bash -c 'curl -s -X POST "https://api.streak.com/api/v1/boxes/{boxKey}" -u "${STREAK_TOKEN}:" --header "Content-Type: application/json" -d @/tmp/streak_request.json'

9. List Stages in Pipeline

9. 列出管道下的所有阶段

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/pipelines/{pipelineKey}/stages" -u "${STREAK_TOKEN}:"'

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/pipelines/{pipelineKey}/stages" -u "${STREAK_TOKEN}:"'

10. List Fields in Pipeline

10. 列出管道下的所有字段

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/pipelines/{pipelineKey}/fields" -u "${STREAK_TOKEN}:"'

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/pipelines/{pipelineKey}/fields" -u "${STREAK_TOKEN}:"'

11. Get a Contact

11. 获取单个联系人

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/contacts/{contactKey}" -u "${STREAK_TOKEN}:"'

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/contacts/{contactKey}" -u "${STREAK_TOKEN}:"'

12. Create a Contact

12. 创建联系人

Write to
/tmp/streak_request.json
:
json
{
  "teamKey": "teamKey123",
  "emailAddresses": ["john@example.com"],
  "givenName": "John",
  "familyName": "Doe"
}
Then run:
bash
bash -c 'curl -s -X POST "https://api.streak.com/api/v1/contacts" -u "${STREAK_TOKEN}:" --header "Content-Type: application/json" -d @/tmp/streak_request.json'

写入内容到
/tmp/streak_request.json
json
{
  "teamKey": "teamKey123",
  "emailAddresses": ["john@example.com"],
  "givenName": "John",
  "familyName": "Doe"
}
然后运行:
bash
bash -c 'curl -s -X POST "https://api.streak.com/api/v1/contacts" -u "${STREAK_TOKEN}:" --header "Content-Type: application/json" -d @/tmp/streak_request.json'

13. Get an Organization

13. 获取单个组织

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/organizations/{organizationKey}" -u "${STREAK_TOKEN}:"'

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/organizations/{organizationKey}" -u "${STREAK_TOKEN}:"'

14. Search Boxes, Contacts, and Organizations

14. 搜索Box、联系人和组织

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/search?query=acme" -u "${STREAK_TOKEN}:"'

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/search?query=acme" -u "${STREAK_TOKEN}:"'

15. Get Tasks in a Box

15. 获取Box下的所有任务

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/boxes/{boxKey}/tasks" -u "${STREAK_TOKEN}:"'

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/boxes/{boxKey}/tasks" -u "${STREAK_TOKEN}:"'

16. Create a Task

16. 创建任务

Write to
/tmp/streak_request.json
:
json
{
  "text": "Follow up with client",
  "dueDate": 1735689600000
}
Then run:
bash
bash -c 'curl -s -X POST "https://api.streak.com/api/v1/boxes/{boxKey}/tasks" -u "${STREAK_TOKEN}:" --header "Content-Type: application/json" -d @/tmp/streak_request.json'

写入内容到
/tmp/streak_request.json
json
{
  "text": "Follow up with client",
  "dueDate": 1735689600000
}
然后运行:
bash
bash -c 'curl -s -X POST "https://api.streak.com/api/v1/boxes/{boxKey}/tasks" -u "${STREAK_TOKEN}:" --header "Content-Type: application/json" -d @/tmp/streak_request.json'

17. Get Comments in a Box

17. 获取Box下的所有评论

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/boxes/{boxKey}/comments" -u "${STREAK_TOKEN}:"'

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/boxes/{boxKey}/comments" -u "${STREAK_TOKEN}:"'

18. Create a Comment

18. 创建评论

Write to
/tmp/streak_request.json
:
json
{
  "message": "Spoke with client today, they are interested."
}
Then run:
bash
bash -c 'curl -s -X POST "https://api.streak.com/api/v1/boxes/{boxKey}/comments" -u "${STREAK_TOKEN}:" --header "Content-Type: application/json" -d @/tmp/streak_request.json'

写入内容到
/tmp/streak_request.json
json
{
  "message": "Spoke with client today, they are interested."
}
然后运行:
bash
bash -c 'curl -s -X POST "https://api.streak.com/api/v1/boxes/{boxKey}/comments" -u "${STREAK_TOKEN}:" --header "Content-Type: application/json" -d @/tmp/streak_request.json'

19. Get Threads in a Box

19. 获取Box下的所有线程

Email threads associated with a box.
bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/boxes/{boxKey}/threads" -u "${STREAK_TOKEN}:"'

与Box关联的邮件线程。
bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/boxes/{boxKey}/threads" -u "${STREAK_TOKEN}:"'

20. Get Files in a Box

20. 获取Box下的所有文件

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/boxes/{boxKey}/files" -u "${STREAK_TOKEN}:"'

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/boxes/{boxKey}/files" -u "${STREAK_TOKEN}:"'

21. Get Meetings in a Box

21. 获取Box下的所有会议

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/boxes/{boxKey}/meetings" -u "${STREAK_TOKEN}:"'

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/boxes/{boxKey}/meetings" -u "${STREAK_TOKEN}:"'

22. Create a Meeting Note

22. 创建会议记录

Write to
/tmp/streak_request.json
:
json
{
  "meetingDate": 1735689600000,
  "meetingNotes": "Discussed pricing and timeline.",
  "title": "Sales Call"
}
Then run:
bash
bash -c 'curl -s -X POST "https://api.streak.com/api/v1/boxes/{boxKey}/meetings" -u "${STREAK_TOKEN}:" --header "Content-Type: application/json" -d @/tmp/streak_request.json'

写入内容到
/tmp/streak_request.json
json
{
  "meetingDate": 1735689600000,
  "meetingNotes": "Discussed pricing and timeline.",
  "title": "Sales Call"
}
然后运行:
bash
bash -c 'curl -s -X POST "https://api.streak.com/api/v1/boxes/{boxKey}/meetings" -u "${STREAK_TOKEN}:" --header "Content-Type: application/json" -d @/tmp/streak_request.json'

23. Get Box Timeline

23. 获取Box时间线

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/boxes/{boxKey}/timeline" -u "${STREAK_TOKEN}:"'

bash
bash -c 'curl -s -X GET "https://api.streak.com/api/v1/boxes/{boxKey}/timeline" -u "${STREAK_TOKEN}:"'

Guidelines

使用规范

  1. Keys: Pipeline keys, box keys, and other identifiers are alphanumeric strings returned by the API
  2. Timestamps: Use Unix timestamps in milliseconds for date fields (e.g.,
    dueDate
    ,
    meetingDate
    )
  3. Rate Limits: Be mindful of API rate limits; add delays between bulk operations
  4. Stages: To move a box to a different stage, update the box with the new
    stageKey
  5. Email Integration: Streak is tightly integrated with Gmail; threads are Gmail thread IDs
  6. Team Key: When creating contacts, you need a
    teamKey
    which can be obtained from the teams endpoint
  1. 密钥:管道密钥、box密钥及其他标识符是API返回的字母数字字符串
  2. 时间戳:日期字段使用毫秒级Unix时间戳(例如
    dueDate
    meetingDate
  3. 限流:请注意API限流,批量操作之间需添加延迟
  4. 阶段:要将box移动到其他阶段,使用新的
    stageKey
    更新box即可
  5. 邮件集成:Streak与Gmail深度集成,线程就是Gmail线程ID
  6. 团队密钥:创建联系人时你需要
    teamKey
    ,可从团队端点获取