Automate Book Data Scraping, CSV Export & Email with n8n

Learn how to automate scraping book data from URLs, converting it to CSV, and emailing it using n8n. This workflow fetches book details, sorts by price, and sends results seamlessly to save hours in manual data collection.
googleSheetsTrigger
httpRequest
html
+4
Workflow Identifier: 1732
NODES in Use: Google Sheets Trigger, HTTP Request, HTML Extract, Split Out, Sort, Convert to File, Gmail

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Workflow Does ⚙️

This workflow helps you take bookstore URLs from a Google Sheet and get a clean list of books sorted by price.

You avoid copying data by hand and stop mistakes from typing errors.

The result is a neat CSV file emailed to your team automatically.

It saves time while giving accurate, easy to use book data.


How the Workflow Works: Input → Process → Output

Inputs

  • Google Sheets: New bookstore URLs added in a sheet trigger the workflow.
  • Dumpling AI API: Retrieves cleaned HTML content of the bookstore webpage.

Processing Steps

  • The workflow watches Google Sheets for new URL rows.
  • It sends each URL to Dumpling AI to get full HTML without extra junk.
  • Extracts each book’s HTML based on CSS selectors targeting book items.
  • Splits the list into individual book entries for clean processing.
  • Extracts title and price from the HTML snippets for each book.
  • Sorts all books by price from highest to lowest.
  • Converts sorted book data into a CSV file format.
  • Sends the CSV file via Gmail to a set email address.

Output

You get an email with a CSV file showing all books sorted by price.

This file is easy to share, analyze, and store.


Tools and Services Used

  • Google Sheets: Tracks and triggers new URLs entered by users.
  • Dumpling AI API: Scrapes clean HTML data from bookstore websites.
  • n8n Automation Platform: Orchestrates node workflows and data processing.
  • Gmail: Sends the final CSV files via email automatically.

Beginner Step-by-Step: How to Use This Workflow in n8n

Step 1: Import Workflow

  1. Download the provided workflow JSON file from this page.
  2. Open the n8n editor you already use.
  3. Click “Import from File” and select the downloaded JSON.
  4. This loads the entire workflow without building from scratch.

Step 2: Configure Credentials and Settings

  1. Add your Google Sheets API credentials to the Google Sheets Trigger node.
  2. Insert your Dumpling AI API Key in the HTTP Request node headers.
  3. Set up Gmail OAuth2 credentials in the Gmail node.
  4. Update the Document ID and Sheet Name if your Google Sheet differs.
  5. Change the recipient email address to who should get the CSV file.

Step 3: Test and Activate

  1. Add a sample URL row in Google Sheets to trigger the workflow.
  2. Check the execution logs inside n8n editor to see each step’s output.
  3. Confirm the email with CSV arrives correctly.
  4. After testing, turn on the workflow with the active toggle switch for production use.

Now the workflow works automatically and keeps sending up-to-date book lists.

Consider using self-host n8n for more control if needed.


Common Edge Cases and Failures

  • If Dumpling AI returns no HTML, check API Key, URL correctness, and headers.
  • Empty book extracts often mean CSS selector changed; update selector in HTML Extract node.
  • Price sorting may break if prices remain strings; convert prices to numbers before sorting.
  • Gmail errors usually caused by OAuth2 token expired; reauthorize Gmail credentials.

Customize the Workflow

  1. Change CSS selectors to scrape different products or updated website layouts.
  2. Switch Sort node to ascending or sort by title for different data views.
  3. Add new fields like author, rating by extending HTML extractor keys.
  4. Make email recipient dynamic with expressions based on sheet users.
  5. Insert a Google Sheets Append node before CSV conversion to archive scraped data.

Summary

✓ Automates data scraping from bookstore URLs in Google Sheets.

✓ Extracts and cleans book titles and prices from webpage HTML.

✓ Sorts books by price properly.

✓ Sends a ready-to-use CSV file by email without manual work.

✓ Saves hours weekly and prevents manual copy-paste errors.


Frequently Asked Questions

No data happens when API Key is wrong, the endpoint is incorrect, or the URL is not valid. Verify API credentials and headers.
Gmail errors come from expired or invalid OAuth2 tokens. Reauthorize the Gmail credentials inside n8n settings.
Empty arrays occur when CSS selectors don’t match webpage elements. Update the CSS selector to match current site structure.
Yes, any service returning clean HTML via POST HTTP request can replace Dumpling AI by updating the HTTP Request node.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free