Skip to content

Instantly share code, notes, and snippets.

@kaochenlong
Created March 29, 2025 04:09
Show Gist options
  • Save kaochenlong/1ae314b585fd14a25d487c3a4ac2a14a to your computer and use it in GitHub Desktop.
Save kaochenlong/1ae314b585fd14a25d487c3a4ac2a14a to your computer and use it in GitHub Desktop.
{
"nodes": [
{
"parameters": {
"url": "https://apiservice.mol.gov.tw/OdService/download/A17000000J-020028-jpp",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
200,
20
],
"id": "d9d25b77-26b7-42e0-88dd-bf227f27db7c",
"name": "抓抓抓"
},
{
"parameters": {
"operation": "fromJson",
"options": {}
},
"type": "n8n-nodes-base.extractFromFile",
"typeVersion": 1,
"position": [
380,
-80
],
"id": "36580bd3-3563-42cc-a76a-2175fd5adb2d",
"name": "JSON"
},
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
20,
-120
],
"id": "8ccee233-954f-4258-a349-4d5828471803",
"name": "GO"
},
{
"parameters": {
"fieldToSplitOut": "data",
"options": {}
},
"type": "n8n-nodes-base.splitOut",
"typeVersion": 1,
"position": [
560,
0
],
"id": "cb2eeeb4-69a9-4edc-9857-95ca7c2af625",
"name": ""
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "65d1bf2d-430b-4889-98b5-42e41df71b11",
"leftValue": "={{ $json['所在縣市'] }}",
"rightValue": "高雄",
"operator": {
"type": "string",
"operation": "contains"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
740,
-60
],
"id": "8353d5b1-d911-4c2d-88eb-b28c0c543237",
"name": "高雄"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "0fb648ca-9367-44de-a453-059ce37069a0",
"name": "名稱",
"value": "={{ $json['醫院名稱'] }}",
"type": "string"
},
{
"id": "688de04a-a4f5-4cbc-b7cf-ceb4618f3bf2",
"name": "評鑑合格日期",
"value": "={{ $json['醫院評鑑合格效期起日(民國年月日)'] }}",
"type": "string"
},
{
"id": "47ca7a41-f23d-49f8-92e7-9f21a18d11cd",
"name": "電話",
"value": "={{ $json['醫院電話'] }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
960,
-200
],
"id": "67f91683-a294-4da1-88c0-3d764d18d04e",
"name": "欄位調整"
},
{
"parameters": {
"operation": "xlsx",
"options": {
"fileName": "good-hospitals.xlsx"
}
},
"type": "n8n-nodes-base.convertToFile",
"typeVersion": 1.1,
"position": [
1140,
-140
],
"id": "4ded16f5-cfc4-4fd4-ae36-02cf8a5b6450",
"name": "轉 Excel"
}
],
"connections": {
"抓抓抓": {
"main": [
[
{
"node": "JSON",
"type": "main",
"index": 0
}
]
]
},
"JSON": {
"main": [
[
{
"node": "",
"type": "main",
"index": 0
}
]
]
},
"GO": {
"main": [
[
{
"node": "抓抓抓",
"type": "main",
"index": 0
}
]
]
},
"拆": {
"main": [
[
{
"node": "高雄",
"type": "main",
"index": 0
}
]
]
},
"高雄": {
"main": [
[
{
"node": "欄位調整",
"type": "main",
"index": 0
}
]
]
},
"欄位調整": {
"main": [
[
{
"node": "轉 Excel",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "8a867247c877b5ff77a4eb049ea5f8209724e471ec14aa859e8ef8ecf987b8b3"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment