Clockify 到 Syncro
中级
这是一个Sales, IT Ops领域的自动化工作流,包含 13 个节点。主要使用 If, Set, Webhook, Function, HttpRequest 等节点。 将计时条目从 Clockify 同步到 Syncro
前置要求
- •HTTP Webhook 端点(n8n 会自动生成)
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
无法加载工作流预览
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "3",
"name": "Clockify 到 Syncro",
"nodes": [
{
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
280,
350
],
"webhookId": "82b654d7-aeb2-4cc1-97a8-0ebd1a729202",
"parameters": {
"path": "82b654d7-aeb2-4cc1-97a8-0ebd1a729202",
"options": {},
"httpMethod": "POST",
"responseData": "allEntries",
"responseMode": "lastNode"
},
"typeVersion": 1
},
{
"name": "Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"position": [
1830,
350
],
"parameters": {
"range": "A:B",
"options": {
"valueInputMode": "USER_ENTERED"
},
"sheetId": "xxx",
"operation": "append"
},
"credentials": {
"googleApi": "Google"
},
"typeVersion": 1
},
{
"name": "用于 Google",
"type": "n8n-nodes-base.set",
"position": [
1650,
350
],
"parameters": {
"values": {
"string": [
{
"name": "Syncro",
"value": "={{$json[\"id\"]}}"
},
{
"name": "Clockify",
"value": "={{$node[\"Webhook\"].json[\"body\"][\"id\"]}}"
}
]
},
"options": {},
"keepOnlySet": true
},
"typeVersion": 1
},
{
"name": "用于 Syncro",
"type": "n8n-nodes-base.set",
"position": [
730,
350
],
"parameters": {
"values": {
"string": [
{
"name": "id",
"value": "={{ $json[\"body\"][\"project\"][\"name\"].match(/\\[(\\d+)]/)[1] }}"
}
]
},
"options": {},
"keepOnlySet": true
},
"typeVersion": 1
},
{
"name": "查找匹配",
"type": "n8n-nodes-base.googleSheets",
"position": [
1130,
350
],
"parameters": {
"range": "A:B",
"options": {
"valueRenderMode": "UNFORMATTED_VALUE",
"returnAllMatches": true
},
"sheetId": "xxx",
"operation": "lookup",
"lookupValue": "={{$node[\"Webhook\"].json[\"body\"][\"id\"]}}",
"lookupColumn": "=Clockify"
},
"credentials": {
"googleApi": "Google"
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"name": "IF",
"type": "n8n-nodes-base.if",
"position": [
1300,
350
],
"parameters": {
"conditions": {
"string": [],
"boolean": [
{
"value1": "={{!!Object.keys($node[\"FindMatch\"].data).length}}",
"value2": true
}
]
}
},
"typeVersion": 1,
"alwaysOutputData": false
},
{
"name": "新建 Syncro 计时器",
"type": "n8n-nodes-base.httpRequest",
"position": [
1490,
350
],
"parameters": {
"url": "={{$node[\"EnvVariables\"].json[\"syncro_baseurl\"]}}/api/v1/tickets/{{$node[\"ForSyncro\"].json[\"id\"]}}/timer_entry",
"options": {},
"requestMethod": "POST",
"authentication": "headerAuth",
"bodyParametersUi": {
"parameter": [
{
"name": "start_at",
"value": "={{$node[\"Webhook\"].json[\"body\"][\"timeInterval\"][\"start\"]}}"
},
{
"name": "end_at",
"value": "={{$node[\"Webhook\"].json[\"body\"][\"timeInterval\"][\"end\"]}}"
},
{
"name": "notes",
"value": "={{$node[\"Webhook\"].json[\"body\"][\"description\"]}}"
},
{
"name": "user_id",
"value": "={{$node[\"MatchTechnician\"].json[\"id\"]}}"
}
]
}
},
"credentials": {
"httpHeaderAuth": "Syncro"
},
"typeVersion": 1
},
{
"name": "更新 Syncro 计时器",
"type": "n8n-nodes-base.httpRequest",
"position": [
1490,
580
],
"parameters": {
"url": "={{$node[\"EnvVariables\"].json[\"syncro_baseurl\"]}}/api/v1/tickets/{{$node[\"ForSyncro\"].json[\"id\"]}}/update_timer_entry",
"options": {
"followRedirect": true
},
"requestMethod": "PUT",
"authentication": "headerAuth",
"bodyParametersUi": {
"parameter": [
{
"name": "timer_entry_id",
"value": "={{$node[\"IF\"].json[\"Syncro\"]}}"
},
{
"name": "start_time",
"value": "={{$node[\"Webhook\"].json[\"body\"][\"timeInterval\"][\"start\"]}}"
},
{
"name": "end_time",
"value": "={{$node[\"Webhook\"].json[\"body\"][\"timeInterval\"][\"end\"]}}"
},
{
"name": "notes",
"value": "={{$node[\"Webhook\"].json[\"body\"][\"description\"]}}"
},
{
"name": "user_id",
"value": "={{$node[\"MatchTechnician\"].json[\"id\"]}}"
}
]
}
},
"credentials": {
"httpHeaderAuth": "Syncro"
},
"typeVersion": 1
},
{
"name": "环境变量",
"type": "n8n-nodes-base.set",
"position": [
580,
350
],
"parameters": {
"values": {
"string": [
{
"name": "syncro_baseurl",
"value": "https://subdomain.syncromsp.com"
}
]
},
"options": {}
},
"typeVersion": 1
},
{
"name": "设置技术人员",
"type": "n8n-nodes-base.set",
"position": [
870,
350
],
"parameters": {
"values": {
"string": [
{
"name": "Tech 1",
"value": "1234"
},
{
"name": "Tech 2",
"value": "5678"
}
]
},
"options": {},
"keepOnlySet": true
},
"typeVersion": 1
},
{
"name": "匹配技术人员",
"type": "n8n-nodes-base.function",
"position": [
1000,
350
],
"parameters": {
"functionCode": "\nconst results = [];\n\nconst user = $node[\"Webhook\"].json[\"body\"][\"user\"];\n\nconst persons = items[0].json\n\nfor (key of Object.keys(persons)) {\n if (key === user.name) {\n results.push({ json: { id: persons[key], name: key } })\n }\n}\n\nreturn results;"
},
"typeVersion": 1
},
{
"name": "IF1",
"type": "n8n-nodes-base.if",
"position": [
420,
350
],
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"body\"][\"project\"][\"name\"]}}",
"value2": "Ticket",
"operation": "contains"
}
]
}
},
"typeVersion": 1
},
{
"name": "无操作",
"type": "n8n-nodes-base.noOp",
"position": [
480,
520
],
"parameters": {},
"typeVersion": 1
}
],
"active": true,
"settings": {},
"connections": {
"IF": {
"main": [
[
{
"node": "UpdateSyncroTimer",
"type": "main",
"index": 0
}
],
[
{
"node": "NewSyncroTimer",
"type": "main",
"index": 0
}
]
]
},
"IF1": {
"main": [
[
{
"node": "EnvVariables",
"type": "main",
"index": 0
}
],
[
{
"node": "NoOp",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "IF1",
"type": "main",
"index": 0
}
]
]
},
"FindMatch": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
]
]
},
"ForGoogle": {
"main": [
[
{
"node": "Google Sheets",
"type": "main",
"index": 0
}
]
]
},
"ForSyncro": {
"main": [
[
{
"node": "SetTechnicians",
"type": "main",
"index": 0
}
]
]
},
"EnvVariables": {
"main": [
[
{
"node": "ForSyncro",
"type": "main",
"index": 0
}
]
]
},
"NewSyncroTimer": {
"main": [
[
{
"node": "ForGoogle",
"type": "main",
"index": 0
}
]
]
},
"SetTechnicians": {
"main": [
[
{
"node": "MatchTechnician",
"type": "main",
"index": 0
}
]
]
},
"MatchTechnician": {
"main": [
[
{
"node": "FindMatch",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 销售, IT 运维
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
Dialpad 到 Syncro
将 Dialpad 通话信息推送到 Syncro
If
Set
Webhook
+4
22 节点Jonathan
IT 运维
HubSpot 联系人同步(含 LinkedIn URL)、变更检测与 Gmail 提醒
同步 HubSpot 联系人(含 LinkedIn URL),检测变更并发送 Gmail 提醒
If
Set
Code
+11
46 节点PollupAI
销售
AI房地产经纪人:端到端运营自动化(网络、数据、语音)
AI房地产经纪人:端到端运营自动化(网络、数据、语音)
If
Set
Code
+16
45 节点Sam Yassine
销售
废弃购物车恢复邮件自动化工作流
通过Gmail、Google表格和Twilio实现Shopify废弃购物车恢复(无代码)
If
Set
Wait
+10
60 节点Velebit from Innovatio
销售
[模板] AI宠物店 v8
🐶 AI宠物店助手 - 集成GPT-4o、Google日历和WhatsApp/Instagram/Facebook
If
N8n
Set
+38
244 节点Amanda Benks
销售
为新Salesforce工单自动创建Geotab区域
为新Salesforce工单自动创建Geotab区域
If
Set
Code
+7
22 节点Sobek
销售