
news analysis copy
Description
Categories
🤖 AI & Machine Learning
Nodes Used
n8n-nodes-base.setn8n-nodes-base.coden8n-nodes-base.gmailn8n-nodes-base.limitn8n-nodes-base.aggregaten8n-nodes-base.stickyNoten8n-nodes-base.rssFeedReadn8n-nodes-base.googleSheetsTrigger@n8n/n8n-nodes-langchain.googleGemini
PriceGratis
Views0
Last Updated11/28/2025
workflow.json
{
"id": "d85yiDCIHpbDuFIs",
"meta": {
"instanceId": "b39d3a3e0b1f45f269b15b36a96ec42c69d59232d4811fe551787cde83fb1cb4",
"templateCredsSetupCompleted": true
},
"name": "news analysis copy",
"tags": [],
"nodes": [
{
"id": "efe4a4ea-e59a-4320-b078-bf65dcf19065",
"name": "Google Sheets Trigger",
"type": "n8n-nodes-base.googleSheetsTrigger",
"position": [
-272,
0
],
"parameters": {
"event": "rowAdded",
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1tBtPsIJt8juzKel2sQR03pU_Jr3aAeVtvMz9lNqsloc/edit#gid=0",
"cachedResultName": "page1"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "https://docs.google.com/spreadsheets/d/1tBtPsIJt8juzKel2sQR03pU_Jr3aAeVtvMz9lNqsloc/edit?gid=0#gid=0"
}
},
"credentials": {
"googleSheetsTriggerOAuth2Api": {
"id": "uR4jhvIFtvlclekJ",
"name": "Google Sheets Trigger account"
}
},
"typeVersion": 1,
"alwaysOutputData": false
},
{
"id": "3c7e95a6-6405-4033-b0a9-99584ddf24a0",
"name": "RSS Read",
"type": "n8n-nodes-base.rssFeedRead",
"position": [
208,
0
],
"parameters": {
"url": "={{ 'https://news.google.com/rss/search?q=' + $json.keyword + '&hl=en&gl=US&ceid=US:en' }}",
"options": {}
},
"typeVersion": 1.2
},
{
"id": "bc260abd-fca1-462b-bb89-88dfbadfffb5",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"position": [
400,
0
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "f4fa38bd-6ac5-4012-87ee-a6eccf26b6c6",
"name": "contentSnippet",
"type": "string",
"value": "={{ $json.contentSnippet }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "f3b41d16-5f06-4292-b373-803a3243683f",
"name": "Limit",
"type": "n8n-nodes-base.limit",
"position": [
-32,
0
],
"parameters": {
"keep": "lastItems"
},
"typeVersion": 1
},
{
"id": "e728977b-517a-4db6-b0df-b54c9ba41b17",
"name": "Message a model",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"position": [
848,
0
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.5-flash",
"cachedResultName": "models/gemini-2.5-flash"
},
"options": {},
"messages": {
"values": [
{
"content": "=You are a witty analyst who examines and analyzes global or local news headlines about a brand or company!\n\nFirst, read and understand the following news headlines.\n\n**NEWS HEADLINES:**\n{{ $json.contentSnippet }}\n\n**TARGET BRAND or COMPANY:**\n{{ $('Google Sheets Trigger').item.json.keyword }}\n\nGenerate the sentiment analysis report as follows:\nFirst, in a single sentence, briefly describe what the brand does and what benefit it provides to people based on these headlines.\nNext, conduct the analysis in an entertaining tone!\nWrite 2-3 paragraphs of text only, with a blank line between each paragraph. Approach it as if you are doing a \"character analysis\" of the brand. Describe how the news \"treats\" the brand. Based on the news, give the brand a score out of 10 for some sentiment categories and use titles like positive and negative. Create a list of what the brand should pay attention to or an action list to solve problems.\n\nThe report format should be as follows:\n**IMPORTANT FORMATTING RULE:**\nWrite each paragraph separately and leave a blank line between paragraphs.\nDo not write long texts in a single block; make it easy to read!\n\n**REPORT FORMAT:**\n**BRAND PROFILE:** [What the brand does - 1 sentence]\n\n**MEDIA CHARACTER ANALYSIS:**\n[1st paragraph: General situation, the tone of the news]\n\n[2nd paragraph: Detailed analysis, prominent topics]\n\n[3rd paragraph: Future predictions]\n\n**SENTIMENT SCORE:**\n- Positive Perception: X/10\n- Trustworthiness: X/10\n- Overall Sentiment: X/10\n\n**ACTIONABLE RECOMMENDATIONS:**\n- [Recommendation 1]\n- [Recommendation 2]\n- [Recommendation 3]"
}
]
}
},
"credentials": {
"googlePalmApi": {
"id": "gKG8Jol51PHYNciP",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "546bfe81-3887-46f1-9266-89a04c6443a0",
"name": "Aggregate",
"type": "n8n-nodes-base.aggregate",
"position": [
592,
0
],
"parameters": {
"options": {},
"fieldsToAggregate": {
"fieldToAggregate": [
{
"fieldToAggregate": "contentSnippet"
}
]
}
},
"typeVersion": 1
},
{
"id": "391a4695-4ceb-4ced-9ef0-b640d3ebe24b",
"name": "Send a message",
"type": "n8n-nodes-base.gmail",
"position": [
1408,
0
],
"webhookId": "15454799-652e-40b5-9a70-669e445ffbc8",
"parameters": {
"sendTo": "={{ $('Google Sheets Trigger').item.json.email }}",
"message": "={{ $json.paragraphs.map(p => `<p>${p}</p>`).join('') }}\n",
"options": {},
"subject": "=\"{{ $('Google Sheets Trigger').item.json.keyword }}\" Sentiment Analysis on news"
},
"credentials": {
"gmailOAuth2": {
"id": "p8yJAPDcE54IPyo6",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "1d6b8cc4-0f66-4add-9681-bdf3f810b9d9",
"name": "Code in JavaScript",
"type": "n8n-nodes-base.code",
"position": [
1200,
0
],
"parameters": {
"jsCode": "const input = $json.content.parts[0].text;\n\nconst paragraphs = input\n .split(/\\n\\s*\\n/) \n .map(p => p.trim()) \n .filter(p => p.length > 0); \n\nreturn {\n paragraphs\n};\n"
},
"typeVersion": 2
},
{
"id": "a12803ad-46fa-493a-95c7-cc56bbc97978",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-752,
-176
],
"parameters": {
"width": 448,
"height": 448,
"content": "## How to use\n\n1. First, create a google sheets document with \nsheet name=\"page1\", A1 cell name=\"keyword\" and \nB1 cell name=\"email\".\n2. The system will read the keyword & email data when a new row data is entered.\n3. Paste the url of your google sheets document into the first trigger node. Select trigger on \"row added\" in the node.\n4. Enter your credentials to connect Gemini PaLM API account in the \"message a model\" node of Google.\n5. Enter your credentials to connect Gmail account in the \"send a message\" node.\n\nThe workflow automatically runs when new row is detected. Recipients receive comprehensive sentiment analysis reports within minutes!"
},
"typeVersion": 1
}
],
"active": true,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "62253b0a-2126-4b91-84a8-5151dd775d0c",
"connections": {
"Limit": {
"main": [
[
{
"node": "RSS Read",
"type": "main",
"index": 0
}
]
]
},
"RSS Read": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Aggregate": {
"main": [
[
{
"node": "Message a model",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
]
]
},
"Message a model": {
"main": [
[
{
"node": "Code in JavaScript",
"type": "main",
"index": 0
}
]
]
},
"Code in JavaScript": {
"main": [
[
{
"node": "Send a message",
"type": "main",
"index": 0
}
]
]
},
"Google Sheets Trigger": {
"main": [
[
{
"node": "Limit",
"type": "main",
"index": 0
}
]
]
}
}
}