返回顶部
s

scoroScoro集成

Scoro API v2 integration for time tracking, task management, utilization reporting, team status reports, and billable corrections. Use when: user asks about Scoro tasks, time entries, hours (billable/non-billable), utilization reports, team status, or any Scoro data.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
182
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

scoro

Scoro 集成

为 OpenClaw 提供完整的 Scoro API v2 集成。支持任务管理、时间追踪、工时计算、利用率报告、团队仪表盘以及可计费状态修正。

设置

  1. 1. 在 Scoro 账户中,通过 设置 → 外部连接 → API 获取 Scoro API 密钥。
  2. 设置公司 URL(例如 https://yourcompany.scoro.com/api/v2)。
  3. 将两者添加到 OpenClaw 配置中:

json
{
env: {
vars: {
SCOROAPIKEY: ScoroAPIyourkey_here,
SCOROCOMPANYURL: https://yourcompany.scoro.com/api/v2
}
}
}

  1. 4. 在 openclaw.json 中,将 scoro 添加到代理的技能列表中。

标准提示词

用户可以通过自然语言触发以下功能:

任务管理

  • - 获取我的 Scoro 任务 / 显示我本周的任务
  • 获取 <用户邮箱或姓名> 的任务
  • 显示逾期任务

工时与时间条目

  • - 显示我本周的工时 / 我记录了多少小时?
  • 计算我的可计费工时 / 显示可计费与不可计费工时
  • 向我发送一份可计费与不可计费工时的报告
  • 显示 <用户> 从 <日期> 到 <日期> 的时间条目

团队与经理报告

  • - 显示团队状态 / 团队动态
  • 生成团队工时报告

利用率报告

  • - 生成每周利用率报告
  • 显示 <用户> 的可计费比例

可计费修正

  • - 查找不正确的可计费条目
  • 修正条目 的可计费状态
  • 将任务 X 的所有记录调整为可计费

环境变量

  • - SCOROCOMPANYURL — 完整的基准 URL(例如 https://yourcompany.scoro.com/api/v2)
  • SCOROAPIKEY — 公司 API 密钥(以 ScoroAPI_ 开头)

两者都必须在 openclaw.json 的 env.vars 下设置。它们可作为 shell 环境变量使用。不要使用 .env 文件。

API 基础

所有 Scoro API v2 请求均为 POST。 每个请求体必须包含 apiKey 和 companyaccountid。

companyaccountid 是 Scoro URL 中的子域名。对于 https://yourcompany.scoro.com,它是 yourcompany。

示例请求(curl)

bash
curl -X POST $SCOROCOMPANYURL/timeEntries/list \
-H Content-Type: application/json \
-d {
apiKey: $SCOROAPIKEY,
companyaccountid: yourcompany,
filter: {
timeentrydate: {
from: 2026-03-10,
to: 2026-03-16
},
user_ids: [123]
},
per_page: 100,
page: 1,
detailed_response: true
}

示例请求(PowerShell / Windows)

powershell
$body = @{
apiKey = $env:SCOROAPIKEY
companyaccountid = yourcompany
filter = @{
timeentrydate = @{ from = 2026-03-10; to = 2026-03-16 }
user_ids = @(123)
}
per_page = 100
page = 1
detailed_response = $true
} | ConvertTo-Json -Depth 10

$response = Invoke-RestMethod -Method Post
-Uri $env:SCOROCOMPANYURL/timeEntries/list
-ContentType application/json -Body $body

关键端点

所有端点:POST $SCOROCOMPANYURL/{module}/{action}

端点用途
tasks/list使用筛选条件获取任务
tasks/view/ID
查看单个任务详情 |
| timeEntries/list | 获取时间条目(支持日期、用户、可计费筛选) |
| timeEntries/modify/ID | 更新时间条目(例如修正可计费状态) |
| users/list | 获取所有用户(包含汇报经理信息) |
| projects/list | 获取项目 |
| contacts/list | 获取联系人 |

筛选

任务

json
{
filter: {
responsiblepersonids: [123],
deadline: { from: 2026-03-16, to: 2026-03-22 },
status: in_progress
}
}

  • - responsiblepersonids — 分配的用户 ID 数组
  • deadline — {from: YYYY-MM-DD, to: YYYY-MM-DD}
  • modified_date — {from: YYYY-MM-DD, to: YYYY-MM-DD}

时间条目

关键:日期筛选字段为 timeentrydate,包含 from/to 键。不是 startdate/enddate。

json
{
filter: {
timeentrydate: { from: 2026-03-10, to: 2026-03-16 },
user_ids: [123]
}
}

  • - user_ids — 数组形式的用户 ID(不是单个值)

用户

无需特定筛选。返回所有活跃用户。

响应字段

任务字段

  • - eventid — 唯一任务 ID
  • eventname — 任务名称/标题
  • datetimedue — 截止日期(ISO 日期时间)
  • iscompleted — 0 或 1
  • activitytype — 项目/类别名称
  • responsibleperson_id — 分配的用户 ID
  • description — 任务描述

时间条目字段

  • - timeentryid — 唯一 ID
  • userid — 记录该条目的用户
  • duration — 格式 HH:MM:SS(例如 01:30:00 = 1.5 小时)
  • title — 任务/事件名称
  • billabletimetype — billable、nonbillable 或 custom
  • timeentrydate — YYYY-MM-DD
  • eventid — 该条目对应的任务/事件
  • isbillable — 0 或 1

用户字段

  • - id — 唯一用户 ID
  • full_name — 显示名称
  • email — 电子邮件地址
  • position — 职位

时长解析

格式为 HH:MM:SS。转换为十进制小时:小时 + 分钟/60 + 秒/3600。

分页 — 关键

无论 per_page 设置如何,Scoro 每页最多返回 25 个项目。

对于任何列表操作,您必须遍历所有页面:

page = 1
all_results = []
循环:
response = POST .../endpoint { per_page: 100, page: page }
如果 length(response.data) == 0:跳出循环
all_results += response.data
page += 1
等待 1 秒(速率限制)

重要: 不要使用 data.length < per_page 作为停止条件——即使您请求 100 个项目,API 每页最多返回 25 个。当页面返回 0 个结果时停止。

计算工时

  1. 1. 确定日期范围(默认:本周周一至今天)
  2. 获取日期范围和用户的所有时间条目,遍历所有页面
  3. 计算:

total_hours = sum(duration)
billablehours = sum(duration where billabletime_type == billable)
nonbillablehours = sum(duration where billabletimetype == non_billable)
billableratio = (billablehours / total_hours) * 100

  1. 4. 保留两位小数呈现

团队报告

团队按直接经理(汇报关系)组织。

团队状态工作流程

  1. 1. 解析所有团队成员的用户 ID(通过邮箱,从 users/list 获取所有页面)
  2. 一次性获取所有团队成员今天的时间条目
  3. 每位成员:总工时、可计费拆分、最新任务名称
  4. 计算团队总计和可计费比例

可计费状态修正

检测

  1. 1. 获取时间段内的时间条目
  2. 获取每个任务的任务计费类型
  3. 标记不匹配

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 scoro-1776376502 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 scoro-1776376502 技能

通过命令行安装

skillhub install scoro-1776376502

下载

⬇ 下载 scoro v1.0.0(免费)

文件大小: 3.95 KB | 发布时间: 2026-4-17 16:00

v1.0.0 最新 2026-4-17 16:00
Initial release: Full Scoro API v2 integration for time tracking, tasks, reporting, and team management.

- Supports fetching and managing Scoro tasks and time entries, including billable/non-billable hours and utilization reports.
- Allows generation of team status, hours, and utilization reports with user and date filtering.
- Enables correction of billable statuses on time entries, with safety checks.
- Handles Scoro API pagination and rate limiting automatically.
- Requires environment variables SCORO_API_KEY and SCORO_COMPANY_URL for setup.
- Detailed usage instructions and example requests included in documentation.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部