Skip to main content

Extract Amazon book data & generate purchase reports with Decodo Scraper

Workflow preview

Workflow preview
100%
Extract Amazon book data & generate purchase reports with Decodo Scraper preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Decodo Scraper API Workflow Template (n8n Automation Amazon Book Purchase Report) Watch the demo video below: [![Watch the video](https://s3.ap southeast 1.amazonaws.com/automatewith.me/how to use ...

Best for

  • Document Extraction automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.httprequest, n8n-nodes-base.googledrive, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.code

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Trung Tran.

Original n8n.io source

1.1 Workflow description

Title
Extract Amazon book data & generate purchase reports with Decodo Scraper
Workflow name
Extract Amazon book data & generate purchase reports with Decodo Scraper

Decodo Scraper API Workflow Template (n8n Automation Amazon Book Purchase Report)

Watch the demo video below:

> This workflow demos how to use Decodo Scraper API to crawl any public web page (headless JS, device emulation: mobile/desktop/tablet), extract structured product data from the returned HTML, generate a purchase-ready report, and automatically deliver it as a Google Doc + PDF to Slack/Drive.

🚀 Try Decodo — Web Scraping & Data API (Coupon: TRUNG)

Decodo is a powerful public data access platform offering managed web scraping APIs and proxy infrastructure to collect structured web data at scale. It handles proxies, anti-bot protection, JavaScript rendering, retries, and global IP rotation—so you can focus on data, not scraping complexity. Why Decodo

  • Managed Web Scraping API with anti-bot bypass & high success rates
  • Works with JS-heavy sites; outputs JSON/HTML/CSV
  • Easy integration (Python, Node.js, cURL) for eCommerce, SERP, social & general web data 🎟️ Special Discount Use coupon TRUNG to get the Advanced Scraping API plan — ~23,000 requests for ~$5.

Who’s it for

  • Creators / Analysts who need quick product lists (books, gadgets, etc.) with prices/ratings.
  • Ops & Marketing teams building weekly “top picks” reports.
  • Engineers validating the Decodo Scraper API + LLM extraction pattern before scaling.

How it works / What it does

  1. Trigger – Manually run the workflow.
  2. Edit Fields (manual) – Provide inputs:
    • targetUrl (e.g., an Amazon category/search/listing page)
    • deviceType (desktop | mobile | tablet)
    • Optional: maxItems, notes, reportTitle, reportOwner
  3. Scraper API Request (HTTP Request → POST)
    Calls Decodo Scraper API with:
    • URL to crawl, headless JS enabled
    • Device emulation (UA + viewport)
    • Optional waitFor / executeJS to ensure late-loading content is captured
  4. HTML Response Parser (Code/Function or HTML node)
    Pulls the HTML string from Decodo response and normalizes it (strip scripts/styles, collapse whitespace).
  5. Product Analyzer Agent (LLM + Structured Output Parser)
    Prompts an LLM to extract structured “book” objects from the HTML: The Structured Output Parser enforces a strict JSON schema and drops malformed items.
  6. Build 📚 Book Purchase Report (Code/LLM)
    Converts the JSON array into a Markdown (or HTML) report with:
    • Executive summary (top picks, average price/rating)
    • Table of items (rank, title, author, price, rating, link)
    • “Recommended to buy” shortlist (rules configurable)
    • Notes / owner / timestamp
  7. Configure Google Drive Folder (manual)
    Choose/create a Drive folder for output artifacts.
  8. Create Document File (Google Docs API)
    Creates a Doc from the generated Markdown/HTML.
  9. Convert Document to PDF (Google Drive export)
    Exports the Doc to PDF.
  10. Upload report to Slack
    Sends the PDF (and/or Doc link) to a chosen Slack channel with a short summary.

How to set up

1 Prerequisites

  • n8n (self-hosted or Cloud)
  • Decodo Scraper API key
  • OpenAI (or compatible) API key for the Analyzer Agent
  • Google Drive/Docs credentials (OAuth2)
  • Slack Bot/User token (files:write, chat:write)

2 Environment variables (recommended)

  • DECODO_API_KEY
  • OPENAI_API_KEY
  • DRIVE_FOLDER_ID (optional default)
  • SLACK_CHANNEL_ID

3 Nodes configuration (high level)

Edit Fields (Set node) Scraper API Request (HTTP Request → POST) HTML Response Parser (Code node) Product Analyzer Agent Build Book Purchase Report (Code/LLM) Create Document File Convert to PDF Upload to Slack

Requirements

  • Decodo: Active API key and endpoint access. Be mindful of concurrency/rate limits.
  • Model: GPT-4o/4.1-mini or similar for reliable structured extraction.
  • Google: OAuth client (Docs/Drive scopes). Ensure n8n can write to the target folder.
  • Slack: Bot token with files:write + chat:write.

How to customize the workflow

  • Target site: Change targetUrl to any public page (category, search, or listing).
    For other domains (not Amazon), tweak the LLM guidance (e.g., price/label patterns).
  • Device emulation: Switch deviceType to mobile to fetch mobile-optimized markup (often simpler DOMs).
  • Late-loading pages: Adjust waitFor.selector or use waitUntil: "networkidle" (if supported) to ensure full content loads.
  • Client-side JS: Extend executeJS if you need to interact (scroll, click “next”, expand sections). You can also loop over pagination by iterating URLs.
  • Extraction schema: Add fields (e.g., discount_percent, bestseller_badge, prime_eligible) and update the Structured Output schema accordingly.
  • Filtering rules: Modify recommendation logic (e.g., min ratings count, price bands, languages).
  • Report branding: Add logo, cover page, footer with company info; switch to HTML + inline CSS for richer Docs formatting.
  • Destinations: Besides Slack & Drive, add Email, Notion, Confluence, or a database sink.
  • Scheduling: Add a Cron trigger for weekly/monthly auto-reports.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 3 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 4 - Create document file

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 5 - Convert document to PDF

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 6 - Configure Google Drive Folder

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 7 - Product Analyzer Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.1

Block 8 - Edit Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 9 - HTML Response Parser

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 10 - Upload report to Slack

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.3

Block 11 - Build 📚 Book Purchase Report

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 12 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note9

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Decodo

Type / Role
@decodo/n8n-nodes-decodo.decodo - decodo
Config choices
Version 1

3. Summary Table

Workflow Extract Amazon book data & generate purchase reports with Decodo Scraper
Complexity advanced
Nodes 22
Categories Document Extraction, Multimodal AI
Author Trung Tran
Published 02 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8142/8142.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Extract Amazon book data & generate purchase reports with Decodo Scraper do?

Decodo Scraper API Workflow Template (n8n Automation Amazon Book Purchase Report) Watch the demo video below: [![Watch the video](https://s3.ap southeast 1.amazonaws.com/automatewith.me/how to use ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, Multimodal AI use case.