Back to Catalog

Smart shipping prioritization with Google Gemini and Google Sheets

Roni BandiniRoni Bandini
320 views
2/3/2026
Official Page

How it works This template waits for an external button to be pressed via webhook, then reads a Google Sheet with pending shipments. The sheet contains the columns: idEnvio, fechaOrden, nombre, direccion, detalle, and enviado. It determines the next shipment using Google Gemini Flash 2.5, considering not only the date but also the customer’s comments. Once the next shipment is selected, the column “enviado” is updated with an X, and the shipping information is forwarded to Unihiker’s n8n Terminal.

Setup Create a new Google Sheet and name it "Shipping".

Add the following column headers in the first row: idEnvio, fechaOrden, nombre, direccion, detalle, and enviado.

Connect your Google Sheets and Google Gemini credentials.

In your n8n workflow, select the Shipping sheet in the Google Sheets node.

Copy the webhook URL and paste it into the .ino code for your Unihiker n8n Terminal. 🚀

Smart Shipping Prioritization with Google Gemini and Google Sheets

This n8n workflow leverages the power of Google Gemini AI to intelligently prioritize shipping orders based on various criteria stored in a Google Sheet. It acts as an API endpoint, allowing external systems to request prioritization for a given order, and then updates the Google Sheet with the AI-driven priority.

What it does

This workflow automates the following steps:

  1. Receives a Webhook Request: It listens for incoming HTTP requests, typically containing details about a new shipping order that needs prioritization.
  2. Analyzes Order Data with Google Gemini: It uses an AI Agent powered by Google Gemini to process the incoming order data. The AI agent is configured to understand and apply prioritization logic.
  3. Parses AI Output: The AI Agent's response, which includes the calculated priority, is then parsed to extract structured information.
  4. Updates Google Sheet: The workflow writes the newly determined priority back to a specified Google Sheet, associating it with the relevant order.
  5. Responds to Webhook: It sends a response back to the original caller, confirming the prioritization and potentially including the assigned priority.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running n8n instance.
  • Google Sheets Account: A Google account with access to Google Sheets.
  • Google Gemini API Key: Access to the Google Gemini API, configured as a credential in n8n for the "Google Gemini Chat Model" node.
  • Google Sheets Credentials: Google Sheets credentials configured in n8n (OAuth 2.0 or Service Account recommended).

Setup/Usage

  1. Import the Workflow:
    • Copy the provided JSON code.
    • In your n8n instance, go to "Workflows" and click "New".
    • Click the "Import from JSON" button and paste the workflow JSON.
  2. Configure Credentials:
    • Locate the "Google Sheets" node and configure your Google Sheets credentials.
    • Locate the "Google Gemini Chat Model" node and configure your Google Gemini API key.
  3. Configure Google Sheets Node:
    • Specify the Google Sheet ID and the sheet name where your shipping orders are stored and where the priority should be written.
    • Ensure the column headers in your Google Sheet match the data expected by the workflow (e.g., "Order ID", "Priority").
  4. Activate the Webhook:
    • The "Webhook" node will provide a unique URL once the workflow is activated. This is the endpoint you will call from your external system.
  5. Test the Workflow:
    • Send a test request to the Webhook URL with sample order data to ensure the AI processes it correctly and updates the Google Sheet.

This workflow provides a robust solution for automating and enhancing your shipping prioritization process using advanced AI capabilities.

Related Templates

Tax deadline management & compliance alerts with GPT-4, Google Sheets & Slack

AI-Driven Tax Compliance & Deadline Management System Description Automate tax deadline monitoring with AI-powered insights. This workflow checks your tax calendar daily at 8 AM, uses GPT-4 to analyze upcoming deadlines across multiple jurisdictions, detects overdue and critical items, and sends intelligent alerts via email and Slack only when immediate action is required. Perfect for finance teams and accounting firms who need proactive compliance management without manual tracking. 🏛️🤖📊 Good to Know AI-Powered: GPT-4 provides risk assessment and strategic recommendations Multi-Jurisdiction: Handles Federal, State, and Local tax requirements automatically Smart Alerts: Only notifies executives when deadlines are overdue or critical (≤3 days) Priority Classification: Categorizes deadlines as Overdue, Critical, High, or Medium priority Dual Notifications: Critical alerts to leadership + daily summaries to team channel Complete Audit Trail: Logs all checks and deadlines to Google Sheets for compliance records How It Works Daily Trigger - Runs at 8:00 AM every morning Fetch Data - Pulls tax calendar and company configuration from Google Sheets Analyze Deadlines - Calculates days remaining, filters by jurisdiction/entity type, categorizes by priority AI Analysis - GPT-4 provides strategic insights and risk assessment on upcoming deadlines Smart Routing - Only sends alerts if overdue or critical deadlines exist Critical Alerts - HTML email to executives + Slack alert for urgent items Team Updates - Slack summary to finance channel with all upcoming deadlines Logging - Records compliance check results to Google Sheets for audit trail Requirements Google Sheets Structure Sheet 1: TaxCalendar DeadlineID | DeadlineName | DeadlineDate | Jurisdiction | Category | AssignedTo | IsActive FED-Q1 | Form 1120 Q1 | 2025-04-15 | Federal | Income | John Doe | TRUE Sheet 2: CompanyConfig (single row) Jurisdictions | EntityType | FiscalYearEnd Federal, California | Corporation | 12-31 Sheet 3: ComplianceLog (auto-populated) Date | AlertLevel | TotalUpcoming | CriticalCount | OverdueCount 2025-01-15 | HIGH | 12 | 3 | 1 Credentials Needed Google Sheets - Service Account OAuth2 OpenAI - API Key (GPT-4 access required) SMTP - Email account for sending alerts Slack - Bot Token with chat:write permission Setup Steps Import workflow JSON into n8n Add all 4 credentials Replace these placeholders: YOURTAXCALENDAR_ID - Tax calendar sheet ID YOURCONFIGID - Company config sheet ID YOURLOGID - Compliance log sheet ID C12345678 - Slack channel ID tax@company.com - Sender email cfo@company.com - Recipient email Share all sheets with Google service account email Invite Slack bot to channels Test workflow manually Activate the trigger Customizing This Workflow Change Alert Thresholds: Edit "Analyze Deadlines" node: Critical: Change <= 3 to <= 5 for 5-day warning High: Change <= 7 to <= 14 for 2-week notice Medium: Change <= 30 to <= 60 for 2-month lookout Adjust Schedule: Edit "Daily Tax Check" trigger: Change hour/minute for different run time Add multiple trigger times for tax season (8 AM, 2 PM, 6 PM) Add More Recipients: Edit "Send Email" node: To: cfo@company.com, director@company.com CC: accounting@company.com BCC: archive@company.com Customize Email Design: Edit "Format Email" node to change colors, add logo, or modify layout Add SMS Alerts: Insert Twilio node after "Is Critical" for emergency notifications Integrate Task Management: Add HTTP Request node to create tasks in Asana/Jira for critical deadlines Troubleshooting | Issue | Solution | |-------|----------| | No deadlines found | Check date format (YYYY-MM-DD) and IsActive = TRUE | | AI analysis failed | Verify OpenAI API key and account credits | | Email not sending | Test SMTP credentials and check if critical condition met | | Slack not posting | Invite bot to channel and verify channel ID format | | Permission denied | Share Google Sheets with service account email | 📞 Professional Services Need help with implementation or customization? Our team offers: 🎯 Custom workflow development 🏢 Enterprise deployment support 🎓 Team training sessions 🔧 Ongoing maintenance 📊 Custom reporting & dashboards 🔗 Additional API integrations Discover more workflows – Get in touch with us

Oneclick AI SquadBy Oneclick AI Squad
93

Automate loan document analysis with Mistral OCR and GPT for underwriting decisions

LOB Underwriting with AI This template ingests borrower documents from OneDrive, extracts text with OCR, classifies each file (ID, paystub, bank statement, utilities, tax forms, etc.), aggregates everything per borrower, and asks an LLM to produce a clear underwriting summary and decision (plus next steps). Good to know AI and OCR usage consume credits (OpenAI + your OCR provider). Folder lookups by name can be ambiguous—use a fixed folderId in production. Scanned image quality drives OCR accuracy; bad scans yield weak text. This flow handles PII—mask sensitive data in logs and control access. Start small: batch size and pagination keep costs/memory sane. How it works Import & locate docs: Manual trigger kicks off a OneDrive folder search (e.g., “LOBs”) and lists files inside. Per-file loop: Download each file → run OCR → classify the document type using filename + extracted text. Aggregate: Combine per-file results into a borrower payload (make BorrowerName dynamic). LLM analysis: Feed the payload to an AI Agent (OpenAI model) to extract underwriting-relevant facts and produce a decision + next steps. Output: Return a human-readable summary (and optionally structured JSON for systems). How to use Start with the Manual Trigger to validate end-to-end on a tiny test folder. Once stable, swap in a Schedule/Cron or Webhook trigger. Review the generated underwriting summary; handle only flagged exceptions (unknown/unreadable docs, low confidence). Setup steps Connect accounts Add credentials for OneDrive, OCR, and OpenAI. Configure inputs In Search a folder, point to your borrower docs (prefer folderId; otherwise tighten the name query). In Get items in a folder, enable pagination if the folder is large. In Split in Batches, set a conservative batch size to control costs. Wire the file path Download a file must receive the current file’s id from the folder listing. Make sure the OCR node receives binary input (PDFs/images). Classification Update keyword rules to match your region/lenders/utilities/tax forms. Keep a fallback Unknown class and log it for review. Combine Replace the hard-coded BorrowerName with: a Set node field, a form input, or parsing from folder/file naming conventions. AI Agent Set your OpenAI model/credentials. Ask the model to output JSON first (structured fields) and Markdown second (readable summary). Keep temperature low for consistent, audit-friendly results. Optional outputs Persist JSON/Markdown to Notion/Docs/DB or write to storage. Customize if needed Doc types: add/remove categories and keywords without touching core logic. Error handling: add IF paths for empty folders, failed downloads, empty OCR, or Unknown class; retry transient API errors. Privacy: redact IDs/account numbers in logs; restrict execution visibility. Scale: add MIME/size filters, duplicate detection, and multi-borrower folder patterns (parent → subfolders).

Vinay GangidiBy Vinay Gangidi
471

PartnerStack/Impact → WooCommerce product creation with GPT-4 & AI images

🚀 PartnerStack/Impact → WooCommerce (AI-Powered Product Automation) Turn affiliate programs into fully published WooCommerce products—on autopilot. This n8n template pulls offers from PartnerStack/Impact (or your own links), generates SEO copy and images with AI, and publishes External products to WordPress/WooCommerce—hands-free. --- 🎯 What This Automation Does ⏰ Runs on a schedule (e.g., daily at 10:00 or every 3 days) 📄 Reads rows from Google Sheets (your affiliate product registry) 🔗 Inserts your affiliate link (PartnerStack/Impact/CJ or manual) 🌐 Fetches product/landing page and parses key details 🤖 Uses AI to create product title, short & long HTML description 🖼️ Creates a product image from an AI image prompt 🗂️ Uploads media to WordPress, sets alt/title/caption 🛒 Creates a WooCommerce External product via REST API 🏷️ Applies category by ID and sets the featured image ✅ Marks the row as published to avoid duplicates 🧯 Graceful error handling (failed fetches are flagged & skipped next run) 🛒 Output of Wordpress Website Product: [](https://brenttechnologies.com/) --- 🧑‍🏫 Step-by-Step Video Tutorial 🎥 Watch the implementation tutorial: [](https://youtu.be/Pifwn32vlQk) 📌 Live demo: schedule, sheet → product, AI copy/image, REST publish. --- 🌐 Useful Links 🔗 Start with n8n (Cloud or Self-hosted): 👉 https://n8n.io | Guide: https://syncbricks.com/self-hosting-n8n-on-ubuntu-24-04-a-step-by-step-guide/ 🧠 OpenAI API (text + image): 👉 https://platform.openai.com/docs 🤝 PartnerStack: 👉 https://partnerstack.com 📄 Google Sheets API: 👉 https://developers.google.com/sheets/api --- 🛠 Prerequisites ✅ n8n (self-hosted or Cloud) ✅ WordPress + WooCommerce with REST API enabled ✅ WordPress Application Password / API credential with media & products scope ✅ OpenAI (or your preferred AI) API key ✅ Google Sheet with minimum columns: AdvertiserIdandCompaignID (unique key) AdvertiserUrl (merchant/product URL) TrackingLink (your affiliate URL) Brand partner_status (e.g., “Active”) product_published (Yes/blank) error (Yes/blank) --- 📋 Step-by-Step Implementation 1️⃣ Scheduling & Intake Add a Schedule Trigger (daily, every 3 days, or your cadence). Google Sheets → Read: pull rows from your “impact/partnerstack” tab. Filter rows: partnerstatus = Active AND productpublished != Yes AND error != Yes. Limit to 1 per run (safe scaling). Increase later if needed. 2️⃣ Product Discovery & Parsing HTTP Request the AdvertiserUrl to fetch the landing/product page. Parse title/meta/summary; continue on error and flag failures (so runs don’t break). 3️⃣ AI Content Generation Agent 1 – Basics: Product Name, Short Description, Category ID mapping (match your Woo categories). Agent 2 – Long Form: SEO-ready HTML description (H2/H3, bullets, features, benefits, target users, technical highlights). Agent 3 – Image Prompt: Generate a clean product-hero prompt; then AI Image generation. 4️⃣ Media Handling Upload media to WordPress (/wp/v2/media) with title/alt/caption and proper content-type. Capture the media ID for the next step. 5️⃣ WooCommerce Product Creation Create product via POST /wc/v3/products with: type: "external" name, short_description, description external_url: TrackingLink button_text: "Sign Up" (or “Buy Now” / “Get It Now”) status: "publish" (or “draft” if you want manual review) Attach featured image with the uploaded media ID. Set categories by ID (ensure your mapping is correct). 6️⃣ Post-Publish Updates Update the Google Sheet row using the unique key (AdvertiserIdandCompaignID): product_published = Yes Clear/reset any transient error flags. 7️⃣ Error Handling & Idempotency If fetch fails (e.g., Cloudflare/Turnstile), mark error = Yes and skip that row next run. Filter excludes error = Yes and already-published rows—no accidental duplicates. --- 💰 Optional Monetization & Distribution Blog & Social: Add branches to generate a blog article, LinkedIn/Twitter posts from the same product data. Video: Create a short promo video (Sora/Gen-AI) and auto-schedule to TikTok/YouTube/Instagram. Email: Trigger a campaign (e.g., Brevo/Mailchimp) for new products added this week. --- 💡 Advanced Customizations Draft workflow: publish products as draft for human QA. Category Mapper: expand the category ID table to fit your Woo taxonomy. Image sizing: add an optional resize/optimize node before upload. Batching: remove the Limit node to publish multiple products per run (respect rate limits). Per-brand theming: vary prompts (tone/structure) based on Brand column. --- 🧰 Troubleshooting | Issue | Fix | | ----------------------------- | ---------------------------------------------------------------------------------------- | | WordPress 401/403 | Re-create Application Password; ensure correct base URL & permalinks | | Image upload fails | Check content-type & binary upload settings; verify max upload size on server | | Product lacks image/category | Confirm media ID capture & category ID mapping | | Duplicate items | Ensure product_published is set to Yes after success; keep Limit node during testing | | Fetch errors on merchant site | Keep “continue on error”; route to set error = Yes, then review manually | --- 🙌 Why Use This Template ⏱️ Saves hours of manual listing work 📈 SEO-consistent product pages every time 🧠 AI-quality copy & images with your tone 🔗 Affiliate link everywhere, fully tracked 🛠️ Extensible to blog, social, video, and email --- 🚀 Get Started Now Import the template → Connect credentials → Point to your Sheet → Run once → Enable schedule. Need help or a DFY build? SyncBricks can implement and customize this for your stack. 👉 Amjid Ali — https://linkedin.com/in/amjidali 🌐 Website — https://amjidali.com | https://syncbricks.com.au ▶️ YouTube — https://youtube.com/@syncbricks --- Knowledge Base: woocommerce-rest, partnerstack, impact, affiliate-automation, openai, n8n, google-sheets, content-generation, image-generation, wordpress-api, creator-hub

Amjid AliBy Amjid Ali
101