# How To Build AI Agents To Automate EVERYTHING (n8n tutorial)

Source: https://www.youtube.com/watch?v=L09kacrneOc
Recap page: https://rapidrecap.app/video/L09kacrneOc
Generated: 2025-10-02T01:03:21.968+00:00

---
## Quick Overview

The tutorial demonstrates how to build an automated daily email newsletter workflow using n8n, integrating RSS feeds, an AI Agent (with GPT-4-mini), Markdown conversion, and Gmail to summarize and send curated tech news every morning at 7:00 AM.

**Key Points:**
- The final workflow automatically triggers daily at 7:00 AM to fetch, summarize, and email tech news digests.
- The process uses an n8n workflow starting with a Schedule Trigger set to run every day at 7:00 AM.
- RSS feeds from TechCrunch, Engadget, Wired, and The Verge are fetched after splitting the initial array of URLs.
- An AI Agent node, configured with the GPT-4-mini model and a specific system prompt, summarizes the aggregated content snippets into a single, jargon-free digest.
- The summarized content (initially in Markdown from the AI Agent) is converted to HTML using the Markdown node before being sent via Gmail.
- The Gmail 'Send a message' node requires a new OAuth2 credential setup, which involves registering the n8n redirect URL (https://n8n.srv1036026.hstgr.cloud:5678/rest/oauth2-credential/callback) with Google Cloud Console.
- A 10% discount coupon code 'MATTWOLFE' is available for Hostinger's KVM 2 plan ($6.99/mo billed monthly for 24 months).

![Screenshot at 10:03: The final n8n workflow diagram showing the sequence: Schedule Trigger -\> Edit Fields -\> Split Out -\> RSS Read -\> Aggregate -\> AI Agent \(with OpenAI Chat Model\) -\> Markdown -\> Send a message.](https://ss.rapidrecap.app/screens/L09kacrneOc/00-10-03.png)

**Context:** The video provides a practical tutorial on building a complex, automated workflow using the no-code/low-code workflow automation tool n8n. The goal is to create a daily email newsletter that aggregates recent tech news from multiple RSS feeds, uses an AI agent powered by OpenAI's GPT-4-mini to summarize the content clearly, formats it for email, and sends it via Gmail, all automatically on a schedule.

## Detailed Analysis

The video details the construction of an automated daily tech news digest workflow in n8n. The process begins with a Schedule Trigger set to fire every day at 7:00 AM (10:35). The workflow first uses an Edit Fields node to structure the input into an array of RSS feed URLs (10:13), including TechCrunch, Engadget, Wired, and The Verge (07:46). The Split Out node then separates these four URLs into individual items (08:32). The RSS Read node fetches content from these feeds, resulting in 130 items (09:51), which are then combined by an Aggregate node into a single item containing all content snippets (10:35). This aggregated content feeds into an AI Agent, which uses the GPT-4-mini model (13:25) and a specific system prompt instructing it to act as a tech news aggregator, summarize the news in plain English, and include the list of news items (11:32). The AI Agent output, which is in Markdown format, is then passed to a Markdown node configured to convert Markdown to HTML (14:15). Finally, the HTML content is formatted and sent as an email via the Send Message node connected to Gmail (14:49). Setting up the Gmail credential requires creating a new OAuth2 credential, which involves obtaining Client ID and Secret keys from the Google Cloud Console after registering the n8n redirect URL (15:20). The speaker also promotes Hostinger, showing their pricing page and offering a 10% discount code 'MATTWOLFE' for the KVM 2 plan (03:49).

### Workflow Setup

- Schedule Trigger set to run daily at 7:00 AM
- Edit Fields node structures RSS URLs into an array
- Split Out node separates the 4 URLs into 4 separate items
- RSS Read node fetches 130 items from the feeds
- Aggregate node combines all content snippets into one item.

### AI Agent Configuration

- Uses the OpenAI Chat Model (GPT-4-mini)
- System Message instructs the AI to summarize news from the last 24 hours in plain English, acting as a tech news aggregator
- User Prompt is set to 'Summarize news'.

### Data Formatting

- Markdown node converts the AI Agent's Markdown output into HTML for better email rendering
- Send Message node formats the email with subject 'Daily Tech Digest' and sends it to matt@futuretools.io.

### Email Credential Setup

- Requires creating a new Gmail OAuth2 credential
- Involves setting up the OAuth Redirect URL (https://n8n.srv1036026.hstgr.cloud:5678/rest/oauth2-credential/callback) in Google Cloud Console and registering the Client ID and Secret (15:20).

### Final Result and Promotion

- The workflow successfully sends the summarized, HTML-formatted email digest daily
- The speaker promotes Hostinger for hosting the n8n instance and offers a 10% discount code 'MATTWOLFE' on the KVM 2 plan (03:49).

![Screenshot at 00:00: The presenter speaking directly to the camera, introducing the topic of building AI agents for automation.](https://ss.rapidrecap.app/screens/L09kacrneOc/00-00-00.png)
![Screenshot at 00:03: A graphic showing an envelope surrounded by sketches, representing the concept of an email digest.](https://ss.rapidrecap.app/screens/L09kacrneOc/00-00-03.png)
![Screenshot at 04:04: The n8n platform showing the OS selection screen, where the presenter selects 'n8n' under Developer tools.](https://ss.rapidrecap.app/screens/L09kacrneOc/00-04-04.png)
![Screenshot at 09:11: The Edit Fields node configuration where the array of RSS URLs is defined using JSON syntax.](https://ss.rapidrecap.app/screens/L09kacrneOc/00-09-11.png)
![Screenshot at 10:11: The Aggregate node configuration, where the 'contentSnippet' field from the previous step is aggregated into a single item.](https://ss.rapidrecap.app/screens/L09kacrneOc/00-10-11.png)
![Screenshot at 11:16: The AI Agent configuration, showing the 'Summarize news' user prompt and the system message guiding the AI's behavior.](https://ss.rapidrecap.app/screens/L09kacrneOc/00-11-16.png)
![Screenshot at 14:14: The Markdown node configured to convert the AI Agent's Markdown output into HTML, using the expression {{$json.output}} as the input.](https://ss.rapidrecap.app/screens/L09kacrneOc/00-14-14.png)
![Screenshot at 16:51: The Send Message node settings, showing the configured Gmail credential, subject, and the use of the 'data' field from the Markdown output as the message body.](https://ss.rapidrecap.app/screens/L09kacrneOc/00-16-51.png)
![Screenshot at 20:25: The presenter concluding the tutorial, holding up an iPhone 15 to promote a giveaway.](https://ss.rapidrecap.app/screens/L09kacrneOc/00-20-25.png)
