股票情绪分析
中级
这是一个AI领域的自动化工作流,包含 7 个节点。主要使用 DateTimeTool, Agent, ChatTrigger, ToolSearXng, LmChatGoogleGemini 等节点,结合人工智能技术实现智能自动化。 使用Gemini和SearXNG进行新闻研究和情感分析的AI代理
前置要求
- •Google Gemini API Key
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "1MSUwpnR1sroIquE",
"meta": {
"instanceId": "69133932b9ba8e1ef14816d0b63297bb44feb97c19f759b5d153ff6b0c59e18d",
"templateCredsSetupCompleted": true
},
"name": "股票情绪分析",
"tags": [],
"nodes": [
{
"id": "3a8dc8ac-01fb-4619-9193-238b44502f6f",
"name": "当收到聊天消息时",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
100,
-40
],
"webhookId": "f5961754-ee99-49c0-819d-a50ce2daa5a6",
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "524ce176-1dfd-49ab-9141-ef5f23ac4823",
"name": "获取当前日期",
"type": "n8n-nodes-base.dateTimeTool",
"position": [
720,
220
],
"parameters": {
"options": {},
"descriptionType": "manual",
"toolDescription": "use this tool to find out the current date and time."
},
"typeVersion": 2
},
{
"id": "b34db507-28b6-4336-8d49-19c5d9677596",
"name": "网络搜索",
"type": "@n8n/n8n-nodes-langchain.toolSearXng",
"position": [
540,
220
],
"parameters": {
"options": {
"language": "en"
}
},
"credentials": {
"searXngApi": {
"id": "4cAQXGGcZt1s4VYp",
"name": "SearXNG account"
}
},
"typeVersion": 1
},
{
"id": "7dcc25ea-62dc-4e9b-a3ca-3261c3bb2e82",
"name": "研究 Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
360,
-40
],
"parameters": {
"options": {
"systemMessage": "You are a financial research assistant. Your task is to find and summarize the latest news for a given company name or stock ticker.\n\nInstructions:\n\nFirst, use the get_current_date tool to determine the date range for the last 7 days.\nPerform two separate web searches using the web_search tool: one with the company's full name and one with its stock ticker. Use the date range in your search queries to filter for news from the last week only.\n\nAfter reviewing the search results, provide a summary of each news article. The summary should cover the key events, announcements, and market sentiment discussed in the articles.\n"
}
},
"typeVersion": 2
},
{
"id": "955e2558-50e8-4619-87fd-f63c2a6d4171",
"name": "情绪分析 Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
760,
-40
],
"parameters": {
"text": "=User asked about: {{ $('When chat message received').item.json.chatInput }}\n\nLatest news:\n {{ $json.output }}\n",
"options": {
"systemMessage": "You are a Financial Sentiment Analyst. You will be provided with a news summary. Your task is to analyze this summary and categorize its sentiment from an investor's perspective.\n\nInstructions:\n1. Read all the news.\n2. Determine the overall sentiment (Positive, Negative, or Neutral) based on the potential impact on the company's financial performance, stock price, or market reputation.\n3. Write a justification that references specific points from the news summaries.\n\nOutput Format:\nSentiment: {sentiment_category}\nJustification: {Your detailed justification}"
},
"promptType": "define"
},
"typeVersion": 2
},
{
"id": "1f875bfc-5a26-4a40-974f-56991ce695f4",
"name": "Gemini 2.5 Flash",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
340,
220
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.5-flash"
},
"credentials": {
"googlePalmApi": {
"id": "jLOqyTR4yTT1nYKi",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "4cb25891-5df9-4949-b46c-116b17918148",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-400,
-160
],
"parameters": {
"width": 380,
"height": 520,
"content": "## **设置步骤**"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "51d9d96d-7aa1-4202-875c-05b52ca675a5",
"connections": {
"web_search": {
"ai_tool": [
[
{
"node": "Research Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Research Agent": {
"main": [
[
{
"node": "Sentiment Analysis Agent",
"type": "main",
"index": 0
}
]
]
},
"Gemini 2.5 Flash": {
"ai_languageModel": [
[
{
"node": "Sentiment Analysis Agent",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Research Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"get_current_date": {
"ai_tool": [
[
{
"node": "Research Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "Research Agent",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 人工智能
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
研究型 AI Agent:抓取并总结文章并保存到 Notion(Gemini、Browserless)
AI智能助手:抓取、总结文章并保存至Notion(Gemini,Browserless)
Notion Tool
Discord Tool
Agent
+4
9 节点Mihai Farcas
其他
用于存储在Google Drive中的公司文档的RAG工作流
使用Google Drive和Gemini的公司文档RAG聊天机器人
Google Drive
Agent
Google Drive Trigger
+9
18 节点Mihai Farcas
人工智能
用于股票财报分析的RAG工作流
用于股票财报分析的AI驱动RAG工作流
Google Docs
Google Drive
Google Sheets
+11
18 节点Mihai Farcas
人工智能
使用RAG(Pinecone和OpenAI)与GitHub OpenAPI规范对话
与GitHub API文档对话:基于RAG的聊天机器人,使用Pinecone和OpenAI
Http Request
Manual Trigger
Agent
+9
17 节点Mihai Farcas
工程
使用n8n和Ollama与本地LLM对话
使用n8n和Ollama与本地大语言模型对话
Chain Llm
Chat Trigger
Lm Chat Ollama
+1
5 节点Mihai Farcas
人工智能
⚡AI驱动的YouTube播放列表和视频摘要与分析v2
AI YouTube播放列表与视频分析聊天机器人
If
Set
Code
+20
72 节点dmr
其他
工作流信息
难度等级
中级
节点数量7
分类1
节点类型6
作者
Mihai Farcas
@mihailtdFull-stack developer with 5+ years streamlining healthcare processes. Proficient in NodeJS, VueJS, MongoDB, PostgreSQL, Kubernetes, and n8n. Ready to optimize your workflows – book a consult via my link.
外部链接
在 n8n.io 查看 →
分享此工作流