Google Sheets + Gmail: book price reports, sorted
You grab prices from a website, paste them into a spreadsheet, tidy the formatting, then realize you copied the wrong title. Again. It’s not “hard” work, but it’s the kind that quietly steals your afternoon.
This hits virtual assistants and researchers constantly. But data analysts and small agency teams feel it too. With this Sheets Gmail automation, you drop a book listing URL into Google Sheets and get a clean, sorted CSV report in your inbox.
Below you’ll see exactly what the workflow automates, what results you can expect, and what you’ll need to run it reliably without babysitting it.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Google Sheets + Gmail: book price reports, sorted
flowchart LR
subgraph sg0["Trigger- Watches For new URL in Spreadsheet Flow"]
direction LR
n0@{ icon: "mdi:cog", form: "rounded", label: "Convert to CSV File", pos: "b", h: 48 }
n1["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/html.dark.svg' width='40' height='40' /></div><br/>Extract all books from the p.."]
n2@{ icon: "mdi:cog", form: "rounded", label: "Sort by price", pos: "b", h: 48 }
n3["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/html.dark.svg' width='40' height='40' /></div><br/>Extract individual book price"]
n4@{ icon: "mdi:message-outline", form: "rounded", label: "Send CSV via e-mail", pos: "b", h: 48 }
n5@{ icon: "mdi:play-circle", form: "rounded", label: "Trigger- Watches For new URL..", pos: "b", h: 48 }
n6["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Scrape Website Content with .."]
n7@{ icon: "mdi:swap-vertical", form: "rounded", label: "Split HTML Array into Indivi..", pos: "b", h: 48 }
n2 --> n0
n0 --> n4
n3 --> n2
n1 --> n7
n7 --> n3
n6 --> n1
n5 --> n6
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n5 trigger
class n6 api
classDef customIcon fill:none,stroke:none
class n1,n3,n6 customIcon
The Problem: Manual price tracking turns into busywork
If you track book prices (or any catalog-style product pricing), the annoying part is never “finding” the page. It’s the cleanup. You copy titles, paste prices, strip currency symbols, fix broken rows, then sort by price so a client can see what’s most expensive at a glance. Do this across a few pages and you burn about 2 hours a week on tasks that don’t improve the final insight at all. Worse, one missed item or one paste into the wrong column makes your report feel sloppy, which is the last thing you want when you’re sending updates to stakeholders.
It adds up fast. Here’s where it usually breaks down.
- You end up reformatting scraped text into something spreadsheet-friendly every single time.
- Sorting by price becomes a manual chore, and it’s easy to miss one expensive outlier.
- Copy/paste errors creep in when you’re moving between browser tabs, Sheets, and email drafts.
- Client updates get delayed because the “report” is still being assembled at the last minute.
The Solution: Google Sheets → scrape → CSV → Gmail delivery
This workflow turns a messy, repetitive reporting task into a simple “add a URL and wait” process. It starts by watching your Google Sheet for a new row containing a product listing URL (like a category page of books). Once a URL appears, n8n sends it to Dumpling AI to fetch cleaned HTML content, which is much easier to parse than raw page source. The workflow then extracts each book block from the page using CSS selectors, pulls out the title and the price for each item, and sorts everything by price in descending order. Finally, it converts the structured data into a CSV file and emails it to you through Gmail as an attachment, ready to forward to a client or drop into a shared folder.
The workflow starts when a new URL is added to Google Sheets. Dumpling AI retrieves the page, then the HTML parsing steps extract title and price cleanly. From there, n8n sorts the list and sends a finished CSV to Gmail with no extra handling.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you track 10 book listing pages each week for a client. Manually, you might spend about 10 minutes per page copying titles and prices, then another 20 minutes cleaning and sorting, which is roughly 2 hours total. With this workflow, the “work” is adding 10 URLs to Google Sheets (maybe 5 minutes), then waiting for the CSV emails to land. Even if scraping and processing takes another 10–15 minutes in the background, you still get almost all of that 2 hours back.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets to store the URLs that trigger runs.
- Gmail to email CSV reports automatically.
- Dumpling AI API key (get it from your Dumpling AI dashboard).
Skill level: Beginner. You’ll connect accounts, paste CSS selectors, and test one sample URL.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
A new URL appears in Google Sheets. The workflow uses a Google Sheets trigger that watches for new rows, so you don’t need to click “run” or export anything.
The page gets scraped and cleaned. n8n sends the URL to Dumpling AI via an HTTP request, asking for cleaned HTML output, which is usually more stable for parsing than raw markup.
Book data is extracted and sorted. An HTML parsing step grabs each book container (for example, “.row > li”), then another parsing step pulls the title and price fields (like “h3 > a” and “.price_color”). Once the list is structured, n8n sorts by price in descending order.
A CSV report is built and emailed. The workflow converts the JSON into a CSV file, then Gmail sends it as an attachment to the address you choose.
You can easily modify the fields you extract to include author, availability, or product URL based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Google Sheets Trigger
Set up the trigger so the workflow starts when a new row is added to your sheet of book URLs.
- Add and open Sheet Row Watcher.
- Set Event to
rowAdded. - Select your spreadsheet in Document using the URL
https://docs.google.com/spreadsheets/d/1pb4WLqv2EruLM1z9-utehcINolSj0vlUqZionyLoRUs/edit?usp=drivesdk. - Select the sheet name
Sheet1in Sheet Name. - Set the polling to Every Minute in Poll Times.
- Credential Required: Connect your
googleSheetsTriggerOAuth2Apicredentials.
Step 2: Connect the HTML Fetch Service
Configure the HTTP request to scrape the webpage specified in the new sheet row.
- Open Dumpling HTML Fetch and set Method to
POST. - Set URL to
https://app.dumplingai.com/api/v1/scrape. - Enable Send Body and Send Headers.
- Set Body Content Type to
JSON. - Set JSON Body to
{ "url": "{{ $('Sheet Row Watcher')}}", "format": "html", "cleaned": "True" }. - Set Authentication to
genericCredentialTypeand Generic Auth Type tohttpHeaderAuth. - Add a header parameter with Name
Content-Typeand Valueapplication/json. - Credential Required: Connect your
httpHeaderAuthcredentials (andhttpBasicAuthif your endpoint requires it).
Step 3: Set Up HTML Parsing and Item Splitting
Extract the book blocks and parse each book’s title and price.
- Open Capture Book Blocks and set Operation to
extractHtmlContent. - Set Data Property Name to
content. - In Extraction Values, set Key to
books, CSS Selector to.row > li, Return Array to True, and Return Value tohtml. - Open Split Book Items and set Field To Split Out to
books. - Open Parse Book Details and set Operation to
extractHtmlContent. - Set Data Property Name to
books. - In Extraction Values, add Key
titlewith CSS Selectorh3 > aand Return Valueattributeusing Attributetitle. - Add another extraction value with Key
priceand CSS Selector.price_color.
Step 4: Configure Sorting and Email Output
Sort the parsed data, convert it into a CSV file, and email the report.
- Open Order by Price and set Field Name to
pricewith Orderdescending. - Open Build CSV File and keep the default settings to convert the incoming items into a file.
- Open Email CSV Report and set Subject to
bookstore csv. - Set Message to
Hey, here's the scraped data from the online bookstore!and Email Type totext. - In Attachments, ensure the binary attachment is enabled to include the CSV generated by Build CSV File.
- Credential Required: Connect your
gmailOAuth2credentials.
Step 5: Test and Activate Your Workflow
Run a manual test and then activate the workflow for ongoing monitoring.
- Click Execute Workflow and add a new row with a valid book URL in your Google Sheet.
- Verify that Dumpling HTML Fetch returns HTML content, and that Parse Book Details outputs
titleandpricefields. - Confirm that Build CSV File produces a CSV file and Email CSV Report sends an email with the attachment.
- When the test succeeds, toggle the workflow to Active for production use.
Common Gotchas
- Google Sheets credentials can expire or need specific permissions. If things break, check the n8n credential connection status and the Google account access first.
- Dumpling AI scraping can fail if the site blocks bots or the URL redirects unexpectedly. When the HTML output looks empty, confirm the exact URL in your Sheet and test the Dumpling request with the same parameters.
- Prices are often extracted as strings, not numbers. If your sort seems “wrong,” it’s usually because the currency symbol or text is still present, so adjust the parsing or add a cleanup step before sorting.
Frequently Asked Questions
About 30 minutes if your accounts are already connected.
No. You’ll mostly paste in credentials and confirm the CSS selectors match the site you’re scraping.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Dumpling AI usage credits per scrape request.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, and it’s honestly the best way to get more value out of it. Add new CSS selectors in the “Parse Book Details” HTML parsing step to pull fields like author, availability, and the product link. If you want the email to go to a client automatically, keep the same CSV build step and just change the recipient in the Gmail node. You can also swap the “Order by Price” logic to sort alphabetically or by stock status if that’s what your report needs.
Usually it’s expired OAuth access or missing Gmail permissions in your connected Google account. Reconnect the Gmail credential inside n8n, then run a single test URL to confirm the “Email CSV Report” step can send attachments. If your mailbox has stricter security settings, you may also need to allow the app connection in your Google account settings.
A few hundred URLs per month is realistic on most setups, and self-hosting scales further if your server can handle the load.
Often, yes, because this kind of workflow benefits from flexible parsing, sorting, and file-building in one place. Zapier and Make can do parts of it, but scraping + HTML parsing + sorting can get awkward (and expensive) once you go beyond simple two-step zaps. n8n also gives you the self-hosting option, which matters if you run lots of URLs or want fewer platform limits. If you only need a basic “new row → send email” flow, Zapier is fine. Talk to an automation expert if you want a quick recommendation for your exact volume.
Once this is running, “build the report” becomes “add the URL.” The workflow handles the repetitive parts so you can spend your time on the decisions the report is supposed to support.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.