Combining an automation platform allows you to personalize your message, but the complexity is still real, just like costs.
More or less relevant tools exist to automate its watch. Creating AI agent allows you to monitor a multitude of sources. The IA agent can also distinguish information according to the prompt used, learn according to the selection criteria and offer a personalized response.
In order to create this AI agent, we use the N8N automation platform. Note that it offers a free 14-day trial. We are going to create two workflows: one to collect and store data and another to send the summary. We will connect an AI with RSS feeds and give instructions. Objective, receive a personalized summary by email.
Workflow 1: Collect and store data
We create our first knot in the workflow 1 in N8N. A node constitutes a basic brick with an action to be carried out in a workflow. We click on the “+” in the graphical interface and choose “Schedule Trigger”. This makes it possible to trigger the action of the workflow according to temporal planning. By clicking on the sign “+”, to its right, we connect it to the “RSS Read” node, which allows you to read RSS feeds. We mention one in the URL section, in this case: https://www.journaldunet.com/intelligence-artificial/rss/.
To facilitate the construction of this workflow, we put only one RSS feed. It is possible to create others by setting up “RSS Read” nodes for each of them, linked to a “Merge” knot. The latter includes several entry flows into a single unique outing. It must be connected to the following node.
We will then create a node devoted to AI. It allows you to read each article found by the collector and decides if it is relevant to us. For this, we select “Gemini” and “Message A Model”. This last knot indicates to N8N that we will provide a prompt and that we are waiting for it to generate a text in return. In order to identify ourselves, we create an API key by going to the Google AI Studio site and by clicking down left on “Get Api Key”. If it is not possible to record a new project, we generate one on Google Cloud Console. Besides the “Google Cloud” logo, we are going on “select a project”. We go to “new project” at the top right, give a name to our project and click on “Create”. We choose the Gemini 1.5 Flash model, good compromise between cost and capacities on this kind of research.
By adapting the COF method for context, objective and format, we mention this prompt:
Tu es un analyste expert spécialisé dans l'intelligence artificielle et l'économie. Analyse l'article suivant s'il a été publié il y a moins de deux jours et réponds dans ce cas en suivant strictement ces instructions :
Résumé : fais un résumé concis de l'article en 1 phrase maximum.
Pertinence : évalue sur une échelle de 1 à 5 à quel point cet article est pertinent sur le sujet de l'intelligence artificielle et de l'économie.
Action : Si la pertinence est de 4 ou 5, écris "ACTION REQUISE". Sinon, écris "NON_PERTINENT".
Voici les informations de l'article :
Titre : {{ $json.title }}
Extrait : {{ $json.contentSnippet }}
Lien : {{ $json.link }}
This prompt can of course be changed depending on what you want to receive. We also take off the “Simplify Output” option. We connect this node with a “merge” node by clicking on “+” next to “message in a model”. This makes it possible to bring together several entry flows, in a single output. The setting is: “fashion”: “combine”; “Combine by”: “Position”
We associate the knot created with an “If” knot. This must send the information to the following node if the conditions are met. To do this, we mention in “Conditions”:: {$ json.choices (0) .message.content}}} “do not contain” and “non_petinent”. This means that the content received should not contain the mention “non_petinent”.
We connect the “True” part of this knot to a node “Append Row in Sheet”. This allows you to add a new line at the end of an existing spreadsheet.
We create a sheet in Google Sheet. It is called “title leaf without title”. This is the “sheet1”, its name is written below the document. In the Google Sheet node, we name the document “by ID”, taking the section of the URL of the created data sheet located in the URL between “/D/” and “/Edit”. The sheet is called “by name”, with the name of the sheet written at the bottom of the Google Sheet. This is “sheet 1” in our case.
The sheet must be filled with the desired items when the “trigger” is triggered.
Workflow 2: Sending the summary
The second workflow allows you to recover the information contained in the style sheet created and send a daily summary by email.
We start this workflow with a “Trigger Schedule” knot. We associate him with the “Get Row (s) in Sheet”. Its role is to read and recover data that already exists in a spreadsheet to use them in the N8N workflow. We assemble the style sheet previously created there. The ID is the same as that created for the workflow 1.
A “code” node is then produced. Its role, transform a simple data list into a useful, formatted and ready to be sent synthesis report. It performs all complex operations that N8N’s standard nodes cannot do easily. You can help yourself to generate this code. This gives in our case:
let htmlContent = "";
let articleCount = 0;
if (items.length === 0 || !items(0).json || typeof items(0).json.title === 'undefined') {
return ();
}
// === ÉTAPE 1 : EXTRACTION ET TRI PAR PERTINENCE ===
let articlesWithScore = ();
for (const item of items) {
const title = item.json.title;
const link = item.json.link;
let analysis = item.json.content || 'Analyse non disponible';
// Suppression des images (optionnel)
if (typeof analysis === 'string') {
analysis = analysis.replace(/
)*>/g, '');
analysis = analysis.replace(/!(.*?)(.*?)/g, '');
}
// Extraction du score de pertinence
let pertinenceScore = 5;
const scoreMatch = analysis.match(/Pertinences*:s*(d+)/i);
if (scoreMatch) {
pertinenceScore = parseInt(scoreMatch(1));
}
// Ajout à la liste avec le score
articlesWithScore.push({
title: title,
link: link,
analysis: analysis,
score: pertinenceScore
});
}
// === ÉTAPE 2 : TRI PAR SCORE DÉCROISSANT ===
articlesWithScore.sort((a, b) => b.score - a.score);
// === ÉTAPE 3 : LIMITATION À 10 ARTICLES ===
const top10Articles = articlesWithScore.slice(0, 10);
// === ÉTAPE 4 : GÉNÉRATION DE L'EMAIL ===
for (const article of top10Articles) {
articleCount++;
htmlContent += `
`;
}
// Ajout d'un résumé en fin d'email
htmlContent += `
???? Résumé : ${articleCount} articles sélectionnés parmi ${articlesWithScore.length} articles analysés
Articles triés par score de pertinence décroissant
`;
return ({
json: {
emailBody: htmlContent,
articleCount: articleCount,
totalArticles: articlesWithScore.length
}
});
To the right of this knot, we incorporate a gmail node called “send a message”. His work: Take the Email HTML that the node “Code” has prepared and send it. We associate our Gmail account. We put ourselves in recipient. We integrate a variable in the subject of the email and the message sent.
The last knot created is “Clear Sheet”. Its mission: to delete all the Google Sheets spreadsheet once the summary email has been successfully sent. This avoids rereading the items already sent to the style sheet. We associate the identifier “Google Sheet Account” previously created for the node “Get Row (s) in Sheet.”
That’s it, we can test the workflows, by clicking on the orange button “Execute workflows”, at the bottom of the graphical interface. If workflows work, they should appear with a green box. We then receive this message via our email address.
We see in this extract the object of the email as well as the articles sent, with the relevance score, the title, the summary and the link to the article in question. This workflow is perfectible, but it shows possibilities of the association with AI.
Watch out for complexity, rendering and costs
If the day before by the AI agents is promising, we can note certain limits. In particular the complexity of the workflow to be set up to integrate several RSS feeds on N8N. Also be careful to check that RSS feeds are updated. There are also limits in the autonomy of the IA agent. This one cannot say: “This article is interesting because it contradicts what we learned last week from another source.” This meta-analysis requires human intervention or even more complex workflows. Human remains the one who defines strategy, sources or objectives.
On the price side, N8N, after the free period, invoice 24 euros per month for its minimum formula. To properly manage the cost of APIs, it is advisable to define an expenditure ceiling that the programming interface will never exceed, to receive billing alerts, for example, when you reach 50 %, 75 %, and 90 %of your monthly expenditure limit. Use a specific API key for your project, in order to know the cost of your watch. As for the choice between Gemini 1.5 Flash or the GPT-3.5-Turbo equivalent, compare prices. The “Free Tier” of the Gemini API is generous. It offers a quota of 60 requests per minute. This is enough for our watch, even with an execution every 5 minutes. Openai has a more limited free quota.




