Quick overview Screen contracts, intake forms, and reports for HIPAA, GDPR, and PCI data — plus always-on prompt-injection detection — before Claude summarizes them. Clean documents pass through, risky ones get flagged for review or blocked, and every document gets an audit row in a Google Sheet. How it works Receives a POST request to a webhook containing either a PDF upload or a JSON body with a text field. Extracts text from PDFs or uses the provided JSON text as-is. Sends the document text to PromptLock Guard to screen for regulated-data and prompt-injection risk, failing closed on screening errors. If the document is allowed or redacted, sends the cleaned text to Anthropic Claude and returns a structured JSON analysis in the webhook response. If the document is flagged, sends a Gmail notification email for human review instead of sending the content to the AI model. If the document is blocked (or screening is unavailable), returns a JSON webhook response indicating the block/unverified reason. Appends a per-document audit row (timestamp, action taken, risk score, and compliance status) to a DocAuditLog tab in Google Sheets.
Tags
Related workflows
See all Gmail→Move data between JSON and spreadsheets
This workflow illustrates how to convert data from JSON to binary format and import JSON data or files into Google Sheets or local spreadsheets.
Generate an FAQ MP3 library from form input with OpenAI TTS, Google Drive, Sheets and Gmail
Quick overview This workflow collects up to five FAQ questions and answers from an n8n Form, converts each entry to an MP3 using OpenAI text-to-speech, uploads the files to Google Drive, logs links in Google Sheets, and emails a summary with listen and download links via Gmail. How it works Receives an n8n Form submission containing the requester’s email, a FAQ category, and up to five question-and-answer pairs. Splits the submitted FAQ pairs into individual items, generating a TTS script and a safe MP3 filename for each valid question and answer. Calls the OpenAI Audio Speech API (tts-1) to generate an MP3 file for each FAQ script. Uploads each generated MP3 to a specified Google Drive folder. Builds Google Drive view and direct-download URLs for each uploaded file and appends the FAQ details and links to a Google Sheets tab. Aggregates all processed FAQs into a single HTML summary and sends it to the submitter via Gmail with listen and download links. Setup Add an OpenAI API credential for the HTTP request to the OpenAI Audio Speech endpoint. Create (or choose) a Google Drive folder for the audio files, connect Google Drive OAuth2, and replace YOUR_AUDIO_FOLDER_ID with the target
Extract and validate invoice PDFs with OpenAI, Google Sheets, and Gmail
Quick overview This workflow collects an invoice PDF via an n8n Form, extracts text from the PDF, uses OpenAI to convert it into structured invoice JSON, logs invoice headers and line items to Google Sheets, validates totals, and emails a formatted extraction report via Gmail. How it works Receives an invoice submission through an n8n Form that includes the uploader’s name, email address, currency, notes, and a PDF file. Extracts text content from the uploaded PDF. Sends the extracted text to OpenAI (Chat Completions) to return invoice fields and all line items as a strict JSON object. Parses and validates the returned JSON, enriching it with the form metadata and stopping the run if key fields (like invoice number or line items) are missing. Appends a single invoice “header” row to the Invoices tab in Google Sheets. Splits the extracted line items, adds per-line metadata and a unique key, and appends each line item as a row to the Line Items tab in Google Sheets. Aggregates all line items, verifies that their summed totals match the invoice total within a tolerance, builds an HTML report, and emails it to the submitter via Gmail. Setup Add an OpenAI API credential and ensure the O