Quick overview This workflow triggers on a Gmail message from a specific sender, extracts bill of lading data from an email attachment using Google Gemini, validates the extracted values with Python, posts the structured JSON to a webhook URL, and replies to the sender with an HTML acceptance email. How it works 1. Triggers when a new Gmail email arrives from the configured sender and downloads the attached document. 2. Uses Google Gemini to analyze the attachment and rewrite the bill of
Validate bills of lading, send Gmail replies, and post JSON with Google Gemini is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects Gmail, Gemini. It's free to download. Follow the 5-step import below to go live in minutes.

Quick overview This workflow triggers on a Gmail message from a specific sender, extracts bill of lading data from an email attachment using Google Gemini, validates the extracted values with Python, posts the structured JSON to a webhook URL, and replies to the sender with an HTML acceptance email. How it works 1. Triggers when a new Gmail email arrives from the configured sender and downloads the attached document. 2. Uses Google Gemini to analyze the attachment and rewrite the bill of lading content into a structured Markdown format. 3. Uses a second Google Gemini agent with a structured output schema to convert the Markdown into validated JSON fields for shipper, consignee, shipment details, and line items. 4. Runs a Python validation that compares customer order package/weight values against the carrier line items and appends a validation result to the JSON. 5. Sends the resulting JSON payload to an external HTTP webhook endpoint. 6. Uses Google Gemini to draft an HTML acceptance reply email based on the validated data and sends it back to the original sender via Gmail. Setup 1. Connect your Gmail OAuth2 credentials and set the sender filter (and any other Gmail Trigger options) to match the emails you want to process. 2. Add Google Gemini (PaLM) API credentials and confirm the selected Gemini models are available in your account. 3. Ensure the incoming emails include a compatible bill of lading attachment and update the binary attachment property name if it differs from attachment0. 4. Replace the HTTP Request URL with your own endpoint that should receive the structured JSON payload. 5. Review the structured JSON schema and the Python validation logic to match your required fields and matching rules before enabling the workflow. Customization - Any LLM provider can do the task, change Gemini with any AI you can use Additional info This is an example of prompt chaining. It is an AI agent workflow that shows the benefit of chaining several LLMs together.
Download the workflow JSON file after purchase.
Open n8n → click the menu → Import from File.
Select the downloaded JSON and import.
Set up credentials for each node that requires them.
Click Execute Workflow to test, then activate.
Setup guide included
Purchase to unlock the full step-by-step guide
Discover business leads with Gemini, Brave Search and web scraping
Analyze Landing Page with OpenAI and Get Optimization Tips
Prevent duplicate webhook executions with AARI idempotency gate
Generate trend-based marketing videos with Seedance AI, Perplexity, and GPT
Build a knowledge base chatbot with Jotform, RAG Supabase, Together AI & Gemini
Gmail smart auto-responder with GPT-4o and Google Drive context memory
No reviews yet
Be the first to buy and share your experience.
Leave a review
Sign in to share your experience with this workflow.
Create a free account to purchase workflows.
Need help setting this up?
Book a 3-hour live setup session with an Agility consultant.