Validate bills of lading, send Gmail replies, and post JSON with Google Gemini
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
At a glance
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.
- Platform
- n8n
- Connects
- Gmail, Gemini
- Modules
- 12
- Price
- Free
- Version
- v1.0

About this workflow
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.
How to import this n8n workflow
- 1
Download the workflow JSON file after purchase.
- 2
Open n8n → click the menu → Import from File.
- 3
Select the downloaded JSON and import.
- 4
Set up credentials for each node that requires them.
- 5
Click Execute Workflow to test, then activate.
Setup guide
Setup guide included
Purchase to unlock the full step-by-step guide
Related N8n workflows
Extract and clean YouTube video transcripts with RapidAPI
Change background image for Gmail attachments using Remove.bg and add it to Airtable
Generate complete SEO audits with Apify, Claude Sonnet 4, and Gmail delivery
Automated BBB Lead Generation with BrowserAct
Personalized thank-you emails with website scraping, GPT-4o, and Gmail
Publish SEO blogs to WordPress with GPT-4.1, DALL-E, Gemini, and Google Sheets
Post on X using Airtop and automate content pipelines
Daily habit RPG: Gamified Gmail reminders with quest system and progress tracking
Reviews
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.
- JSON blueprint — instant download
- Setup guide PDF included
- 5 downloads · valid 30 days
- Works with n8n
Need help setting this up?
Book a 3-hour live setup session with an Agility consultant.
- Configure live on Google Meet / Zoom
- Free follow-up if workflow has defects
- Platform expert assigned to you