来源信息
- 仓库
- ThinkfleetAI/thinkfleet-engine
- 最近来源活动
- 2026年2月1日 16:21
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 0
- Forks
- 0
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- google-gmail
- description
- Read and send email via the Gmail API using curl + OAuth tokens.
- metadata
- {"thinkfleetbot":{"emoji":"✉️","requires":{"bins":"[Truncated]","env":"[Truncated]"}}}
# Google Gmail
Read and send email via Gmail API.
## Environment Variables
- `GOOGLE_ACCESS_TOKEN` - OAuth2 access token with `gmail` scope
## List recent messages
```bash
curl -s -H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \
"https://gmail.googleapis.com/gmail/v1/users/me/messages?maxResults=5" \
| jq '.messages[].id'
```
## Read a message
```bash
curl -s -H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \
"https://gmail.googleapis.com/gmail/v1/users/me/messages/MSG_ID?format=full" \
| jq '{subject: (.payload.headers[] | select(.name=="Subject") | .value), from: (.payload.headers[] | select(.name=="From") | .value), snippet}'
```
## Send a message
```bash
python3 -c "
import base64, json
raw = 'From: me\r\nTo: recipient@example.com\r\nSubject: Hello\r\n\r\nBody text here'
encoded = base64.urlsafe_b64encode(raw.encode()).decode()
print(json.dumps({'raw': encoded}))
" | curl -s -X POST \
-H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d @- \
"https://gmail.googleapis.com/gmail/v1/users/me/messages/send" \
| jq '{id, threadId}'
```
## Search
```bash
curl -s -H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \
"https://gmail.googleapis.com/gmail/v1/users/me/messages?q=from:boss@example.com+is:unread&maxResults=5" \
| jq '.messages[].id'
```
## Notes
- Always confirm recipient and content before sending.
- Token refresh is handled externally.
在 GitHub 查看