{{ $json.daily.temperature_2m_min[0] }} to {{ $json.daily.temperature_2m_max[0] }} °C, {{ $json.daily.precipitation_probability_max[0] }}% chance of rain
IFRain over 50%?Show me how
Value 1 is this expression, operator Number → is greater than, value 2 is 50.
{{ $json.rain_chance }}
EDIT FIELDSUmbrella noteShow me how
On the true branch. One string field, umbrella_note:
☔ Take an umbrella today.
Behind or stuck? Copy the checkpoint and paste it into an empty canvas with Ctrl+V (Cmd+V on a Mac), then pick your credentials again.
Gemini writes your first brief. For now it only knows the weather.
IFRain over 50%?
AGENTAI Agent
CHAT MODELGemini
AI AGENTAI AgentShow me how
Connect the false output of the If node and the output of Umbrella note to it. Source for prompt: Define below.
Write my morning brief for today, {{ $now.toFormat('cccc, d LLLL') }}.
Weather in {{ $('My settings').first().json.city }}: {{ $('Format weather').first().json.summary }}
Under Options → System message:
You are my personal morning briefing assistant.
My interests: {{ $('My settings').first().json.topics }}.
Write a short brief in plain text, no Markdown:
1. One line on today's weather.
2. The 3 to 5 most relevant stories for my interests, each with one sentence and its link.
Only use stories from the news list in the message or from your tools.
Never use your own knowledge for news. If there are no stories, write only the weather line.
Keep the brief under 200 words.
Important: in the node's Settings tab, switch on Execute once. Otherwise the agent writes one brief per news story in stage 3.
GOOGLE GEMINI CHAT MODELGeminiShow me how
Click the Chat Model plus under the agent. Create a credential with your Gemini API key and pick this model:
gemini-3.5-flash-lite
Behind or stuck? Copy the checkpoint and paste it into an empty canvas with Ctrl+V (Cmd+V on a Mac), then pick your credentials again.
Replace the prompt with this version, which hands over the news:
Write my morning brief for today, {{ $now.toFormat('cccc, d LLLL') }}.
Weather in {{ $('My settings').first().json.city }}: {{ $('Format weather').first().json.summary }}
News on my topics from Google News:
{{ $('Google News').all().slice(0, 15).map(item => '- ' + item.json.title + ' (' + item.json.link + ')').join('\n') }}
Also check the Hacker News front page with your tool and include stories that fit my interests.
HTTP REQUEST TOOLHacker NewsShow me how
Click the Tool plus under the agent. Description:
Returns the current Hacker News front page stories (title, url, points) as JSON.
The brief lands in your inbox. Switch it on, and tomorrow at 7 it runs without you.
AGENTAI Agent
GMAILSend brief
GMAILSend briefShow me how
Operation Send a message, connect with Sign in with Google. Gmail is only the last step, not a tool of the agent, so Gemini cannot read your inbox. n8n itself does get mailbox access: use ntfy or Discord below if you prefer.
To
{{ $('My settings').first().json.email }}
Subject
Your daily brief, {{ $now.toFormat('ccc d LLL') }}
Pick a card, or build your own idea. Start with the hint, and open the full solution only if you get stuck.
Quick remixes
QUICK
Brief on demand
Type a topic into a form and get a brief right away, in the browser.
FORM TRIGGERIFFORM ENDING
Hint
A workflow can have more than one trigger. $('Node name').isExecuted tells you which one started the run.
Full solution
Add an n8n Form Trigger with one field, Topic, and connect it to My settings. Use this as the value of topics:
{{ $('Brief on demand').isExecuted ? $('Brief on demand').first().json.Topic : 'AI agents, Gemini, n8n' }}
After the agent, an If node checks {{ $('Brief on demand').isExecuted }}. True goes to an n8n Form node (operation Form ending) showing {{ $json.output }}, false goes to Gmail.
Add a Google Calendar tool to the agent: Get many events, from today to tomorrow. Then tell the agent about its new sources:
You are my personal morning briefing assistant.
My interests: {{ $('My settings').first().json.topics }}.
Your sources:
- Today's weather and Google News stories, in the message
- New releases of {{ $('My settings').first().json.github_repo }}, in the message
- My Google Calendar, through your calendar tool
- The Hacker News front page, through your Hacker News tool
Write a short brief in plain text, no Markdown, in this order:
1. One line on today's weather.
2. Today's calendar events with their start times. Leave this part out if there are none.
3. The 3 to 5 most relevant stories for my interests, each with one sentence and its link.
4. New releases of {{ $('My settings').first().json.github_repo }}, one line each. Leave this part out if there are none.
Only use information from these sources. Never use your own knowledge for news, events or releases.
Keep the brief under 250 words.
Email on weekdays, a push via ntfy at the weekend.
SWITCHHTTP REQUEST
Hint
{{ $now.weekday }} is 1 on Monday and 7 on Sunday.
Full solution
Put a Switch node between the agent and Gmail with two rules on {{ $now.weekday }}: is less than or equal to 5 goes to Gmail, is greater than 5 goes to ntfy:
Your own weather rules in JavaScript, with a tip on top of every brief.
CODE
Hint
A Code node reads the previous node with $input.first().json and returns new items.
Full solution
Add a Code node after Format weather. Change the thresholds and messages as you like:
const w = $input.first().json;
let tip;
if (w.rain_chance > 70) tip = '🚆 Heavy rain likely: take the bus or train.';
else if (w.temp_max < 5) tip = '🧣 Cold day: wrap up warm.';
else if (w.temp_max > 25) tip = '🕶️ Warm day: bring water and sunscreen.';
else tip = '🚲 Good day to bike.';
return [{ json: { ...w, tip } }];
Start the Gmail message with {{ $('Weather tip').first().json.tip }}.
A Google Sheet remembers every story already seen, so nothing appears twice.
GOOGLE SHEETSFILTERCODE
Hint
Read the sheet before Google News, then compare links in a Filter node.
Full solution
Create a sheet with the columns date, title, link. Read it before Google News (Settings: Execute once and Always output data). After Google News, a Filter keeps a story if this is true: