Commit 510e901c authored by 马超's avatar 马超

Upload New File

parent 771b0441
{
"createdAt": "2025-02-13T05:36:08.382Z",
"updatedAt": "2025-02-13T05:36:19.000Z",
"id": "bk8jytHJxIiEJZJN",
"name": "update-twitter",
"active": true,
"nodes": [
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"id": "a1541edc-9637-4ac2-83a6-902ee9d29af6",
"leftValue": "={{ $json.count.toString() }}",
"rightValue": "=0",
"operator": {
"type": "string",
"operation": "equals"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "8b39a311-a36b-48bb-9eac-062957839b7d",
"name": "insert_or_update",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
-400,
900
]
},
{
"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": "d6aaa8cc-c453-416f-86af-23e508e9a85f",
"name": "is_exists_news",
"type": "n8n-nodes-base.mySql",
"typeVersion": 2.4,
"position": [
-640,
900
],
"alwaysOutputData": false,
"credentials": {
"mySql": {
"id": "YpVIiGwzmmkf7vR7",
"name": "SL-DB-PRD"
}
}
},
{
"parameters": {
"httpMethod": "POST",
"path": "twitter/update",
"authentication": "headerAuth",
"options": {
"allowedOrigins": "*",
"rawBody": false
}
},
"id": "1e91e2e1-ffbb-40d7-b2f8-e42c2cb09b68",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
-900,
900
],
"webhookId": "e495a29c-8f43-4175-bdb8-277e03b60b07",
"credentials": {
"httpHeaderAuth": {
"id": "1fHtEpWRIg2mFYBe",
"name": "Header Auth account"
}
}
},
{
"parameters": {
"operation": "executeQuery",
"query": "update news_source set likes = {{ JSON.parse( $('Webhook').item.json.body.info).favourite_count }} ,forward = {{ JSON.parse( $('Webhook').item.json.body.info).retweet_count }},hot = {{ JSON.parse( $('Webhook').item.json.body.info).view_count }} where news_uid = {{ JSON.stringify(JSON.parse( $('Webhook').item.json.body.info).id) }}\n",
"options": {}
},
"id": "90f5d164-5bad-4f66-a280-9b033773d309",
"name": "update_news",
"type": "n8n-nodes-base.mySql",
"typeVersion": 2.4,
"position": [
-20,
900
],
"credentials": {
"mySql": {
"id": "YpVIiGwzmmkf7vR7",
"name": "SL-DB-PRD"
}
}
}
],
"connections": {
"insert_or_update": {
"main": [
[
{
"node": "update_news",
"type": "main",
"index": 0
}
]
]
},
"is_exists_news": {
"main": [
[
{
"node": "insert_or_update",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "is_exists_news",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"meta": null,
"pinData": null,
"versionId": "f68481c0-5950-4b12-9259-1c5e618ac825",
"triggerCount": 1,
"shared": [
{
"createdAt": "2025-02-13T05:36:08.395Z",
"updatedAt": "2025-02-13T05:36:08.395Z",
"role": "workflow:owner",
"workflowId": "bk8jytHJxIiEJZJN",
"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
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