8
n8n 中文网amn8n.com

特朗普指数计算模板

中级

这是一个Crypto Trading, AI Summarization领域的自动化工作流,包含 11 个节点。主要使用 Slack, Airtop, Filter, SplitOut, ManualTrigger 等节点。 使用Airtop和Slack提取并分析Truth Social帖子对股市的影响

前置要求
  • Slack Bot Token 或 Webhook URL
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "puzC1akjHG3456ue",
  "meta": {
    "instanceId": "28a947b92b197fc2524eaba16e57560338657b2b0b5796300b2f1cedc1d0d355",
    "templateCredsSetupCompleted": true
  },
  "name": "特朗普指数计模板",
  "tags": [],
  "nodes": [
    {
      "id": "238f0e0a-71ca-4434-b481-da683df58312",
      "name": "当点击“执行工作流”时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -440,
        -380
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "e8c37340-3fb4-4f4c-841e-7eade92e3c75",
      "name": "过滤器",
      "type": "n8n-nodes-base.filter",
      "position": [
        660,
        -380
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "409837cd-d016-4473-9c6d-84f8c7483fb0",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.post_text }}",
              "rightValue": "None"
            },
            {
              "id": "08272483-deba-4d06-a66c-c50cfabb710f",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.stock_market_impact.magnitude }}",
              "rightValue": "None"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "aa96b4a4-b93c-4e01-82f7-672d853b41f0",
      "name": "Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        880,
        -380
      ],
      "webhookId": "d2351a3b-b7a9-44d6-ba2a-8b0444773945",
      "parameters": {
        "text": "={{ $json.post_text }}\n\nPotential impact on the stock market: {{ $json.stock_market_impact.magnitude }}, {{ $json.stock_market_impact.direction }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C08E83RDJN9",
          "cachedResultName": "n8n-debug"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "id": "SDxCef2uzWkOV8Q2",
          "name": "Slack account 3"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "2752a716-65ad-45cc-a373-fa001713b172",
      "name": "分离输出",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        440,
        -380
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "output.posts"
      },
      "typeVersion": 1
    },
    {
      "id": "5a8967f1-8dd7-411f-9c1e-e5846b204b3b",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1540,
        -720
      ],
      "parameters": {
        "color": 5,
        "width": 1040,
        "height": 1300,
        "content": "README"
      },
      "typeVersion": 1
    },
    {
      "id": "84cd624a-39f0-4318-8277-5b708814057b",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -440,
        -180
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "39dd927f-d163-4d55-896b-73051714c9d0",
      "name": "提取和分析帖子",
      "type": "n8n-nodes-base.airtop",
      "position": [
        220,
        -280
      ],
      "parameters": {
        "prompt": "This is Truth Social. \nExtract up to 6 posts from @realDonaldTrump. \nFor each post, extract the name of the author, the image URL, the text and the URL.\n\nAlso try to estimate the potential impact of each post on the public stock market in the US:\nDirection - positive, negative, or neutral\nMagnitude - None, Small, Medium or Large",
        "resource": "extraction",
        "additionalFields": {
          "outputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"posts\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"author_name\": {\n            \"type\": \"string\",\n            \"description\": \"The name of the author of the post.\"\n          },\n          \"image_url\": {\n            \"type\": \"string\",\n            \"description\": \"The URL of the image associated with the post.\"\n          },\n          \"post_text\": {\n            \"type\": \"string\",\n            \"description\": \"The text content of the post.\"\n          },\n          \"post_url\": {\n            \"type\": \"string\",\n            \"description\": \"The URL of the post.\"\n          },\n          \"stock_market_impact\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"direction\": {\n                \"type\": \"string\",\n                \"description\": \"The estimated direction of the post's impact on the US stock market.\"\n              },\n              \"magnitude\": {\n                \"type\": \"string\",\n                \"description\": \"The estimated magnitude of the post's impact on the US stock market.\"\n              }\n            },\n            \"required\": [\n              \"direction\",\n              \"magnitude\"\n            ],\n            \"additionalProperties\": false\n          }\n        },\n        \"required\": [\n          \"author_name\",\n          \"image_url\",\n          \"post_text\",\n          \"post_url\",\n          \"stock_market_impact\"\n        ],\n        \"additionalProperties\": false\n      }\n    }\n  },\n  \"required\": [\n    \"posts\"\n  ],\n  \"additionalProperties\": false,\n  \"$schema\": \"http://json-schema.org/draft-07/schema#\"\n}",
          "parseJsonOutput": true
        }
      },
      "credentials": {
        "airtopApi": {
          "id": "Yi4YPNnovLVUjFn5",
          "name": "Airtop Official Org"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a2055437-8c3b-4104-a1c1-dc3ee59044b4",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -260,
        -420
      ],
      "parameters": {
        "width": 200,
        "height": 320,
        "content": "## 在此输入 Airtop 配置文件名称"
      },
      "typeVersion": 1
    },
    {
      "id": "3da92d0a-c837-4625-8b56-669dd79b88ba",
      "name": "创建 Airtop 会话",
      "type": "n8n-nodes-base.airtop",
      "position": [
        -220,
        -280
      ],
      "parameters": {
        "proxy": "integrated",
        "profileName": "ENTER AIRTOP PROFILE NAME",
        "proxyConfig": {
          "sticky": true,
          "country": "US"
        },
        "additionalFields": {}
      },
      "credentials": {
        "airtopApi": {
          "id": "Yi4YPNnovLVUjFn5",
          "name": "Airtop Official Org"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "03bca384-9f71-449f-9662-415b7582bfa8",
      "name": "创建 Airtop 浏览器",
      "type": "n8n-nodes-base.airtop",
      "position": [
        0,
        -280
      ],
      "parameters": {
        "url": "https://truthsocial.com/@realDonaldTrump",
        "resource": "window",
        "additionalFields": {
          "waitUntil": "load"
        }
      },
      "credentials": {
        "airtopApi": {
          "id": "Yi4YPNnovLVUjFn5",
          "name": "Airtop Official Org"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "44dcc003-1804-45df-bf62-d819b58026d3",
      "name": "终止 Airtop 会话",
      "type": "n8n-nodes-base.airtop",
      "position": [
        440,
        -180
      ],
      "parameters": {
        "operation": "terminate",
        "sessionId": "={{ $('Create Airtop Session').item.json.sessionId }}"
      },
      "credentials": {
        "airtopApi": {
          "id": "Yi4YPNnovLVUjFn5",
          "name": "Airtop Official Org"
        }
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "991b1f4e-1f4a-4b40-b63e-6151cbccad90",
  "connections": {
    "Slack": {
      "main": [
        []
      ]
    },
    "Filter": {
      "main": [
        [
          {
            "node": "Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Create Airtop Session",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Airtop Browser": {
      "main": [
        [
          {
            "node": "Extract and Analyze Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Airtop Session": {
      "main": [
        [
          {
            "node": "Create Airtop Browser",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract and Analyze Posts": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          },
          {
            "node": "Terminate Airtop Session",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Create Airtop Session",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 加密货币交易, AI 摘要总结

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量11
分类2
节点类型7
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者

Airtop provides an intelligent browser automation API for AI agents, enabling seamless web interaction, including login, navigation, and data extraction from any site, even those with complex authentication - all with natural language instructions.In simple terms, we allow you to automate anything humans can do online, on any site with just words

外部链接
在 n8n.io 查看

分享此工作流