Use this powerful n8n workflow to automatically extract links from Gmail, scrape data from the linked web page using HTML selectors, process the information, and save it to Google Sheets.
Download this n8n workflow template and start using it instantly.
Data Analysts/Researchers: Users who regularly receive links via email containing structured data they need to log.
Operations Teams: Organizations needing to automate the processing of new case files or reports delivered via secure email links.
n8n Automation Specialists: Users looking for advanced examples of combining Gmail, HTTP Requests, HTML parsing, and custom Code nodes in a single n8n workflow.
Anyone needing automated web scraping initiated by a specific email n8n trigger.
Manually opening emails, clicking links, copying data points, and calculating derived values (like age or case type) is time-consuming and prone to human error. This advanced n8n workflow solves this problem by creating a fully automated pipeline. It starts by monitoring Gmail for relevant messages. Once found, an n8n node extracts the target URL embedded in the email body. The workflow then uses an HTTP Request to access that URL and a subsequent HTML n8n node to scrape key fields (e.g., patient name, case ID, date of birth, location) using CSS selectors.
A critical step is the custom processing performed in a Code n8n node, where the raw extracted data is cleaned, ages are calculated, and consultation types (e.g., 'TELEMEDICINA') are determined by analyzing the email subject line. Finally, the structured, processed data is seamlessly appended to a designated row in Google Sheets, providing a reliable and instantly updated database. This robust n8n template ensures efficiency and data integrity.
This comprehensive n8n workflow executes the following steps:
a[style*="color: #ffffff"]) to locate and extract the required data link (href).dtnasc, id, Nome, Queixa, etc.) using specialized CSS selectors (e.g., #lblMemberDateOfBirth).Nome_Paciente, Idade, Tipo atendimento) for uniform output.To install and use this n8n template, follow these steps:
sender and receivedAfter/receivedBefore filters to match the specific emails you wish to target.#lblMemberDateOfBirth). When clicking ‘Test workflow’ (Manual Trigger n8n node): Serves as the starting point for testing this specific n8n workflow.
Search Emails (Gmail n8n node): Fetches emails based on complex criteria (sender and date range). Key Configuration: sender set to [email protected]; operation is getAll.
search for an element in the email body (HTML n8n node): Extracts the hidden URL link from the initial email content. Key Configuration: Uses CSS selector a[style="color: #ffffff"] to get the href attribute.
open the link (HTTP Request n8n node): Navigates to the extracted URL to fetch the full content of the target data page. Key Configuration: URL expression {{ $json.dados }}. Set to continue on error.
capture data (HTML n8n node): Scrapes specific fields from the accessed web page. Key Configuration: Extracts data using IDs like #lblMemberDateOfBirth (dtnasc), #txtCase (id), and others.
processes information (Code n8n node): Performs complex data manipulation. Key Function: Parses dates, calculates age, extracts clean case ID, and determines attendanceType by examining the emailSubject retrieved from the initial Search Emails n8n node.
set variables (Set n8n node): Restructures and renames output fields for clarity before saving. Key Configuration: Maps processed fields like caseId to id and combines Nome and sobrenome into Nome_Paciente.
operation is append; defines column mappings for headers like DATA, NOME, IDADE, and TIPO CONSULTA .Automate the creation of viral short clips from YouTube videos using this powerful n8n workflow. It leverages yt-dlp, FFmpeg, and Google Gemini AI to analyze transcripts, identify peak moments, perform 9:16 cropping, and burn dynamic subtitles automatically. Use this n8n template for fast content creation.

Use this powerful n8n workflow to automate converting university term date spreadsheets (XLSX) into shareable ICS calendar files using AI data extraction and the Cloudflare Markdown Conversion service.

Learn how to extract the domain name from any email address using a custom JavaScript n8n node. Download this useful n8n workflow template for data cleanup.

Use this robust n8n workflow to automatically crawl and extract all URLs from complex sitemaps and nested sitemap indexes, crucial for deep SEO analysis and auditing.

Automate fetching detailed YouTube channel metadata (subscribers, views, keywords) via RapidAPI and save the formatted report directly into Google Docs using this powerful n8n workflow.









































