每日UPSC时事分析
高级
这是一个自动化工作流,包含 20 个节点。主要使用 Code, Html, HttpRequest, GoogleSheets, ManualTrigger 等节点。 从The Hindu自动提取UPSC时事摘要到Google Sheets,使用Gemini AI
前置要求
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
- •Google Gemini API Key
使用的节点 (20)
分类
-
工作流预览
可视化展示节点连接关系,支持缩放和平移
无法加载工作流预览
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"name": "Daily UPSC Current Affairs Analysis from The Hindu to Google Sheets",
"tags": [],
"nodes": [
{
"name": "当点击\"执行工作流\"时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-64,
160
],
"parameters": {},
"typeVersion": 1
},
{
"name": "HTTP Request: Get The Hindu Front Page",
"type": "n8n-nodes-base.httpRequest",
"position": [
272,
16
],
"parameters": {
"url": "https://www.thehindu.com/latest-news/",
"options": {},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "User-Agent",
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
}
]
}
},
"typeVersion": 4.2
},
{
"name": "AI Agent: Filter & Analyze UPSC News",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1616,
16
],
"parameters": {
"text": "=Please analyze only those news article which is important for upsc exam (left others) (Only 5-6 most important article needed.) and provide the following information in a structured JSON format.\nOnly 5-6 most important article needed.\n\nArticle URL: {{ $('Code in JavaScript: Pair URL & Title').item.json.url }}\nArticle Content:\n{{ $json.articleText }}\n\nBased on the content, provide:\n1. A brief summary (2-3 sentences).\n2. What is important for the UPSC exam (1 sentence).\n3. The main subject (e.g., Polity, Economy, International Relations, Science & Tech, Environment).\n\nUpload on the google sheet in following columns:\nDate;\tURL;\tSubject;\tBrief Summary;\tWhat is Important",
"options": {
"systemMessage": "You are an AI expert in Current Affairs analysis for the UPSC Civil Services Examination. Your task is to filter, analyze, and summarize news articles from The Hindu based *strictly* on their relevance to the official UPSC syllabus (GS Papers I, II, III, IV) and Current Affairs. For every article provided, you must first assess its importance. If it is not one of the *top 5-6 most important* articles, output a rejection statement and do not call the Append tool. If it is relevant, call the Append tool with the extracted and analyzed data.",
"returnIntermediateSteps": true
},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"name": "Google Gemini 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
1600,
160
],
"parameters": {
"options": {}
},
"credentials": {},
"typeVersion": 1
},
{
"name": "HTML: Extract Article Links & Titles",
"type": "n8n-nodes-base.html",
"position": [
512,
16
],
"parameters": {
"options": {},
"operation": "extractHtmlContent",
"extractionValues": {
"values": [
{
"key": "url",
"attribute": "href",
"cssSelector": "h3.title > a",
"returnArray": true,
"returnValue": "attribute"
},
{
"key": "title",
"cssSelector": "h3.title > a",
"returnArray": true
}
]
}
},
"typeVersion": 1.2
},
{
"name": "HTTP Request1: Get Full Article Content",
"type": "n8n-nodes-base.httpRequest",
"position": [
1104,
16
],
"parameters": {
"url": "={{ $json.url }}",
"options": {},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "User-Agent",
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
}
]
}
},
"typeVersion": 4.2
},
{
"name": "HTML1: Extract Article Body",
"type": "n8n-nodes-base.html",
"position": [
1376,
16
],
"parameters": {
"options": {},
"operation": "extractHtmlContent",
"extractionValues": {
"values": [
{
"key": "articleText",
"cssSelector": "div[id^=\"content-body-\"]"
}
]
}
},
"typeVersion": 1.2
},
{
"name": "在表格中追加行",
"type": "n8n-nodes-base.googleSheets",
"position": [
1920,
16
],
"parameters": {
"columns": {
"value": {
"URL": "={{ $json.intermediateSteps[0].action.toolInput.URL || $json.URL }}",
"Date": "={{ $json.intermediateSteps[0].action.toolInput.Date || $json.Date }}",
"Subject": "={{ $json.intermediateSteps[0].action.toolInput.Subject || $json.Subject }}",
"Brief Summary": "={{ $json.intermediateSteps[0].action.toolInput.Brief_Summary || $json['Brief Summary'] }}",
"What is Important": "={{ $json.intermediateSteps[0].action.toolInput.What_is_Important || $json['What is Important'] }}"
},
"schema": [
{
"id": "Date",
"type": "string",
"display": true,
"required": false,
"displayName": "Date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "URL",
"type": "string",
"display": true,
"required": false,
"displayName": "URL",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Subject",
"type": "string",
"display": true,
"required": false,
"displayName": "Subject",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Brief Summary",
"type": "string",
"display": true,
"required": false,
"displayName": "Brief Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "What is Important",
"type": "string",
"display": true,
"required": false,
"displayName": "What is Important",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "<GOOGLE_SHEET_GID_UPSC_NEWS>",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/<GOOGLE_SHEET_ID_UPSC_NEWS>/edit#gid=<GOOGLE_SHEET_GID_UPSC_NEWS>",
"cachedResultName": "UPSC Hindu News"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "<GOOGLE_SHEET_ID_UPSC_NEWS>",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/<GOOGLE_SHEET_ID_UPSC_NEWS>/edit?usp=drivesdk",
"cachedResultName": "Untitled spreadsheet"
}
},
"credentials": {},
"typeVersion": 4.7
},
{
"name": "Append row in sheet in Google Sheets1",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
1776,
160
],
"parameters": {
"columns": {
"value": {
"URL": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', ``, 'string') }}",
"Date": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Date', ``, 'string') }}",
"Subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', ``, 'string') }}",
"Brief Summary": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Brief_Summary', ``, 'string') }}",
"What is Important": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('What_is_Important', ``, 'string') }}"
},
"schema": [
{
"id": "Date",
"type": "string",
"display": true,
"required": false,
"displayName": "Date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "URL",
"type": "string",
"display": true,
"required": false,
"displayName": "URL",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Subject",
"type": "string",
"display": true,
"required": false,
"displayName": "Subject",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Brief Summary",
"type": "string",
"display": true,
"required": false,
"displayName": "Brief Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "What is Important",
"type": "string",
"display": true,
"required": false,
"displayName": "What is Important",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {
"useAppend": true
},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "<GOOGLE_SHEET_GID_UPSC_NEWS>",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/<GOOGLE_SHEET_ID_UPSC_NEWS>/edit#gid=<GOOGLE_SHEET_GID_UPSC_NEWS>",
"cachedResultName": "UPSC Hindu News"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "<GOOGLE_SHEET_ID_UPSC_NEWS>",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/<GOOGLE_SHEET_ID_UPSC_NEWS>/edit?usp=drivesdk",
"cachedResultName": "Untitled spreadsheet"
},
"descriptionType": "manual",
"toolDescription": "Append row in sheet in Google Sheets"
},
"credentials": {},
"typeVersion": 4.7
},
{
"name": "Code in JavaScript: Pair URL & Title",
"type": "n8n-nodes-base.code",
"position": [
832,
16
],
"parameters": {
"jsCode": "// Get the JSON output from the previous node, which is named \"HTML: Extract Article Links & Titles\"\nconst inputData = $('HTML: Extract Article Links & Titles').first().json;\n\n// Get the arrays from that data\nconst urls = inputData.url;\nconst titles = inputData.title;\n\nconst pairedItems = [];\n\n// Loop through the URLs and pair each one with its title\nfor (let i = 0; i < urls.length; i++) {\n pairedItems.push({\n json: {\n url: urls[i],\n title: titles[i]\n }\n });\n}\n\n// Return the new list of paired items\nreturn pairedItems;"
},
"typeVersion": 2
},
{
"name": "Schedule Trigger: Daily at 7 AM",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-64,
-16
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 7
}
]
}
},
"typeVersion": 1.2
},
{
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-704,
-128
],
"parameters": {
"width": 480,
"height": 816,
"content": "Automated Daily UPSC Current Affairs Compilation\n\nThis workflow automates the process of creating daily current affairs notes for the Competitive Exams like UPSC.\n\nIt scrapes the latest news from The Hindu, uses an **AI Agent (powered by Google Gemini)** to filter only the **most relevant articles** (5-6 per run), generates a concise summary and UPSC-specific importance note, and automatically logs the analyzed data to a **Google Sheet**.\n\n## Who’s it for\n\n* **UPSC/CSE Aspirants** who want a curated, concise, and focused daily current affairs digest.\n* **Coaching Institutes** who need to automate the creation of daily study material.\n* **Educators** focused on Governance, Economy, and International Relations topics.\n\n## Requirements\n\n* **Google Gemini API Key:** For the Chat Model node.\n* **Google Sheets:** To store the final compiled current affairs digest.\n\n## How to set up\n\n1. **Credentials:** Connect your **Google Gemini** and **Google Sheets** credentials.\n2. **Google Sheet Setup:** Link the two Google Sheets nodes to your spreadsheet. Ensure your sheet has the column headers: `Date`, `URL`, `Subject`, `Brief Summary`, and `What is Important`.\n3. **Scheduling:** Adjust the **Schedule Trigger** time (default is 7 AM) if needed."
},
"typeVersion": 1
},
{
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-160,
-96
],
"parameters": {
"width": 288,
"height": 416,
"content": "Sets the time for the workflow to run every morning."
},
"typeVersion": 1
},
{
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
144,
-96
],
"parameters": {
"width": 288,
"height": 400,
"content": "Sends a request to the latest news section of Newspaper Web."
},
"typeVersion": 1
},
{
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
448,
-96
],
"parameters": {
"width": 272,
"height": 384,
"content": "Parses the received HTML "
},
"typeVersion": 1
},
{
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
736,
-96
],
"parameters": {
"width": 272,
"height": 384,
"content": "Creates a separate data item for every single news article for individual processing"
},
"typeVersion": 1
},
{
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1024,
-96
],
"parameters": {
"width": 272,
"height": 384,
"content": "Retrieve its full text/HTML content."
},
"typeVersion": 1
},
{
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1312,
-96
],
"parameters": {
"height": 384,
"content": "Isolates and extracts the clean, primary article text"
},
"typeVersion": 1
},
{
"name": "便签7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1568,
-96
],
"parameters": {
"width": 304,
"height": 384,
"content": "Filter for UPSC relevance, summarize, categorize, and prepare the data for the sheet"
},
"typeVersion": 1
},
{
"name": "便签8",
"type": "n8n-nodes-base.stickyNote",
"position": [
1888,
-96
],
"parameters": {
"width": 256,
"height": 368,
"content": "Ensuring the structured data is physically written to the Google Sheet."
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"connections": {
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent: Filter & Analyze UPSC News",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"HTML1: Extract Article Body": {
"main": [
[
{
"node": "AI Agent: Filter & Analyze UPSC News",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger: Daily at 7 AM": {
"main": [
[
{
"node": "HTTP Request: Get The Hindu Front Page",
"type": "main",
"index": 0
}
]
]
},
"AI Agent: Filter & Analyze UPSC News": {
"main": [
[
{
"node": "Append row in sheet",
"type": "main",
"index": 0
}
]
]
},
"Code in JavaScript: Pair URL & Title": {
"main": [
[
{
"node": "HTTP Request1: Get Full Article Content",
"type": "main",
"index": 0
}
]
]
},
"HTML: Extract Article Links & Titles": {
"main": [
[
{
"node": "Code in JavaScript: Pair URL & Title",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "HTTP Request: Get The Hindu Front Page",
"type": "main",
"index": 0
}
]
]
},
"Append row in sheet in Google Sheets1": {
"ai_tool": [
[
{
"node": "AI Agent: Filter & Analyze UPSC News",
"type": "ai_tool",
"index": 0
}
]
]
},
"HTTP Request: Get The Hindu Front Page": {
"main": [
[
{
"node": "HTML: Extract Article Links & Titles",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request1: Get Full Article Content": {
"main": [
[
{
"node": "HTML1: Extract Article Body",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
使用AI生成并发布独特的MCQ投票到Telegram
使用Gemini AI和Google Sheets生成独特的多选题投票并发布至Telegram
If
Aggregate
Http Request
+8
15 节点Pawan
内容创作
内容聚合
使用Gemini AI从网站文章自动化社交媒体帖子发布到LinkedIn和X/Twitter
If
Set
Xml
+16
34 节点Vadim
内容创作
ESPOLBot日历|常见问题
基于Telegram、MongoDB和Gemini AI的大学常见问题与日历助手
Set
Code
Html
+14
91 节点Club de Inteligencia Artificial Politécnico CIAP
客服机器人
使用Google Maps、GPT-4和WhatsApp自动化商业合作伙伴拓展
使用Google Maps、GPT-4和WhatsApp自动化商业合作伙伴拓展
If
Set
Code
+23
64 节点Khairul Muhtadin
AI 聊天机器人
我的工作流
使用 LinkedIn、Google Sheets 和 AI 简历评分与求职信自动化职位搜索
Set
Code
Html
+12
27 节点Jugal
工作流信息
难度等级
高级
节点数量20
分类-
节点类型10
作者
Pawan
@gladiatorAutomation consultant with expertise in n8n, AI models, and workflow optimization. I help educators, startups, and businesses design scalable automation for content creation, exam prep, and process efficiency. Skilled in integrating Google Sheets, Telegram, and AI agents for impactful results.
外部链接
在 n8n.io 查看 →
分享此工作流