๐Ÿ”ฌ Generate hardware PDF catalogs from Google Sheets with PDFShift, Gmail, and Google Drive

โšก 2 views ยท ๐Ÿ”ฌ Document Extraction & Analysis

Description

Quick overview

This workflow exposes a webhook that searches a Google Sheets hardware catalog by keyword and maximum price, renders the matching results into an HTML catalog, converts it to a PDF via PDFShift, returns the HTML to the requester, emails the PDF with Gmail, and archives it in Google Drive.

How it works

  1. Receives a webhook request with search, maxPrice, and optional email query parameters.
  2. Reads the full hardware product list from a Google Sheets spreadsheet.
  3. Filters products by name/category keyword match and price threshold, calculates summary metrics, and generates a styled HTML catalog (sanitizing the email input and using a default if missing).
  4. Sends the HTML to the PDFShift API to convert it into a PDF file.
  5. Uploads the generated PDF to a specified Google Drive folder as a dated backup.
  6. Emails the PDF as an attachment using Gmail with the search summary in the message.
  7. Responds to the webhook request with the generated HTML (served as text/html).

Setup

  1. Create and connect Google Sheets OAuth2 credentials and set the correct spreadsheet ID and sheet tab for your hardware catalog.
  2. Add a PDFShift API key and replace the hard-coded Authorization header value in the HTTP request to PDFShift.
  3. Create and connect Gmail OAuth2 credentials, and set the recipient logic (use the webhook email parameter or update the static sendTo address).
  4. Create and connect Google Drive OAuth2 credentials, and select the target Drive and folder ID where PDF backups should be stored.
  5. Copy the webhook URL from n8n and call it with search/maxPrice/email query parameters from your browser, Postman, or source system.

Requirements

Customization

๐Ÿ”— Nodes Used

Google Sheets, Webhook, Google Drive, Gmail, Google Gemini

๐Ÿ“ฅ Import

Download workflow.json and import into n8n: Workflow menu โ†’ Import from File

๐Ÿ“– Importing guide ยท ๐Ÿ”‘ Credential setup