Commit 796ac789 authored by machao's avatar machao

8.20的n8n配置文件

parent a9a22760
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyInterpreterInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="PyPackageRequirementsInspection" enabled="false" level="WARNING" enabled_by_default="false">
<option name="ignoredPackages">
<value>
<list size="25">
<item index="0" class="java.lang.String" itemvalue="bs4" />
<item index="1" class="java.lang.String" itemvalue="greenlet" />
<item index="2" class="java.lang.String" itemvalue="requests" />
<item index="3" class="java.lang.String" itemvalue="numpy" />
<item index="4" class="java.lang.String" itemvalue="redis" />
<item index="5" class="java.lang.String" itemvalue="pycrypto" />
<item index="6" class="java.lang.String" itemvalue="eventlet" />
<item index="7" class="java.lang.String" itemvalue="selenium" />
<item index="8" class="java.lang.String" itemvalue="ysb_common" />
<item index="9" class="java.lang.String" itemvalue="pymysql" />
<item index="10" class="java.lang.String" itemvalue="gevent" />
<item index="11" class="java.lang.String" itemvalue="urllib3" />
<item index="12" class="java.lang.String" itemvalue="beautifulsoup4" />
<item index="13" class="java.lang.String" itemvalue="dbutils" />
<item index="14" class="java.lang.String" itemvalue="Werkzeug" />
<item index="15" class="java.lang.String" itemvalue="opencv-python" />
<item index="16" class="java.lang.String" itemvalue="h5py" />
<item index="17" class="java.lang.String" itemvalue="gunicorn" />
<item index="18" class="java.lang.String" itemvalue="py_mini_racer" />
<item index="19" class="java.lang.String" itemvalue="Crypto" />
<item index="20" class="java.lang.String" itemvalue="htjs_apisdk" />
<item index="21" class="java.lang.String" itemvalue="aircv" />
<item index="22" class="java.lang.String" itemvalue="redis-py-cluster" />
<item index="23" class="java.lang.String" itemvalue="flask" />
<item index="24" class="java.lang.String" itemvalue="Pillow" />
</list>
</value>
</option>
</inspection_tool>
</profile>
</component>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.13 (Twitter)" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/n8n.iml" filepath="$PROJECT_DIR$/.idea/n8n.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
{
"createdAt": "2024-09-09T02:13:42.906Z",
"updatedAt": "2024-09-09T02:13:42.906Z",
"id": "YlcMg552EY5n0awF",
"name": "My workflow",
"active": false,
"nodes": [
{
"parameters": {},
"id": "d91dba08-3788-4984-9204-a370fd62053d",
"name": "When clicking ‘Test workflow’",
"type": "n8n-nodes-base.manualTrigger",
"position": [
420,
320
],
"typeVersion": 1
}
],
"connections": {},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"pinData": {},
"versionId": "e1791629-ca48-4956-9a6f-1a3d8ac88f95",
"triggerCount": 0,
"shared": [
{
"createdAt": "2024-09-09T02:13:42.934Z",
"updatedAt": "2024-09-09T02:13:42.934Z",
"role": "workflow:owner",
"workflowId": "YlcMg552EY5n0awF",
"projectId": "C7zKoCDdmGgzUqSW",
"project": {
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:41:43.608Z",
"id": "C7zKoCDdmGgzUqSW",
"name": "周 卫 <zhouwei@ssish.com>",
"type": "personal",
"projectRelations": [
{
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:31:21.275Z",
"role": "project:personalOwner",
"userId": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"projectId": "C7zKoCDdmGgzUqSW",
"user": {
"createdAt": "2024-08-23T06:31:16.119Z",
"updatedAt": "2025-03-19T06:19:26.514Z",
"id": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"email": "zhouwei@ssish.com",
"firstName": "周",
"lastName": "卫",
"personalizationAnswers": {
"companyType": "education",
"role": "business-owner",
"automationBeneficiary": "my-team",
"companySize": "20-99",
"reportedSource": "friend",
"version": "v4",
"personalization_survey_submitted_at": "2024-08-23T06:57:52.856Z",
"personalization_survey_n8n_version": "1.55.3"
},
"settings": {
"userActivated": true,
"firstSuccessfulWorkflowId": "s6zsznwVs6N4L2Hx",
"userActivatedAt": 1725957335278,
"npsSurvey": {
"responded": true,
"lastShownAt": 1742365155724
},
"isOnboarded": true
},
"role": "global:owner",
"disabled": false,
"mfaEnabled": false,
"isPending": false,
"isOwner": true
}
}
]
}
}
],
"tags": []
}
\ No newline at end of file
This diff is collapsed.
{
"createdAt": "2025-04-10T05:39:52.951Z",
"updatedAt": "2025-04-17T05:29:26.000Z",
"id": "PB5fUo8BrFYwlowK",
"name": "do_tw_label_interface",
"active": true,
"nodes": [
{
"parameters": {
"operation": "executeQuery",
"query": "CALL do_label_news_source({{ JSON.stringify(JSON.stringify($json.is_warn))}},{{ JSON.stringify(JSON.stringify($json.news_id))}},{{ JSON.stringify(JSON.stringify($json.label_data)) }},{{ JSON.stringify(JSON.stringify($json.artificial_label_data)) }});",
"options": {}
},
"id": "2982694d-bc78-41b1-9fe5-22fcadade0a4",
"name": "insert_city_news",
"type": "n8n-nodes-base.mySql",
"typeVersion": 2.4,
"position": [
1780,
400
],
"credentials": {
"mySql": {
"id": "YpVIiGwzmmkf7vR7",
"name": "SL-DB-PRD"
}
}
},
{
"parameters": {
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nresult_data = $input.all();\ncontent_all = {};\nfor(let item_index =0; item_index < result_data.length;item_index++){\n item_data = result_data[item_index].json;\n if('label_data' in item_data){\n content_all['label'] = item_data['label_data'];\n }else if('artificial_label_data' in item_data){\n content_all['artificial_label'] = item_data['artificial_label_data'];\n }\n};\n// console.log(content_all);\ninfo_data_list = JSON.parse($('Webhook').all()[0].json.body.info);\nschedule_id = $('Webhook').all()[0].json.body.schedule_id;\nlabel_data_list = content_all.label;\nartificial_label_data_list = content_all.artificial_label;\nif(artificial_label_data_list.length>0){\n artificial_label_data_list[0]['city_code'] = info_data_list.city_code;\n}\nfunction isEmptyString(value) {\n // 方法1: 直接检查是否为空字符串或null\n if (!value || value.trim() == '' || value.trim() == 'null' || value.trim() == 'None') {\n return true;\n }\n return false;\n};\noutput_all = [];\noutput_all_data_temp = {};\noutput_all_data_temp['is_warn'] = '0';\noutput_all_data_temp['news_id'] = info_data_list.id;\noutput_all_data_temp['label_data'] = label_data_list;\noutput_all_data_temp['artificial_label_data'] = artificial_label_data_list;\noutput_all.push(output_all_data_temp);\n// console.log(JSON.stringify(JSON.stringify(info_data_list.id)));\n// console.log(JSON.stringify(JSON.stringify(label_data_list)));\n// console.log(JSON.stringify(JSON.stringify(artificial_label_data_list)));\nreturn output_all;"
},
"id": "301f2cee-2c31-4f19-a5ab-5c5c8144fe91",
"name": "get_city_news_sql",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1480,
400
]
},
{
"parameters": {
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\n//answer = \"```json{\\\"test1\\\":\\\"test\\\"}```\";\nfunction isEmptyString(value) {\n // 方法1: 直接检查是否为空字符串或null\n if (!value || value.trim() === '') {\n return true;\n }\n return false;\n};\nfunction isEmpty(value) {\n // 方法1: 直接检查是否为空字符串或null\n if (!value) {\n return true;\n }\n return false;\n};\nlabel_data_list = [];\nartificial_label_data_list = [];\nlabel_data_arr = $input.all();\nlabel_result_list = [];\nartificial_label_result_list = [];\nfor(var label_index=0;label_index<label_data_arr.length;label_index++){\n label_data_temp = label_data_arr[label_index];\n workflow_id = label_data_temp.json.data.workflow_id;\n label_data_output_list = label_data_temp.json.data.outputs;\n if(!isEmpty(label_data_output_list)){\n label_result = label_data_output_list.result;\n for (let i = 0; i < label_result.length; i++) {\n label_result_list.push(label_result[i]);\n }\n }\n};\n// console.log(label_result_list);\nfor (let i = 0; i < label_result_list.length; i++) {\n label_code_score = {};\n label_code = label_result_list[i].code;\n // label_score = label_result_list[i].score;\n label_score = \"\";\n if(!isEmptyString(label_code)){\n label_code_score['code'] = label_code;\n label_code_score['score'] = label_score;\n label_data_list.push(label_code_score);\n }\n};\n\nlabel_data_list_2 = [];\nlabel_data_json = {};\nartificial_label_data_json = {};\nlabel_data_json[\"label_data\"] = label_data_list;\nartificial_label_data_json[\"artificial_label_data\"] = artificial_label_data_list;\n// console.log(label_data_json);\nlabel_data_list_2.push(label_data_json);\nlabel_data_list_2.push(artificial_label_data_json);\nreturn label_data_list_2;"
},
"id": "2c0617bc-cd95-4f1b-bc8a-3dca133f3cf4",
"name": "get_label_answer",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1200,
400
]
},
{
"parameters": {
"method": "POST",
"url": "http://k8s-security-ingresss-2004545575-1912502751.ap-east-1.elb.amazonaws.com/api/v1/tag",
"sendHeaders": true,
"specifyHeaders": "json",
"jsonHeaders": "{\n \"Authorization\": \"Bearer app-KNq0O8kENP4ITqSmqHQ0IzAt\",\n \"Content-Type\": \"application/json\"\n}",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"inputs\": {\"record_json\":\"{{JSON.stringify(JSON.parse($json.body.info).full_text).replaceAll(/\"/g, '\\\\\"')}}\"},\n \"response_mode\": \"blocking\",\n \"user\": \"{{ $json.body.source }}\"\n}",
"options": {
"response": {
"response": {}
}
}
},
"id": "7aa65121-d698-4fab-a461-9aa30b474b17",
"name": "news_label_dify",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
920,
400
]
},
{
"parameters": {
"httpMethod": "POST",
"path": "twitter/search/tag",
"authentication": "headerAuth",
"responseMode": "lastNode",
"options": {
"allowedOrigins": "*",
"rawBody": false
}
},
"id": "79d406d0-27c6-4bd2-8db6-5ec2631d3572",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
640,
400
],
"webhookId": "e495a29c-8f43-4175-bdb8-277e03b60b07",
"credentials": {
"httpHeaderAuth": {
"id": "U87Wvnvu9oQ5Zapo",
"name": "Header Auth account"
}
}
}
],
"connections": {
"get_label_answer": {
"main": [
[
{
"node": "get_city_news_sql",
"type": "main",
"index": 0
}
]
]
},
"news_label_dify": {
"main": [
[
{
"node": "get_label_answer",
"type": "main",
"index": 0
}
]
]
},
"get_city_news_sql": {
"main": [
[
{
"node": "insert_city_news",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "news_label_dify",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"pinData": {},
"versionId": "95c7c5b5-baa9-4fc5-8b73-b874b8370a87",
"triggerCount": 1,
"shared": [
{
"createdAt": "2025-04-10T05:39:52.962Z",
"updatedAt": "2025-04-10T05:39:52.962Z",
"role": "workflow:owner",
"workflowId": "PB5fUo8BrFYwlowK",
"projectId": "C7zKoCDdmGgzUqSW",
"project": {
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:41:43.608Z",
"id": "C7zKoCDdmGgzUqSW",
"name": "周 卫 <zhouwei@ssish.com>",
"type": "personal",
"projectRelations": [
{
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:31:21.275Z",
"role": "project:personalOwner",
"userId": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"projectId": "C7zKoCDdmGgzUqSW",
"user": {
"createdAt": "2024-08-23T06:31:16.119Z",
"updatedAt": "2025-03-19T06:19:26.514Z",
"id": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"email": "zhouwei@ssish.com",
"firstName": "周",
"lastName": "卫",
"personalizationAnswers": {
"companyType": "education",
"role": "business-owner",
"automationBeneficiary": "my-team",
"companySize": "20-99",
"reportedSource": "friend",
"version": "v4",
"personalization_survey_submitted_at": "2024-08-23T06:57:52.856Z",
"personalization_survey_n8n_version": "1.55.3"
},
"settings": {
"userActivated": true,
"firstSuccessfulWorkflowId": "s6zsznwVs6N4L2Hx",
"userActivatedAt": 1725957335278,
"npsSurvey": {
"responded": true,
"lastShownAt": 1742365155724
},
"isOnboarded": true
},
"role": "global:owner",
"disabled": false,
"mfaEnabled": false,
"isPending": false,
"isOwner": true
}
}
]
}
}
],
"tags": []
}
\ No newline at end of file
{
"createdAt": "2025-04-09T11:04:21.896Z",
"updatedAt": "2025-04-17T05:29:07.000Z",
"id": "53J8olMdTOSd0kSb",
"name": "do_tw_news_label",
"active": true,
"nodes": [
{
"parameters": {
"operation": "executeQuery",
"query": "CALL do_label_news_source({{ JSON.stringify(JSON.stringify($json.is_warn))}},{{ JSON.stringify(JSON.stringify($json.news_id))}},{{ JSON.stringify(JSON.stringify($json.label_data)) }},{{ JSON.stringify(JSON.stringify($json.artificial_label_data)) }});",
"options": {}
},
"id": "0d003f02-9275-4899-a7a4-8629069cf367",
"name": "insert_city_news",
"type": "n8n-nodes-base.mySql",
"typeVersion": 2.4,
"position": [
2000,
200
],
"credentials": {
"mySql": {
"id": "YpVIiGwzmmkf7vR7",
"name": "SL-DB-PRD"
}
}
},
{
"parameters": {
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nresult_data = $input.all();\ncontent_all = {};\nfor(let item_index =0; item_index < result_data.length;item_index++){\n item_data = result_data[item_index].json;\n if('label_data' in item_data){\n content_all['label'] = item_data['label_data'];\n }else if('artificial_label_data' in item_data){\n content_all['artificial_label'] = item_data['artificial_label_data'];\n }\n};\n// console.log(content_all);\ninfo_data_list = JSON.parse($('Webhook').all()[0].json.body.info);\nschedule_id = $('Webhook').all()[0].json.body.schedule_id;\nlabel_data_list = content_all.label;\nartificial_label_data_list = content_all.artificial_label;\nif(artificial_label_data_list.length>0){\n artificial_label_data_list[0]['city_code'] = info_data_list.city_code;\n}\nfunction isEmptyString(value) {\n // 方法1: 直接检查是否为空字符串或null\n if (!value || value.trim() == '' || value.trim() == 'null' || value.trim() == 'None') {\n return true;\n }\n return false;\n};\noutput_all = [];\noutput_all_data_temp = {};\noutput_all_data_temp['is_warn'] = '0';\noutput_all_data_temp['news_id'] = info_data_list.id;\noutput_all_data_temp['label_data'] = label_data_list;\noutput_all_data_temp['artificial_label_data'] = artificial_label_data_list;\noutput_all.push(output_all_data_temp);\n// console.log(JSON.stringify(JSON.stringify(info_data_list.id)));\n// console.log(JSON.stringify(JSON.stringify(label_data_list)));\n// console.log(JSON.stringify(JSON.stringify(artificial_label_data_list)));\nreturn output_all;"
},
"id": "20325cad-de0c-4454-a146-f6399fe72a3f",
"name": "get_city_news_sql",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1680,
200
]
},
{
"parameters": {
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\n//answer = \"```json{\\\"test1\\\":\\\"test\\\"}```\";\nfunction isEmptyString(value) {\n // 方法1: 直接检查是否为空字符串或null\n if (!value || value.trim() === '') {\n return true;\n }\n return false;\n};\nfunction isEmpty(value) {\n // 方法1: 直接检查是否为空字符串或null\n if (!value) {\n return true;\n }\n return false;\n};\nlabel_data_list = [];\nartificial_label_data_list = [];\nlabel_data_arr = $input.all();\nlabel_result_list = [];\nartificial_label_result_list = [];\nfor(var label_index=0;label_index<label_data_arr.length;label_index++){\n label_data_temp = label_data_arr[label_index];\n workflow_id = label_data_temp.json.data.workflow_id;\n label_data_output_list = label_data_temp.json.data.outputs;\n if(!isEmpty(label_data_output_list)){\n label_result = label_data_output_list.result;\n for (let i = 0; i < label_result.length; i++) {\n label_result_list.push(label_result[i]);\n }\n }\n};\n// console.log(label_result_list);\nfor (let i = 0; i < label_result_list.length; i++) {\n label_code_score = {};\n label_code = label_result_list[i].code;\n // label_score = label_result_list[i].score;\n label_score = \"\";\n if(!isEmptyString(label_code)){\n label_code_score['code'] = label_code;\n label_code_score['score'] = label_score;\n label_data_list.push(label_code_score);\n }\n};\n\nlabel_data_list_2 = [];\nlabel_data_json = {};\nartificial_label_data_json = {};\nlabel_data_json[\"label_data\"] = label_data_list;\nartificial_label_data_json[\"artificial_label_data\"] = artificial_label_data_list;\n// console.log(label_data_json);\nlabel_data_list_2.push(label_data_json);\nlabel_data_list_2.push(artificial_label_data_json);\nreturn label_data_list_2;"
},
"id": "8431750a-fe99-48cb-bf58-6eeb9ec991bd",
"name": "get_label_answer",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1360,
200
]
},
{
"parameters": {
"method": "POST",
"url": "http://k8s-security-ingresss-c06bddc665-962509615.ap-east-1.elb.amazonaws.com/v1/workflows/run",
"sendHeaders": true,
"specifyHeaders": "json",
"jsonHeaders": "{\n \"Authorization\": \"Bearer app-KNq0O8kENP4ITqSmqHQ0IzAt\",\n \"Content-Type\": \"application/json\"\n}",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"inputs\": {\"msg_info\":\"{{JSON.stringify(JSON.parse($json.body.info).full_text).replaceAll(/\"/g, '\\\\\"')}}\"},\n \"response_mode\": \"blocking\",\n \"user\": \"{{ $json.body.source }}\"\n}",
"options": {}
},
"id": "bd458c53-9677-4a49-af75-b1a4633a4ac8",
"name": "news_label_dify",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1060,
200
]
},
{
"parameters": {
"httpMethod": "POST",
"path": "twitter/search/label",
"authentication": "headerAuth",
"responseMode": "lastNode",
"options": {
"allowedOrigins": "*",
"rawBody": false
}
},
"id": "7f863b5a-062c-4e62-bf08-801e8e854262",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
760,
200
],
"webhookId": "e495a29c-8f43-4175-bdb8-277e03b60b07",
"credentials": {
"httpHeaderAuth": {
"id": "U87Wvnvu9oQ5Zapo",
"name": "Header Auth account"
}
}
}
],
"connections": {
"get_city_news_sql": {
"main": [
[
{
"node": "insert_city_news",
"type": "main",
"index": 0
}
]
]
},
"get_label_answer": {
"main": [
[
{
"node": "get_city_news_sql",
"type": "main",
"index": 0
}
]
]
},
"news_label_dify": {
"main": [
[
{
"node": "get_label_answer",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "news_label_dify",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"pinData": {},
"versionId": "7dc4a53e-98e7-4e82-b30e-afe42b2f9875",
"triggerCount": 1,
"shared": [
{
"createdAt": "2025-04-09T11:04:21.985Z",
"updatedAt": "2025-04-09T11:04:21.985Z",
"role": "workflow:owner",
"workflowId": "53J8olMdTOSd0kSb",
"projectId": "C7zKoCDdmGgzUqSW",
"project": {
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:41:43.608Z",
"id": "C7zKoCDdmGgzUqSW",
"name": "周 卫 <zhouwei@ssish.com>",
"type": "personal",
"projectRelations": [
{
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:31:21.275Z",
"role": "project:personalOwner",
"userId": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"projectId": "C7zKoCDdmGgzUqSW",
"user": {
"createdAt": "2024-08-23T06:31:16.119Z",
"updatedAt": "2025-03-19T06:19:26.514Z",
"id": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"email": "zhouwei@ssish.com",
"firstName": "周",
"lastName": "卫",
"personalizationAnswers": {
"companyType": "education",
"role": "business-owner",
"automationBeneficiary": "my-team",
"companySize": "20-99",
"reportedSource": "friend",
"version": "v4",
"personalization_survey_submitted_at": "2024-08-23T06:57:52.856Z",
"personalization_survey_n8n_version": "1.55.3"
},
"settings": {
"userActivated": true,
"firstSuccessfulWorkflowId": "s6zsznwVs6N4L2Hx",
"userActivatedAt": 1725957335278,
"npsSurvey": {
"responded": true,
"lastShownAt": 1742365155724
},
"isOnboarded": true
},
"role": "global:owner",
"disabled": false,
"mfaEnabled": false,
"isPending": false,
"isOwner": true
}
}
]
}
}
],
"tags": []
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
{
"createdAt": "2025-04-03T04:56:41.542Z",
"updatedAt": "2025-04-17T05:23:20.000Z",
"id": "JrGxnBveuh26kpLw",
"name": "fy_test",
"active": false,
"nodes": [
{
"parameters": {
"method": "POST",
"url": "http://k8s-security-ingresss-c06bddc665-962509615.ap-east-1.elb.amazonaws.com/v1/completion-messages",
"sendHeaders": true,
"specifyHeaders": "json",
"jsonHeaders": "{\n \"Authorization\": \"Bearer app-fxQiMsg03GrJCtwNfLRtnD4R\",\n \"Content-Type\": \"application/json\"\n}",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"inputs\": {\"record_json\":\"{{$json.text.replaceAll(/\"/g, '\\\\\"')}}\",\"language\":\"中文\"},\n \"response_mode\": \"blocking\",\n \"user\": \"{{$json.source}}\"\n}",
"options": {}
},
"id": "874fc343-aab6-45e9-963d-6f09e323d218",
"name": "translate_dify",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1300,
280
]
},
{
"parameters": {
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\n//answer = \"```json{\\\"test1\\\":\\\"test\\\"}```\";\nfunction findAllIndexes(str, charToFind) {\n const regex = new RegExp(charToFind, 'g');\n let indexes = [];\n let result;\n while ((result = regex.exec(str)) !== null) {\n indexes.push(result.index);\n }\n return indexes;\n}\nfunction isValidJSON(str) {\n try {\n JSON.parse(str);\n return true;\n } catch (e) {\n return false;\n }\n}\nfunction autoCompleteJSON(str) {\n if (isValidJSON(str)) {\n return str;\n }\n if (!str.includes('\"}') || (str.includes('\"}') && !str.endsWith('\"}'))) {\n str = str.replaceAll(\"}\",\"\");\n }\n str = retainSingleOccurrence(str,'}');\n // console.log(str);\n let missing = '';\n if (!str.endsWith('\"}')) {\n if (str.endsWith('\"')) {\n missing += '}'\n }else{\n missing += '\"}'\n }\n }\n str = str+missing;\n // console.log(str);\n return str;\n}\nfunction retainSingleOccurrence(str, subStr) {\n // 检查字符串是否包含子字符串\n if (!str.includes(subStr)) {\n return str;\n }\n // 使用正则表达式删除多余的子字符串\n // 使用全局匹配标志 g 和正则表达式来匹配所有子字符串\n // 注意:这里假设子字符串不会与其他文本重叠\n const regex = new RegExp(`(${subStr})(?=.*${subStr})`, 'g');\n let result = str.replace(regex, '');\n return result;\n}\n// answer =$input.all()[0].json.data.outputs.result.answer;\nif('data' in $input.all()[0].json){\n answer =$input.all()[0].json.data.answer;\n}else{\n answer =$input.all()[0].json.answer;\n}\nindexes = findAllIndexes(answer,\"```\");\nanswer_str = '';\nif(indexes.length>0){\n answer_str = answer.slice(indexes[0]+7, indexes[1]);\n}else{\n answer_str = answer;\n}\nanswer_str = answer_str.replace(/\\s+/g, '');\nanswer_data_json = JSON.parse(autoCompleteJSON(answer_str));\nanswer_data = {};\nanswer_data[\"answer\"] = answer_data_json;\nconsole.log(answer_data_json);\nreturn answer_data;"
},
"id": "d809825d-fcab-4728-ac24-114570e77466",
"name": "get_transter_answer",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1520,
280
]
},
{
"parameters": {
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nlet output_info = {};\nlet text_info = {};\ninfo_data = JSON.parse($('Webhook').item.json.body.info);\ninfo_new = {};\nfor (let key in info_data) {\n if (info_data.hasOwnProperty(key)) {\n info_new[key] = info_data[key].replaceAll(/\"/g, '“')\n // console.log(info_data[key]); // 输出每个值\n }\n}\ninfo = JSON.stringify(info_new).replace(/https:\\/\\/[^\\s]+/g, '').replaceAll(/[ \\t\\n\\r]+/g, ' ');\n// console.log(info);\noutput_info['text'] = info;\noutput_info['source'] = $('Webhook').item.json.body.source;\nreturn output_info;"
},
"id": "bb9f1fe7-817e-44b6-97ee-ce3550bb5cd0",
"name": "get_info",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1080,
280
]
},
{
"parameters": {
"operation": "executeQuery",
"query": "CALL update_news_source_fy({{JSON.stringify($json.answer.toJsonString())}});",
"options": {}
},
"id": "69108b4b-1e4c-4288-9dd9-b80b3e960cf2",
"name": "update_news",
"type": "n8n-nodes-base.mySql",
"typeVersion": 2.4,
"position": [
1740,
280
],
"credentials": {
"mySql": {
"id": "09oRI0DULmEzD9l8",
"name": "SL-DB"
}
}
},
{
"parameters": {
"httpMethod": "POST",
"path": "twitter/search/fy/test",
"authentication": "headerAuth",
"options": {
"allowedOrigins": "*",
"rawBody": false
}
},
"id": "a3e091cd-f33f-48f3-a69d-e5ac0d68f158",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
880,
280
],
"webhookId": "e495a29c-8f43-4175-bdb8-277e03b60b07",
"credentials": {
"httpHeaderAuth": {
"id": "U87Wvnvu9oQ5Zapo",
"name": "Header Auth account"
}
}
}
],
"connections": {
"translate_dify": {
"main": [
[
{
"node": "get_transter_answer",
"type": "main",
"index": 0
}
]
]
},
"get_transter_answer": {
"main": [
[
{
"node": "update_news",
"type": "main",
"index": 0
}
]
]
},
"get_info": {
"main": [
[
{
"node": "translate_dify",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "get_info",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"pinData": {},
"versionId": "07796200-b05d-4f96-bbe2-b538e3d1eeda",
"triggerCount": 0,
"shared": [
{
"createdAt": "2025-04-03T04:56:41.551Z",
"updatedAt": "2025-04-03T04:56:41.551Z",
"role": "workflow:owner",
"workflowId": "JrGxnBveuh26kpLw",
"projectId": "C7zKoCDdmGgzUqSW",
"project": {
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:41:43.608Z",
"id": "C7zKoCDdmGgzUqSW",
"name": "周 卫 <zhouwei@ssish.com>",
"type": "personal",
"projectRelations": [
{
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:31:21.275Z",
"role": "project:personalOwner",
"userId": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"projectId": "C7zKoCDdmGgzUqSW",
"user": {
"createdAt": "2024-08-23T06:31:16.119Z",
"updatedAt": "2025-03-19T06:19:26.514Z",
"id": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"email": "zhouwei@ssish.com",
"firstName": "周",
"lastName": "卫",
"personalizationAnswers": {
"companyType": "education",
"role": "business-owner",
"automationBeneficiary": "my-team",
"companySize": "20-99",
"reportedSource": "friend",
"version": "v4",
"personalization_survey_submitted_at": "2024-08-23T06:57:52.856Z",
"personalization_survey_n8n_version": "1.55.3"
},
"settings": {
"userActivated": true,
"firstSuccessfulWorkflowId": "s6zsznwVs6N4L2Hx",
"userActivatedAt": 1725957335278,
"npsSurvey": {
"responded": true,
"lastShownAt": 1742365155724
},
"isOnboarded": true
},
"role": "global:owner",
"disabled": false,
"mfaEnabled": false,
"isPending": false,
"isOwner": true
}
}
]
}
}
],
"tags": []
}
\ No newline at end of file
This diff is collapsed.
{
"createdAt": "2025-05-14T03:46:20.545Z",
"updatedAt": "2025-05-30T14:42:25.000Z",
"id": "7wjBhmUK3ogJiSob",
"name": "is_exists_crime",
"active": true,
"nodes": [
{
"parameters": {
"operation": "executeQuery",
"query": "select IFNULL(count(id), 0) as count from crime_mapping cm where cm.source_id ={{JSON.stringify(JSON.parse($json.body.info).id)}};\n",
"options": {}
},
"id": "758377a4-5621-4bf1-b5f6-cfdfc6bf7953",
"name": "is_exists_news",
"type": "n8n-nodes-base.mySql",
"typeVersion": 2.4,
"position": [
600,
360
],
"alwaysOutputData": false,
"credentials": {
"mySql": {
"id": "YpVIiGwzmmkf7vR7",
"name": "SL-DB-PRD"
}
}
},
{
"parameters": {
"httpMethod": "POST",
"path": "crime/isexistsbyid",
"authentication": "headerAuth",
"responseMode": "lastNode",
"options": {
"allowedOrigins": "*",
"rawBody": false
}
},
"id": "c04b872e-0f4a-42c9-b63d-3ab3e4cec6f3",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
340,
360
],
"webhookId": "e495a29c-8f43-4175-bdb8-277e03b60b07",
"credentials": {
"httpHeaderAuth": {
"id": "U87Wvnvu9oQ5Zapo",
"name": "Header Auth account"
}
}
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "is_exists_news",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"pinData": {},
"versionId": "8946e5d6-a06c-4de4-8c5d-a1148e579cdf",
"triggerCount": 1,
"shared": [
{
"createdAt": "2025-05-14T03:46:20.560Z",
"updatedAt": "2025-05-14T03:46:20.560Z",
"role": "workflow:owner",
"workflowId": "7wjBhmUK3ogJiSob",
"projectId": "C7zKoCDdmGgzUqSW",
"project": {
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:41:43.608Z",
"id": "C7zKoCDdmGgzUqSW",
"name": "周 卫 <zhouwei@ssish.com>",
"type": "personal",
"projectRelations": [
{
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:31:21.275Z",
"role": "project:personalOwner",
"userId": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"projectId": "C7zKoCDdmGgzUqSW",
"user": {
"createdAt": "2024-08-23T06:31:16.119Z",
"updatedAt": "2025-03-19T06:19:26.514Z",
"id": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"email": "zhouwei@ssish.com",
"firstName": "周",
"lastName": "卫",
"personalizationAnswers": {
"companyType": "education",
"role": "business-owner",
"automationBeneficiary": "my-team",
"companySize": "20-99",
"reportedSource": "friend",
"version": "v4",
"personalization_survey_submitted_at": "2024-08-23T06:57:52.856Z",
"personalization_survey_n8n_version": "1.55.3"
},
"settings": {
"userActivated": true,
"firstSuccessfulWorkflowId": "s6zsznwVs6N4L2Hx",
"userActivatedAt": 1725957335278,
"npsSurvey": {
"responded": true,
"lastShownAt": 1742365155724
},
"isOnboarded": true
},
"role": "global:owner",
"disabled": false,
"mfaEnabled": false,
"isPending": false,
"isOwner": true
}
}
]
}
}
],
"tags": []
}
\ No newline at end of file
{
"createdAt": "2025-03-27T07:12:40.892Z",
"updatedAt": "2025-04-23T08:10:35.000Z",
"id": "oReQ8D6vXdY0du2Q",
"name": "is_exists_news",
"active": true,
"nodes": [
{
"parameters": {
"operation": "executeQuery",
"query": "select IFNULL(count(id), 0) as count from news_source where news_uid ={{JSON.stringify(JSON.parse($json.body.info).id) }};\n",
"options": {}
},
"id": "9d403227-5f65-4d54-b4f6-53251509ba98",
"name": "is_exists_news",
"type": "n8n-nodes-base.mySql",
"typeVersion": 2.4,
"position": [
-780,
920
],
"alwaysOutputData": false,
"credentials": {
"mySql": {
"id": "YpVIiGwzmmkf7vR7",
"name": "SL-DB-PRD"
}
}
},
{
"parameters": {
"httpMethod": "POST",
"path": "twitter/isexistsbyid",
"authentication": "headerAuth",
"responseMode": "lastNode",
"options": {
"allowedOrigins": "*",
"rawBody": false
}
},
"id": "c17e51fd-92e2-4105-ad63-da77bee99b86",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
-1040,
920
],
"webhookId": "e495a29c-8f43-4175-bdb8-277e03b60b07",
"credentials": {
"httpHeaderAuth": {
"id": "U87Wvnvu9oQ5Zapo",
"name": "Header Auth account"
}
}
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "is_exists_news",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"pinData": {},
"versionId": "f43961bb-63d3-44bc-a246-5e35902dcc8f",
"triggerCount": 1,
"shared": [
{
"createdAt": "2025-03-27T07:12:40.911Z",
"updatedAt": "2025-03-27T07:12:40.911Z",
"role": "workflow:owner",
"workflowId": "oReQ8D6vXdY0du2Q",
"projectId": "C7zKoCDdmGgzUqSW",
"project": {
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:41:43.608Z",
"id": "C7zKoCDdmGgzUqSW",
"name": "周 卫 <zhouwei@ssish.com>",
"type": "personal",
"projectRelations": [
{
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:31:21.275Z",
"role": "project:personalOwner",
"userId": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"projectId": "C7zKoCDdmGgzUqSW",
"user": {
"createdAt": "2024-08-23T06:31:16.119Z",
"updatedAt": "2025-03-19T06:19:26.514Z",
"id": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"email": "zhouwei@ssish.com",
"firstName": "周",
"lastName": "卫",
"personalizationAnswers": {
"companyType": "education",
"role": "business-owner",
"automationBeneficiary": "my-team",
"companySize": "20-99",
"reportedSource": "friend",
"version": "v4",
"personalization_survey_submitted_at": "2024-08-23T06:57:52.856Z",
"personalization_survey_n8n_version": "1.55.3"
},
"settings": {
"userActivated": true,
"firstSuccessfulWorkflowId": "s6zsznwVs6N4L2Hx",
"userActivatedAt": 1725957335278,
"npsSurvey": {
"responded": true,
"lastShownAt": 1742365155724
},
"isOnboarded": true
},
"role": "global:owner",
"disabled": false,
"mfaEnabled": false,
"isPending": false,
"isOwner": true
}
}
]
}
}
],
"tags": []
}
\ No newline at end of file
This diff is collapsed.
{
"createdAt": "2025-04-02T09:53:30.470Z",
"updatedAt": "2025-04-17T05:27:34.000Z",
"id": "ZTzHvLotUJai7HJz",
"name": "news_fy_ch",
"active": true,
"nodes": [
{
"parameters": {
"method": "POST",
"url": "http://k8s-security-ingresss-c06bddc665-962509615.ap-east-1.elb.amazonaws.com/v1/completion-messages",
"sendHeaders": true,
"specifyHeaders": "json",
"jsonHeaders": "{\n \"Authorization\": \"Bearer app-fxQiMsg03GrJCtwNfLRtnD4R\",\n \"Content-Type\": \"application/json\"\n}",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"inputs\": {\"record_json\":\"{{$json.text.replaceAll(/\"/g, '\\\\\"')}}\",\"language\":\"中文\"},\n \"response_mode\": \"blocking\",\n \"user\": \"{{$json.source}}\"\n}",
"options": {}
},
"id": "37b55ad2-8565-4359-a32e-e9562ffb1311",
"name": "translate_dify",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-280,
420
]
},
{
"parameters": {
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\n//answer = \"```json{\\\"test1\\\":\\\"test\\\"}```\";\nfunction findAllIndexes(str, charToFind) {\n const regex = new RegExp(charToFind, 'g');\n let indexes = [];\n let result;\n while ((result = regex.exec(str)) !== null) {\n indexes.push(result.index);\n }\n return indexes;\n}\nfunction isValidJSON(str) {\n try {\n JSON.parse(str);\n return true;\n } catch (e) {\n return false;\n }\n}\nfunction autoCompleteJSON(str) {\n if (isValidJSON(str)) {\n return str;\n }\n if (!str.includes('\"}') || (str.includes('\"}') && !str.endsWith('\"}'))) {\n str = str.replaceAll(\"}\",\"\");\n }\n str = retainSingleOccurrence(str,'}');\n // console.log(str);\n let missing = '';\n if (!str.endsWith('\"}')) {\n if (str.endsWith('\"')) {\n missing += '}'\n }else{\n missing += '\"}'\n }\n }\n str = str+missing;\n // console.log(str);\n return str;\n}\nfunction retainSingleOccurrence(str, subStr) {\n // 检查字符串是否包含子字符串\n if (!str.includes(subStr)) {\n return str;\n }\n // 使用正则表达式删除多余的子字符串\n // 使用全局匹配标志 g 和正则表达式来匹配所有子字符串\n // 注意:这里假设子字符串不会与其他文本重叠\n const regex = new RegExp(`(${subStr})(?=.*${subStr})`, 'g');\n let result = str.replace(regex, '');\n return result;\n}\n// answer =$input.all()[0].json.data.outputs.result.answer;\nif(\"data\" in $input.all()[0].json){\n answer =$input.all()[0].json.data.answer;\n}else{\n answer =$input.all()[0].json.answer;\n}\nindexes = findAllIndexes(answer,\"```\");\nanswer_str = '';\nif(indexes.length>0){\n answer_str = answer.slice(indexes[0]+7, indexes[1]);\n}else{\n answer_str = answer;\n}\nanswer_str = answer_str.replace(/\\s+/g, '');\nanswer_data_json = JSON.parse(autoCompleteJSON(answer_str));\nanswer_data = {};\nanswer_data[\"answer\"] = answer_data_json;\nconsole.log(answer_data_json);\nreturn answer_data;"
},
"id": "2d28fe0d-bfbe-4d7c-96a3-b4ea9ba59f05",
"name": "get_transter_answer",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-60,
420
]
},
{
"parameters": {
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nlet output_info = {};\nlet text_info = {};\ninfo_data = JSON.parse($('Webhook').item.json.body.info);\ninfo_new = {};\nfor (let key in info_data) {\n if (info_data.hasOwnProperty(key)) {\n info_new[key] = info_data[key].replaceAll(/\"/g, '“')\n // console.log(info_data[key]); // 输出每个值\n }\n}\ninfo = JSON.stringify(info_new).replace(/https:\\/\\/[^\\s]+/g, '').replaceAll(/[ \\t\\n\\r]+/g, ' ');\n// console.log(info);\noutput_info['text'] = info;\noutput_info['source'] = $('Webhook').item.json.body.source;\nreturn output_info;"
},
"id": "aab92007-74bf-44a0-a303-ae33f84e9bbf",
"name": "get_info",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-500,
420
]
},
{
"parameters": {
"operation": "executeQuery",
"query": "CALL update_news_source_fy({{JSON.stringify($json.answer.toJsonString())}});",
"options": {}
},
"id": "6ab9f613-438d-4f0d-bcca-a60d40da793a",
"name": "update_news",
"type": "n8n-nodes-base.mySql",
"typeVersion": 2.4,
"position": [
160,
420
],
"credentials": {
"mySql": {
"id": "YpVIiGwzmmkf7vR7",
"name": "SL-DB-PRD"
}
}
},
{
"parameters": {
"httpMethod": "POST",
"path": "twitter/search/fy",
"authentication": "headerAuth",
"responseMode": "lastNode",
"options": {
"allowedOrigins": "*",
"rawBody": false
}
},
"id": "89e13d80-12a2-4fda-8fc4-66c32cb762a3",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
-700,
420
],
"webhookId": "e495a29c-8f43-4175-bdb8-277e03b60b07",
"credentials": {
"httpHeaderAuth": {
"id": "U87Wvnvu9oQ5Zapo",
"name": "Header Auth account"
}
}
}
],
"connections": {
"translate_dify": {
"main": [
[
{
"node": "get_transter_answer",
"type": "main",
"index": 0
}
]
]
},
"get_info": {
"main": [
[
{
"node": "translate_dify",
"type": "main",
"index": 0
}
]
]
},
"get_transter_answer": {
"main": [
[
{
"node": "update_news",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "get_info",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"pinData": {},
"versionId": "0a616563-b3d6-4dff-adb2-2642663bdc63",
"triggerCount": 1,
"shared": [
{
"createdAt": "2025-04-02T09:53:30.479Z",
"updatedAt": "2025-04-02T09:53:30.479Z",
"role": "workflow:owner",
"workflowId": "ZTzHvLotUJai7HJz",
"projectId": "C7zKoCDdmGgzUqSW",
"project": {
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:41:43.608Z",
"id": "C7zKoCDdmGgzUqSW",
"name": "周 卫 <zhouwei@ssish.com>",
"type": "personal",
"projectRelations": [
{
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:31:21.275Z",
"role": "project:personalOwner",
"userId": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"projectId": "C7zKoCDdmGgzUqSW",
"user": {
"createdAt": "2024-08-23T06:31:16.119Z",
"updatedAt": "2025-03-19T06:19:26.514Z",
"id": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"email": "zhouwei@ssish.com",
"firstName": "周",
"lastName": "卫",
"personalizationAnswers": {
"companyType": "education",
"role": "business-owner",
"automationBeneficiary": "my-team",
"companySize": "20-99",
"reportedSource": "friend",
"version": "v4",
"personalization_survey_submitted_at": "2024-08-23T06:57:52.856Z",
"personalization_survey_n8n_version": "1.55.3"
},
"settings": {
"userActivated": true,
"firstSuccessfulWorkflowId": "s6zsznwVs6N4L2Hx",
"userActivatedAt": 1725957335278,
"npsSurvey": {
"responded": true,
"lastShownAt": 1742365155724
},
"isOnboarded": true
},
"role": "global:owner",
"disabled": false,
"mfaEnabled": false,
"isPending": false,
"isOwner": true
}
}
]
}
}
],
"tags": []
}
\ No newline at end of file
{
"createdAt": "2025-04-10T11:35:42.002Z",
"updatedAt": "2025-04-17T05:28:15.000Z",
"id": "W1kv1npao4fkCv5z",
"name": "news_fy_ch_interface",
"active": true,
"nodes": [
{
"parameters": {
"method": "POST",
"url": "http://k8s-security-ingresss-2004545575-1912502751.ap-east-1.elb.amazonaws.com/api/v1/translate",
"sendHeaders": true,
"specifyHeaders": "json",
"jsonHeaders": "{\n \"Authorization\": \"Bearer app-fxQiMsg03GrJCtwNfLRtnD4R\",\n \"Content-Type\": \"application/json\"\n}",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"inputs\": {\"record_json\":\"{{$json.text.replaceAll(/\"/g, '\\\\\"')}}\",\"language\":\"中文\"},\n \"response_mode\": \"blocking\",\n \"user\": \"{{$json.source}}\"\n}",
"options": {}
},
"id": "7b59e4f1-43fb-4b59-9351-f6daa1f5c835",
"name": "translate_dify",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
940,
440
]
},
{
"parameters": {
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\n//answer = \"```json{\\\"test1\\\":\\\"test\\\"}```\";\nfunction findAllIndexes(str, charToFind) {\n const regex = new RegExp(charToFind, 'g');\n let indexes = [];\n let result;\n while ((result = regex.exec(str)) !== null) {\n indexes.push(result.index);\n }\n return indexes;\n}\nfunction isValidJSON(str) {\n try {\n JSON.parse(str);\n return true;\n } catch (e) {\n return false;\n }\n}\nfunction autoCompleteJSON(str) {\n if (isValidJSON(str)) {\n return str;\n }\n if (!str.includes('\"}') || (str.includes('\"}') && !str.endsWith('\"}'))) {\n str = str.replaceAll(\"}\",\"\");\n }\n str = retainSingleOccurrence(str,'}');\n // console.log(str);\n let missing = '';\n if (!str.endsWith('\"}')) {\n if (str.endsWith('\"')) {\n missing += '}'\n }else{\n missing += '\"}'\n }\n }\n str = str+missing;\n // console.log(str);\n return str;\n}\nfunction retainSingleOccurrence(str, subStr) {\n // 检查字符串是否包含子字符串\n if (!str.includes(subStr)) {\n return str;\n }\n // 使用正则表达式删除多余的子字符串\n // 使用全局匹配标志 g 和正则表达式来匹配所有子字符串\n // 注意:这里假设子字符串不会与其他文本重叠\n const regex = new RegExp(`(${subStr})(?=.*${subStr})`, 'g');\n let result = str.replace(regex, '');\n return result;\n}\n// answer =$input.all()[0].json.data.outputs.result.answer;\n// answer =$input.all()[0].json.answer;\nanswer =$input.all()[0].json.data.answer;\nindexes = findAllIndexes(answer,\"```\");\nanswer_str = '';\nif(indexes.length>0){\n answer_str = answer.slice(indexes[0]+7, indexes[1]);\n}else{\n answer_str = answer;\n}\nanswer_str = answer_str.replace(/\\s+/g, '');\nanswer_data_json = JSON.parse(autoCompleteJSON(answer_str));\nanswer_data = {};\nanswer_data[\"answer\"] = answer_data_json;\nconsole.log(answer_data_json);\nreturn answer_data;"
},
"id": "ced3e66e-220d-415c-ac38-aeff8ba89131",
"name": "get_transter_answer",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1160,
440
]
},
{
"parameters": {
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nlet output_info = {};\nlet text_info = {};\ninfo = $('Webhook').item.json.body.info.replace(/https:\\/\\/[^\\s]+/g, '').replaceAll(/[ \\t\\n\\r]+/g, ' ');\n// console.log(info);\noutput_info['text'] = info;\noutput_info['source'] = $('Webhook').item.json.body.source;\nreturn output_info;"
},
"id": "5a2854b0-635c-40c5-b33e-c6ad1f0ad272",
"name": "get_info",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
720,
440
]
},
{
"parameters": {
"operation": "executeQuery",
"query": "CALL update_news_source_fy({{JSON.stringify($json.answer.toJsonString())}});",
"options": {}
},
"id": "4ef4cd8b-1203-4122-9111-cd306732a95a",
"name": "update_news",
"type": "n8n-nodes-base.mySql",
"typeVersion": 2.4,
"position": [
1380,
440
],
"credentials": {
"mySql": {
"id": "YpVIiGwzmmkf7vR7",
"name": "SL-DB-PRD"
}
}
},
{
"parameters": {
"httpMethod": "POST",
"path": "twitter/search/fy/interface",
"authentication": "headerAuth",
"responseMode": "lastNode",
"options": {
"allowedOrigins": "*",
"rawBody": false
}
},
"id": "5efd4ffc-2d8b-457b-a8c2-fdb60e6ceccd",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
520,
440
],
"webhookId": "e495a29c-8f43-4175-bdb8-277e03b60b07",
"credentials": {
"httpHeaderAuth": {
"id": "U87Wvnvu9oQ5Zapo",
"name": "Header Auth account"
}
}
}
],
"connections": {
"translate_dify": {
"main": [
[
{
"node": "get_transter_answer",
"type": "main",
"index": 0
}
]
]
},
"get_transter_answer": {
"main": [
[
{
"node": "update_news",
"type": "main",
"index": 0
}
]
]
},
"get_info": {
"main": [
[
{
"node": "translate_dify",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "get_info",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"pinData": {},
"versionId": "d07faa68-c423-4faf-bc85-85b37180d0cd",
"triggerCount": 1,
"shared": [
{
"createdAt": "2025-04-10T11:35:42.015Z",
"updatedAt": "2025-04-10T11:35:42.015Z",
"role": "workflow:owner",
"workflowId": "W1kv1npao4fkCv5z",
"projectId": "C7zKoCDdmGgzUqSW",
"project": {
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:41:43.608Z",
"id": "C7zKoCDdmGgzUqSW",
"name": "周 卫 <zhouwei@ssish.com>",
"type": "personal",
"projectRelations": [
{
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:31:21.275Z",
"role": "project:personalOwner",
"userId": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"projectId": "C7zKoCDdmGgzUqSW",
"user": {
"createdAt": "2024-08-23T06:31:16.119Z",
"updatedAt": "2025-03-19T06:19:26.514Z",
"id": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"email": "zhouwei@ssish.com",
"firstName": "周",
"lastName": "卫",
"personalizationAnswers": {
"companyType": "education",
"role": "business-owner",
"automationBeneficiary": "my-team",
"companySize": "20-99",
"reportedSource": "friend",
"version": "v4",
"personalization_survey_submitted_at": "2024-08-23T06:57:52.856Z",
"personalization_survey_n8n_version": "1.55.3"
},
"settings": {
"userActivated": true,
"firstSuccessfulWorkflowId": "s6zsznwVs6N4L2Hx",
"userActivatedAt": 1725957335278,
"npsSurvey": {
"responded": true,
"lastShownAt": 1742365155724
},
"isOnboarded": true
},
"role": "global:owner",
"disabled": false,
"mfaEnabled": false,
"isPending": false,
"isOwner": true
}
}
]
}
}
],
"tags": []
}
\ No newline at end of file
This diff is collapsed.
{
"createdAt": "2025-05-12T07:57:59.471Z",
"updatedAt": "2025-06-22T04:28:30.000Z",
"id": "tOFAJrJIdWyFzICZ",
"name": "report_news_is_exists",
"active": true,
"nodes": [
{
"parameters": {
"operation": "executeQuery",
"query": "select IFNULL(count(id), 0) as count from {{JSON.parse($json.body.info).table_name}} where news_uid ={{JSON.stringify(JSON.parse($json.body.info).id) }};\n",
"options": {}
},
"id": "d594a15f-4f16-491d-a599-cdd4f43daf9d",
"name": "is_exists_news",
"type": "n8n-nodes-base.mySql",
"typeVersion": 2.4,
"position": [
1040,
360
],
"alwaysOutputData": false,
"credentials": {
"mySql": {
"id": "YpVIiGwzmmkf7vR7",
"name": "SL-DB-PRD"
}
}
},
{
"parameters": {
"httpMethod": "POST",
"path": "report/isexistsbyid",
"authentication": "headerAuth",
"responseMode": "lastNode",
"options": {
"allowedOrigins": "*",
"rawBody": false
}
},
"id": "03ef4ef5-8a95-44df-b31e-4c9791b60b74",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
780,
360
],
"webhookId": "e495a29c-8f43-4175-bdb8-277e03b60b07",
"credentials": {
"httpHeaderAuth": {
"id": "U87Wvnvu9oQ5Zapo",
"name": "Header Auth account"
}
}
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "is_exists_news",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"pinData": {},
"versionId": "73bb79b2-2034-452b-b983-97de2d0ca644",
"triggerCount": 1,
"shared": [
{
"createdAt": "2025-05-12T07:57:59.485Z",
"updatedAt": "2025-05-12T07:57:59.485Z",
"role": "workflow:owner",
"workflowId": "tOFAJrJIdWyFzICZ",
"projectId": "C7zKoCDdmGgzUqSW",
"project": {
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:41:43.608Z",
"id": "C7zKoCDdmGgzUqSW",
"name": "周 卫 <zhouwei@ssish.com>",
"type": "personal",
"projectRelations": [
{
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:31:21.275Z",
"role": "project:personalOwner",
"userId": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"projectId": "C7zKoCDdmGgzUqSW",
"user": {
"createdAt": "2024-08-23T06:31:16.119Z",
"updatedAt": "2025-03-19T06:19:26.514Z",
"id": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"email": "zhouwei@ssish.com",
"firstName": "周",
"lastName": "卫",
"personalizationAnswers": {
"companyType": "education",
"role": "business-owner",
"automationBeneficiary": "my-team",
"companySize": "20-99",
"reportedSource": "friend",
"version": "v4",
"personalization_survey_submitted_at": "2024-08-23T06:57:52.856Z",
"personalization_survey_n8n_version": "1.55.3"
},
"settings": {
"userActivated": true,
"firstSuccessfulWorkflowId": "s6zsznwVs6N4L2Hx",
"userActivatedAt": 1725957335278,
"npsSurvey": {
"responded": true,
"lastShownAt": 1742365155724
},
"isOnboarded": true
},
"role": "global:owner",
"disabled": false,
"mfaEnabled": false,
"isPending": false,
"isOwner": true
}
}
]
}
}
],
"tags": []
}
\ No newline at end of file
{
"createdAt": "2025-07-21T02:34:58.955Z",
"updatedAt": "2025-07-23T07:13:45.000Z",
"id": "JBACXzRYBxqJc14O",
"name": "save_earthquake_data",
"active": true,
"nodes": [
{
"parameters": {
"operation": "executeQuery",
"query": "START TRANSACTION;\n\nINSERT INTO earthquake_mapping (zone,title,mag,place,event_time,url,detail,mmi,alert,status,tsunami,sig,code,nst,dmin,rms,gap,magType) VALUES {{ $json.earthquake_data }};\n\nCOMMIT;",
"options": {
"detailedOutput": false
}
},
"id": "72be391f-a013-4a59-bb3a-e5da88be2f88",
"name": "insert_safe",
"type": "n8n-nodes-base.mySql",
"typeVersion": 2.4,
"position": [
720,
300
],
"credentials": {
"mySql": {
"id": "09oRI0DULmEzD9l8",
"name": "SL-DB"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"id": "37fd1a36-8c69-4438-8fdc-6181956dfae3",
"leftValue": "={{ $json.source_num.toString()}}",
"rightValue": "0",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "42e3ce8d-43db-4203-ad26-127428cbd5b4",
"name": "If_1",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
140,
420
]
},
{
"parameters": {
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\noutput_all_data = {};\noutput_all = [];\noutput_all_data['is_save'] = '1';\noutput_all.push(output_all_data);\nreturn output_all;"
},
"id": "7441f842-2726-4f3c-80fb-fcd045e8b49a",
"name": "return_save_flag",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
940,
300
]
},
{
"parameters": {
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\noutput_all_data = {};\noutput_all = [];\noutput_all_data['is_save'] = '0';\noutput_all.push(output_all_data);\nreturn output_all;"
},
"id": "646995ad-c277-449b-879b-5547507a6a63",
"name": "return_save_flag2",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
460,
500
]
},
{
"parameters": {
"httpMethod": "POST",
"path": "earthquake/save",
"authentication": "headerAuth",
"responseMode": "lastNode",
"options": {
"allowedOrigins": "*",
"rawBody": false
}
},
"id": "081b0ac4-9c96-466e-9576-8728e09655c3",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
-260,
420
],
"webhookId": "e495a29c-8f43-4175-bdb8-277e03b60b07",
"credentials": {
"httpHeaderAuth": {
"id": "U87Wvnvu9oQ5Zapo",
"name": "Header Auth account"
}
}
},
{
"parameters": {
"operation": "executeQuery",
"query": "select IFNULL(count(id), 0) as source_num from earthquake_mapping cm where cm.code ={{JSON.stringify(JSON.parse($json.body.info).code)}};\n\n",
"options": {}
},
"id": "f233f48b-69a1-4517-a5c4-2ee6c3068ce7",
"name": "is_exist",
"type": "n8n-nodes-base.mySql",
"typeVersion": 2.4,
"position": [
-60,
420
],
"credentials": {
"mySql": {
"id": "09oRI0DULmEzD9l8",
"name": "SL-DB"
}
}
},
{
"parameters": {
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nfunction isEmptyString(value) {\n // 方法1: 直接检查是否为空字符串或null\n if (!value || value.trim() === '') {\n return true;\n }\n return false;\n};\ninfo_data_list = JSON.parse($('Webhook').item.json.body.info);\noutput_all = [];\noutput_all_data = {};\noutput_news_data_str = \"\";\nnews_item_data = \"\";\nnews_item_data = news_item_data+\"(\";\nnews_item_data += \"'\"+info_data_list.zone+\"'\";\nnews_item_data += ',';\nnews_item_data += '\"'+info_data_list.title+'\"';\nnews_item_data += ',';\nnews_item_data += '\"'+info_data_list.mag+'\"';\nnews_item_data += ',';\nnews_item_data += '\"'+info_data_list.place+'\"';\nnews_item_data += ',';\nif(!isEmptyString(info_data_list.event_time)){\n news_item_data += 'STR_TO_DATE(\"'+info_data_list.event_time+'\",\"%Y-%m-%d %H:%i:%s\")';\n news_item_data += ',';\n}else{\n news_item_data += 'STR_TO_DATE(NOW(),\"%Y-%m-%d %H:%i:%s\")';\n news_item_data += ',';\n};\nnews_item_data += '\"'+info_data_list.url+'\"';\nnews_item_data += ',';\nnews_item_data += '\"'+info_data_list.detail+'\"';\nnews_item_data += ',';\nnews_item_data += \"'\"+info_data_list.mmi+\"'\";\nnews_item_data += ',';\nnews_item_data += '\"'+info_data_list.alert+'\"';\nnews_item_data += ',';\nnews_item_data += '\"'+info_data_list.status+'\"';\nnews_item_data += ',';\nnews_item_data += '\"'+info_data_list.tsunami+'\"';\nnews_item_data += ',';\nnews_item_data += '\"'+info_data_list.sig+'\"';\nnews_item_data += ',';\nnews_item_data += '\"'+info_data_list.code+'\"';\nnews_item_data += ',';\nnews_item_data += '\"'+info_data_list.nst+'\"';\nnews_item_data += ',';\nnews_item_data += '\"'+info_data_list.dmin+'\"';\nnews_item_data += ',';\nnews_item_data += '\"'+info_data_list.rms+'\"';\nnews_item_data += ',';\nnews_item_data += '\"'+info_data_list.gap+'\"';\nnews_item_data += ',';\nnews_item_data += '\"'+info_data_list.magType+'\"';\nnews_item_data += ')';\noutput_all_data['earthquake_data'] = news_item_data;\noutput_all.push(output_all_data);\nreturn output_all;"
},
"id": "f539dc9b-18ca-4cec-9ae9-c38f5f604a90",
"name": "get_earthquake_sql",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
460,
300
]
}
],
"connections": {
"insert_safe": {
"main": [
[
{
"node": "return_save_flag",
"type": "main",
"index": 0
}
]
]
},
"If_1": {
"main": [
[
{
"node": "get_earthquake_sql",
"type": "main",
"index": 0
}
],
[
{
"node": "return_save_flag2",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "is_exist",
"type": "main",
"index": 0
}
]
]
},
"is_exist": {
"main": [
[
{
"node": "If_1",
"type": "main",
"index": 0
}
]
]
},
"get_earthquake_sql": {
"main": [
[
{
"node": "insert_safe",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"pinData": {},
"versionId": "81dec0dc-74fc-4456-af98-deff009c4333",
"triggerCount": 1,
"shared": [
{
"createdAt": "2025-07-21T02:34:58.967Z",
"updatedAt": "2025-07-21T02:34:58.967Z",
"role": "workflow:owner",
"workflowId": "JBACXzRYBxqJc14O",
"projectId": "C7zKoCDdmGgzUqSW",
"project": {
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:41:43.608Z",
"id": "C7zKoCDdmGgzUqSW",
"name": "周 卫 <zhouwei@ssish.com>",
"type": "personal",
"projectRelations": [
{
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:31:21.275Z",
"role": "project:personalOwner",
"userId": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"projectId": "C7zKoCDdmGgzUqSW",
"user": {
"createdAt": "2024-08-23T06:31:16.119Z",
"updatedAt": "2025-03-19T06:19:26.514Z",
"id": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"email": "zhouwei@ssish.com",
"firstName": "周",
"lastName": "卫",
"personalizationAnswers": {
"companyType": "education",
"role": "business-owner",
"automationBeneficiary": "my-team",
"companySize": "20-99",
"reportedSource": "friend",
"version": "v4",
"personalization_survey_submitted_at": "2024-08-23T06:57:52.856Z",
"personalization_survey_n8n_version": "1.55.3"
},
"settings": {
"userActivated": true,
"firstSuccessfulWorkflowId": "s6zsznwVs6N4L2Hx",
"userActivatedAt": 1725957335278,
"npsSurvey": {
"responded": true,
"lastShownAt": 1742365155724
},
"isOnboarded": true
},
"role": "global:owner",
"disabled": false,
"mfaEnabled": false,
"isPending": false,
"isOwner": true
}
}
]
}
}
],
"tags": []
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{
"createdAt": "2025-06-05T07:44:46.396Z",
"updatedAt": "2025-06-05T07:45:06.000Z",
"id": "4HGzwg4YOLxSqGnx",
"name": "test_is_exists_news",
"active": true,
"nodes": [
{
"parameters": {
"operation": "executeQuery",
"query": "select IFNULL(count(id), 0) as count from news_source where news_uid ={{JSON.stringify(JSON.parse($json.body.info).id) }};\n",
"options": {}
},
"id": "d1d4410d-b8db-44a9-90c1-6e026242a749",
"name": "is_exists_news",
"type": "n8n-nodes-base.mySql",
"typeVersion": 2.4,
"position": [
880,
400
],
"alwaysOutputData": false,
"credentials": {
"mySql": {
"id": "09oRI0DULmEzD9l8",
"name": "SL-DB"
}
}
},
{
"parameters": {
"httpMethod": "POST",
"path": "twitter/isexistsbyid/test",
"authentication": "headerAuth",
"responseMode": "lastNode",
"options": {
"allowedOrigins": "*",
"rawBody": false
}
},
"id": "d40d3dc8-89f2-4516-8c34-dd3bf456903e",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
620,
400
],
"webhookId": "e495a29c-8f43-4175-bdb8-277e03b60b07",
"credentials": {
"httpHeaderAuth": {
"id": "U87Wvnvu9oQ5Zapo",
"name": "Header Auth account"
}
}
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "is_exists_news",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"pinData": {},
"versionId": "8ebaa2a8-845c-44d4-b64a-cae15d7608e8",
"triggerCount": 1,
"shared": [
{
"createdAt": "2025-06-05T07:44:46.408Z",
"updatedAt": "2025-06-05T07:44:46.408Z",
"role": "workflow:owner",
"workflowId": "4HGzwg4YOLxSqGnx",
"projectId": "C7zKoCDdmGgzUqSW",
"project": {
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:41:43.608Z",
"id": "C7zKoCDdmGgzUqSW",
"name": "周 卫 <zhouwei@ssish.com>",
"type": "personal",
"projectRelations": [
{
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:31:21.275Z",
"role": "project:personalOwner",
"userId": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"projectId": "C7zKoCDdmGgzUqSW",
"user": {
"createdAt": "2024-08-23T06:31:16.119Z",
"updatedAt": "2025-03-19T06:19:26.514Z",
"id": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"email": "zhouwei@ssish.com",
"firstName": "周",
"lastName": "卫",
"personalizationAnswers": {
"companyType": "education",
"role": "business-owner",
"automationBeneficiary": "my-team",
"companySize": "20-99",
"reportedSource": "friend",
"version": "v4",
"personalization_survey_submitted_at": "2024-08-23T06:57:52.856Z",
"personalization_survey_n8n_version": "1.55.3"
},
"settings": {
"userActivated": true,
"firstSuccessfulWorkflowId": "s6zsznwVs6N4L2Hx",
"userActivatedAt": 1725957335278,
"npsSurvey": {
"responded": true,
"lastShownAt": 1742365155724
},
"isOnboarded": true
},
"role": "global:owner",
"disabled": false,
"mfaEnabled": false,
"isPending": false,
"isOwner": true
}
}
]
}
}
],
"tags": []
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
{
"createdAt": "2025-07-23T08:04:14.491Z",
"updatedAt": "2025-07-23T08:04:58.000Z",
"id": "gBv5NN0LfW1BTyBM",
"name": "test_report_news_is_exists",
"active": true,
"nodes": [
{
"parameters": {
"operation": "executeQuery",
"query": "select IFNULL(count(id), 0) as count from {{JSON.parse($json.body.info).table_name}} where news_uid ={{JSON.stringify(JSON.parse($json.body.info).id) }};\n",
"options": {}
},
"id": "d8326fed-9f20-4121-99cd-a84f96cc1ae7",
"name": "is_exists_news",
"type": "n8n-nodes-base.mySql",
"typeVersion": 2.4,
"position": [
1040,
360
],
"alwaysOutputData": false,
"credentials": {
"mySql": {
"id": "09oRI0DULmEzD9l8",
"name": "SL-DB"
}
}
},
{
"parameters": {
"httpMethod": "POST",
"path": "report/isexistsbyid/test",
"authentication": "headerAuth",
"responseMode": "lastNode",
"options": {
"allowedOrigins": "*",
"rawBody": false
}
},
"id": "3764e57b-9dee-4cf8-ad98-a0ddccc3ef6b",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
780,
360
],
"webhookId": "807e1bd2-7166-4456-af53-bc3fea336fdc",
"credentials": {
"httpHeaderAuth": {
"id": "U87Wvnvu9oQ5Zapo",
"name": "Header Auth account"
}
}
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "is_exists_news",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"pinData": {},
"versionId": "91f6e129-ac7d-428f-ae53-e582b4d8edf5",
"triggerCount": 1,
"shared": [
{
"createdAt": "2025-07-23T08:04:14.499Z",
"updatedAt": "2025-07-23T08:04:14.499Z",
"role": "workflow:owner",
"workflowId": "gBv5NN0LfW1BTyBM",
"projectId": "C7zKoCDdmGgzUqSW",
"project": {
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:41:43.608Z",
"id": "C7zKoCDdmGgzUqSW",
"name": "周 卫 <zhouwei@ssish.com>",
"type": "personal",
"projectRelations": [
{
"createdAt": "2024-08-23T06:31:21.275Z",
"updatedAt": "2024-08-23T06:31:21.275Z",
"role": "project:personalOwner",
"userId": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"projectId": "C7zKoCDdmGgzUqSW",
"user": {
"createdAt": "2024-08-23T06:31:16.119Z",
"updatedAt": "2025-03-19T06:19:26.514Z",
"id": "3f0021b4-d0a7-4db6-af21-5ef829c47882",
"email": "zhouwei@ssish.com",
"firstName": "周",
"lastName": "卫",
"personalizationAnswers": {
"companyType": "education",
"role": "business-owner",
"automationBeneficiary": "my-team",
"companySize": "20-99",
"reportedSource": "friend",
"version": "v4",
"personalization_survey_submitted_at": "2024-08-23T06:57:52.856Z",
"personalization_survey_n8n_version": "1.55.3"
},
"settings": {
"userActivated": true,
"firstSuccessfulWorkflowId": "s6zsznwVs6N4L2Hx",
"userActivatedAt": 1725957335278,
"npsSurvey": {
"responded": true,
"lastShownAt": 1742365155724
},
"isOnboarded": true
},
"role": "global:owner",
"disabled": false,
"mfaEnabled": false,
"isPending": false,
"isOwner": true
}
}
]
}
}
],
"tags": []
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment