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
Automate book data with n8n and Google Sheets

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

Learn how to Build this Workflow with AI:

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


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.


Automate book data with n8n and Google Sheets

Visit through Desktop to Interact with the Workflow.

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 Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.