Back to Catalog
DIGITAL BIZ TECH

DIGITAL BIZ TECH

Digital Biz Tech builds practical AI systems that turn knowledge and workflows into real results. We deliver enterprise RAG platforms, automated social media engines, and reliable process automation that helps teams work faster and make smarter decisions. Consulting: shilpa.raju@digitalbiz.tech Website: digitalbiz.tech LinkedIn: linkedin.com/company/digital-biz-tech

Total Views4,183
Templates6

Templates by DIGITAL BIZ TECH

Document RAG & chat agent: Google Drive to Qdrant with Mistral OCR

Knowledge RAG & AI Chat Agent: Google Drive to Qdrant Description This workflow transforms a Google Drive folder into an intelligent, searchable knowledge base and provides a chat agent to query it. It’s composed of two distinct flows: An ingestion pipeline to process documents. A live chat agent that uses RAG (Retrieval-Augmented Generation) and optional web search to answer user questions. This system fully automates the creation of a “Chat with your docs” solution and enhances it with external web-searching capabilities. --- Quick Implementation Steps Import the workflow JSON into your n8n instance. Set up credentials for Google Drive, Mistral AI, OpenAI, and Qdrant. Open the Web Search node and add your Tavily AI API key to the Authorization header. In the Google Drive (List Files) node, set the Folder ID you want to ingest. Run the workflow manually once to populate your Qdrant database (Flow 1). Activate the workflow to enable the chat trigger (Flow 2). Copy the public webhook URL from the When chat message received node and open it in a new tab to start chatting. --- What It Does The workflow is divided into two primary functions: Knowledge Base Ingestion (Manual Trigger) This flow populates your vector database. Scans Google Drive: Lists all files from a specified folder. Processes Files Individually: Downloads each file. Extracts Text via OCR: Uses Mistral AI OCR API for text extraction from PDFs, images, etc. Generates Smart Metadata: A Mistral LLM assigns metadata like documenttype, project, and assignedto. Chunks & Embeds: Text is cleaned, chunked, and embedded via OpenAI’s text-embedding-3-small model. Stores in Qdrant: Text chunks, embeddings, and metadata are stored in a Qdrant collection (docaiauto). AI Chat Agent (Chat Trigger) This flow powers the conversational interface. Handles User Queries: Triggered when a user sends a chat message. Internal RAG Retrieval: Searches Qdrant Vector Store first for answers. Web Search Fallback: If unavailable internally, the agent offers to perform a Tavily AI web search. Contextual Responses: Combines internal and external info for comprehensive answers. --- Who's It For Ideal for: Teams building internal AI knowledge bases from Google Drive. Developers creating AI-powered support, research, or onboarding bots. Organizations implementing RAG pipelines. Anyone making unstructured Google Drive documents searchable via chat. --- Requirements n8n instance (self-hosted or cloud). Google Drive Credentials (to list and download files). Mistral AI API Key (for OCR & metadata extraction). OpenAI API Key (for embeddings and chat LLM). Qdrant instance (cloud or self-hosted). Tavily AI API Key (for web search). --- How It Works The workflow runs two independent flows in parallel: Flow 1: Ingestion Pipeline (Manual Trigger) List Files: Fetch files from Google Drive using the Folder ID. Loop & Download: Each file is processed one by one. OCR Processing: Upload file to Mistral Retrieve signed URL Extract text using Mistral DOC OCR Metadata Extraction: Analyze text using a Mistral LLM. Text Cleaning & Chunking: Split into 1000-character chunks. Embeddings Creation: Use OpenAI embeddings. Vector Insertion: Push chunks + metadata into Qdrant. Flow 2: AI Chat Agent (Chat Trigger) Chat Trigger: Starts when a chat message is received. AI Agent: Uses OpenAI + Simple Memory to process context. RAG Retrieval: Queries Qdrant for related data. Decision Logic: Found → Form answer. Not found → Ask if user wants web search. Web Search: Performs Tavily web lookup. Final Response: Synthesizes internal + external info. --- How To Set Up Import the Workflow Upload the provided JSON into your n8n instance. Configure Credentials Create and assign: Google Drive → Google Drive nodes Mistral AI → Upload, Signed URL, DOC OCR, Cloud Chat Model OpenAI → Embeddings + Chat Model nodes Qdrant → Vector Store nodes Add Tavily API Key Open Web Search node → Parameters → Headers Add your key under Authorization (e.g., tvly-xxxx). Node Configuration Google Drive (List Files): Set Folder ID. Qdrant Nodes: Ensure same collection name (docaiauto). Run Ingestion (Flow 1) Click Test workflow to populate Qdrant with your Drive documents. Activate Chat (Flow 2) Toggle the workflow ON to enable real-time chat. Test Open the webhook URL and start chatting! --- How To Customize Change LLMs: Swap models in OpenAI or Mistral nodes (e.g., GPT-4o, Claude 3). Modify Prompts: Edit the system message in ai chat agent to alter tone or logic. Chunking Strategy: Adjust chunkSize and chunkOverlap in the Code node. Different Sources: Replace Google Drive with AWS S3, Local Folder, etc. Automate Updates: Add a Cron node for scheduled ingestion. Validation: Add post-processing steps after metadata extraction. Expand Tools: Add more functional nodes like Google Calendar or Calculator. --- Use Case Examples Internal HR Bot: Answer HR-related queries from stored policy docs. Tech Support Assistant: Retrieve troubleshooting steps for products. Research Assistant: Summarize and compare market reports. Project Management Bot: Query document ownership or project status. --- Troubleshooting Guide | Issue | Possible Solution | |------------|------------------------| | Chat agent doesn’t respond | Check OpenAI API key and model availability (e.g., gpt-4.1-mini). | | Known documents not found | Ensure ingestion flow ran and both Qdrant nodes use same collection name. | | OCR node fails | Verify Mistral API key and input file integrity. | | Web search not triggered | Re-check Tavily API key in Web Search node headers. | | Incorrect metadata | Tune Information Extractor prompt or use a stronger Mistral model. | --- Need Help or More Workflows? Want to customize this workflow for your business or integrate it with your existing tools? Our team at Digital Biz Tech can tailor it precisely to your use case from automation logic to AI-powered enhancements. We can help you set it up for free — from connecting credentials to deploying it live. Contact: shilpa.raju@digitalbiz.tech Website: https://www.digitalbiz.tech LinkedIn: https://www.linkedin.com/company/digital-biz-tech/ You can also DM us on LinkedIn for any help. ---

DIGITAL BIZ TECHBy DIGITAL BIZ TECH
1409

Website chatbot with Google Drive knowledge base using GPT-4 and Mistral AI

AI-Powered Website Chatbot with Google Drive Knowledge Base Overview This workflow combines website chatbot intelligence with automated document ingestion and vectorization — enabling live Q&A from both chat input and processed Google Drive files. It uses Mistral AI for OCR + embeddings, and Qdrant for vector search. --- Chatbot Flow Trigger: When chat message received or webhook based upon deployed chatbot Model: OpenAI gpt-4.1-mini Memory: Simple Memory (Buffer Window) Vector Search Tool: Qdrant Vector Store Embeddings: Mistral Cloud Agent: website chat agent Responds based on chatdbtai Supabase content Enforces brand tone and informative documents. Integratration with both: Embedded chat UI Webhook --- Document → Knowledge Base Pipeline Triggered manually to keep vector store up-to-date. Steps Google Drive (brand folder) → Fetch files from folder Website kb (ID: 1o3DK9Ceka5Lqb8irvFSfEeB8SVGG_OL7) Loop Over Items → For each file: Set metadata Download file Upload to Mistral for OCR Get Signed URL Run OCR extraction (mistral-ocr-latest) If OCR success → Pass to chunking pipeline Else → skip and continue Chunking Logic (Code node) Splits document into 1,000-character JSON chunks Adds metadata (source, char positions, file ID) Default Data Loader + Text Splitter → Prepares chunks for embedding Embeddings (Mistral Cloud) → Generates embeddings for text chunks Qdrant Vector Store (Insert mode) → Saves embeddings into docragtestkb collection Wait → Optional delay between batches --- Integrations Used | Service | Purpose | Credential | |----------|----------|------------| | Google Drive | File source | Google Drive account 6 rn dbt | | Mistral Cloud | OCR + embeddings | Mistral Cloud account 2 dbt rn | | Qdrant | Vector storage | QdrantApi account | | OpenAI | Chat model | OpenAi account 8 dbt digi | --- Agent System Prompt Summary > “You are the official AI assistant for this website. Use chatdbtai only as your knowledge source. Respond conversationally, list offerings clearly, link blogs, and say ‘I couldn’t find that on this site’ if no match.” --- Key Features ✅ Automated OCR + chunking → vectorization ✅ Persistent memory for chat sessions ✅ Multi-channel (Webhook + Embedded Chat) ✅ Fully brand-guided, structured responses ✅ Live data retrieval from Qdrant vector store --- Summary > A unified workflow that turns brand files + web content into a knowledge base that powers a intelligent chatbot — capable of responding to visitors in real time, powered by Mistral, OpenAI, and Qdrant. --- Need Help or More Workflows? Want to customize this workflow for your business or integrate it with your existing tools? Our team at Digital Biz Tech can tailor it precisely to your use case from automation logic to AI-powered enhancements. 💡 We can help you set it up for free — from connecting credentials to deploying it live. Contact: shilpa.raju@digitalbiz.tech Website: https://www.digitalbiz.tech LinkedIn: https://www.linkedin.com/company/digital-biz-tech/ You can also DM us on LinkedIn for any help. ---

DIGITAL BIZ TECHBy DIGITAL BIZ TECH
1291

Ai website scraper & company intelligence

AI Website Scraper & Company Intelligence Description This workflow automates the process of transforming any website URL into a structured, intelligent company profile. It's triggered by a form, allowing a user to submit a website and choose between a "basic" or "deep" scrape. The workflow extracts key information (mission, services, contacts, SEO keywords), stores it in a structured Supabase database, and archives a full JSON backup to Google Drive. It also features a secondary AI agent that automatically finds and saves competitors for each company, building a rich, interconnected database of company intelligence. --- Quick Implementation Steps Import the Workflow: Import the provided JSON file into your n8n instance. Install Custom Community Node: You must install the community node from: https://www.npmjs.com/package/n8n-nodes-crawl-and-scrape FIRECRAWL N8N Documentation https://docs.firecrawl.dev/developer-guides/workflow-automation/n8n Install Additional Nodes: n8n-nodes-crawl-and-scrape and n8n-nodes-mcp fire crawl mcp . Set up Credentials: Create credentials in n8n for FIRE CRAWL API,Supabase, Mistral AI, and Google Drive. Configure API Key (CRITICAL): Open the Web Search tool node. Go to Parameters → Headers and replace the hardcoded Tavily AI API key with your own. Configure Supabase Nodes: Assign your Supabase credential to all Supabase nodes. Ensure table names (e.g., companies, competitors) match your schema. Configure Google Drive Nodes: Assign your Google Drive credential to the Google Drive2 and save to Google Drive1 nodes. Select the correct Folder ID. Activate Workflow: Turn on the workflow and open the Webhook URL in the “On form submission” node to access the form. --- What It Does Form Trigger Captures user input: “Website URL” and “Scraping Type” (basic or deep). Scraping Router A Switch node routes the flow: Deep Scraping → AI-based MCP Firecrawler agent. Basic Scraping → Crawlee node. Deep Scraping (Firecrawl AI Agent) Uses Firecrawl and Tavily Web Search. Extracts a detailed JSON profile: mission, services, contacts, SEO keywords, etc. Basic Scraping (Crawlee) Uses Crawl and Scrape node to collect raw text. A Mistral-based AI extractor structures the data into JSON. Data Storage Stores structured data in Supabase tables (companies, company_basicprofiles). Archives a full JSON backup to Google Drive. Automated Competitor Analysis Runs after a deep scrape. Uses Tavily web search to find competitors (e.g., from Crunchbase). Saves competitor data to Supabase, linked by company_id. --- Who's It For Sales & Marketing Teams: Enrich leads with deep company info. Market Researchers: Build structured, searchable company databases. B2B Data Providers: Automate company intelligence collection. Developers: Use as a base for RAG or enrichment pipelines. --- Requirements n8n instance (self-hosted or cloud) Supabase Account: With tables like companies, competitors, social_links, etc. Mistral AI API Key Google Drive Credentials Tavily AI API Key (Optional) Custom Nodes: n8n-nodes-crawl-and-scrape --- How It Works Flow Summary Form Trigger: Captures “Website URL” and “Scraping Type”. Switch Node: deep → MCP Firecrawler (AI Agent). basic → Crawl and Scrape node. Scraping & Extraction: Deep path: Firecrawler → JSON structure. Basic path: Crawlee → Mistral extractor → JSON. Storage: Save JSON to Supabase. Archive in Google Drive. Competitor Analysis (Deep Only): Finds competitors via Tavily. Saves to Supabase competitors table. End: Finishes with a No Operation node. --- How To Set Up Import workflow JSON. Install community nodes (especially n8n-nodes-crawl-and-scrape from npm). Configure credentials (Supabase, Mistral AI, Google Drive). Add your Tavily API key. Connect Supabase and Drive nodes properly. Fix disconnected “basic” path if needed. Activate workflow. Test via the webhook form URL. --- How To Customize Change LLMs: Swap Mistral for OpenAI or Claude. Edit Scraper Prompts: Modify system prompts in AI agent nodes. Change Extraction Schema: Update JSON Schema in extractor nodes. Fix Relational Tables: Add Items node before Supabase inserts for arrays (social links, keywords). Enhance Automation: Add email/slack notifications, or replace form trigger with a Google Sheets trigger. --- Add-ons Automated Trigger: Run on new sheet rows. Notifications: Email or Slack alerts after completion. RAG Integration: Use the Supabase database as a chatbot knowledge source. --- Use Case Examples Sales Lead Enrichment: Instantly get company + competitor data from a URL. Market Research: Collect and compare companies in a niche. B2B Database Creation: Build a proprietary company dataset. --- WORKFLOW IMAGE --- Troubleshooting Guide | Issue | Possible Cause | Solution | |-------|----------------|-----------| | Form Trigger 404 | Workflow not active | Activate the workflow | | Web Search Tool fails | Missing Tavily API key | Replace the placeholder key | | FIRECRAWLER / find competitor fails | Missing MCP node | Install n8n-nodes-mcp | | Basic scrape does nothing | Switch node path disconnected | Reconnect “basic” output | | Supabase node error | Wrong table/column names | Match schema exactly | --- Need Help or More Workflows? Want to customize this workflow for your business or integrate it with your existing tools? Our team at Digital Biz Tech can tailor it precisely to your use case from automation logic to AI-powered enhancements. Contact: shilpa.raju@digitalbiz.tech For more such offerings, visit us: https://www.digitalbiz.tech ---

DIGITAL BIZ TECHBy DIGITAL BIZ TECH
923

Automate travel expense extraction with OCR, Mistral AI and Supabase

Travel Reimbursement - OCR & Expense Extraction Workflow Overview This is a lightweight n8n workflow that accepts chat input and uploaded receipts, runs OCR, stores parsed results in Supabase, and uses an AI agent to extract structured travel expense data and compute totals. Designed for zero retention operation and fast integration. --- Workflow Structure Frontend: Chat UI trigger that accepts text and file uploads. Preprocessing: Binary normalization + per-file OCR request. Storage: Store OCR-parsed blocks in Supabase temp_table. Core AI: Travel reimbursement agent that extracts fields, infers missing values, and calculates totals using the Calculator tool. Output: Agent responds to the chat with a concise expense summary and breakdowns. --- Chat Trigger (Frontend) Trigger node: When chat message received public: true, allowFileUploads: true, sessionId used to tie uploads to the chat session. Custom CSS + initial messages configured for user experience. Binary Presence Check Node: CHECK IF BINARY FILE IS PRESENT OR NOT (IF) Checks whether incoming payload contains files. If files present -> route to Split Out -> NORMALIZE binary file -> OCR (ANY OCR API) -> STORE OCR OUTPUT -> Merge. If no files -> route directly to Merge -> Travel reimbursement agent. Binary Normalization Node: Split Out and NORMALIZE binary file (Code) Split Out extracts binary entries into a data field. NORMALIZE binary file picks the first binary key and rewrites payload to binary.data for consistent downstream shape. OCR Node: OCR (ANY OCR API ) (HTTP Request) Sends multipart/form-data to OCR endpoint, expects JSONL or JSON with blocks. Body includes mode=single, outputtype=jsonl, includeimages=false. Store OCR Output Node: STORE OCR OUTPUT (Supabase) Upserts into temptable with sessionid, parsed blocks, and file_name. Used by agent to fetch previously uploaded receipts for same session. Memory & Tooling Nodes: Simple Memory and Simple Memory1 (memoryBufferWindow) Keep last 10 messages for session context. Node: Calculator1 (toolCalculator) Used by agent to sum multiple charges, handle currency arithmetic and totals. Travel Reimbursement Agent (Core) Node: Travel reimbursement agent (LangChain agent) Model: Mistral Cloud Chat Model (mistral-medium-latest) Behavior: Parse OCR blocks and non-file chat input. Extract required fields: vendorname, category, invoicedate, checkindate, checkoutdate, time, currency, total_amount, notes, estimated. When fields are missing, infer logically and mark estimated: true. Use Calculator tool to sum totals across multiple receipts. Fetch stored OCR entries from Supabase when user asks for session summaries. Always attempt extraction; never reply with "unclear" or ask for a reupload unless user requests audit-grade precision. Final output: Clean expense table and Grand Total formatted for chat. Data Flow Summary User sends chat message plus or minus file. IF file present -> Split Out -> Normalize -> OCR -> Store OCR output -> Merge with chat payload. Travel reimbursement agent consumes merged item, extracts fields, uses Calculator tool for sums, and replies with a formatted expense summary. --- Integrations Used | Service | Purpose | Credential | |---------|---------|-----------| | Mistral Cloud | LLM for agent | Mistral account | | Supabase | Store parsed OCR blocks and session data | Supabase account | | OCR API | Text extraction from images/PDFs | Configurable HTTP endpoint | | n8n Core | Flow control, parsing, editing | Native | --- Agent System Prompt Summary > You are a Travel Expense Extraction and Calculation AI. Extract vendor, dates, currency, category, and total amounts from uploaded receipts, invoices, hotel bills, PDFs, and images. Infer values when necessary and mark them as estimated. When asked, fetch session entries from Supabase and compute totals using the Calculator tool. Respond in a concise business professional format with a category wise breakdown and a Grand Total. Never reply "unclear" or ask for a reupload unless explicitly asked. Required final response format example: --- Key Features Zero retention friendly design: OCR output stored only to temp_table per session. Robust extraction with inference when OCR quality is imperfect. Session aware: agent retrieves stored receipts for consolidated totals. Calculator integration for accurate numeric sums and currency handling. Configurable OCR endpoint so you can swap providers without changing logic. --- Setup Checklist Add Mistral Cloud and Supabase credentials. Configure OCR endpoint to accept multipart uploads and return blocks. Create temptable schema with sessionid, file, file_name. Test with single receipts, multipage PDFs, and mixed uploads. Validate agent responses and Calculator totals. --- Summary A practical n8n workflow for travel expense automation: accept receipts, run OCR, store parsed data per session, extract structured fields via an AI agent, compute totals, and return clean expense summaries in chat. Built for reliability and easy integration. --- Need Help or More Workflows? We can integrate this into your environment, tune the agent prompt, or adapt it for different OCR providers. We can help you set it up for free — from connecting credentials to deploying it live. Contact: shilpa.raju@digitalbiz.tech Website: https://www.digitalbiz.tech LinkedIn: https://www.linkedin.com/company/digital-biz-tech/ You can also DM us on LinkedIn for any help.

DIGITAL BIZ TECHBy DIGITAL BIZ TECH
171

Build a cost estimation chatbot with Mistral AI, OCR & Supabase

AI Cost Estimation Chatbot (Conversational Dual-Agent + OCR Workflow) Overview This workflow introduces a conversational AI Cost Estimation Chatbot with built-in OCR document analysis and interactive form guidance. It helps users and teams handle pricing, measurement, and product configuration for multiple categories such as fabrics and tiles — whether data comes from an uploaded invoice, a stored RFQ, or live user input. The system blends Mistral AI’s reasoning with n8n’s native tools — OCR Extract, Calculator, Supabase, and Gmail — to deliver clear, step-by-step cost calculations. It automatically retrieves or parses OCR data, confirms details conversationally, performs unit conversions, and returns accurate estimates in real time. Escalation and recordkeeping are handled via Gmail and Supabase. --- Chatbot Flow Trigger: Chat message (from n8n Chat UI) or Webhook (from a live site). Model: Mistral Cloud Chat Model (mistral-medium-latest) Memory: Simple Memory (Buffer Window, 15-message history) Tools: OCR Extract: Reads and converts invoices, receipts, and RFQs into structured data. Supabase: Stores and retrieves OCR data for re-use in future calculations. Calculator: Performs all material, area, and cost computations. Gmail: Escalates customer queries or sends quote summaries. Agent: ai agent cost estimate Workflow Behavior: Retrieves or parses OCR data, confirms and completes missing details interactively. Guides users step-by-step through product setup (Fabric or Tile). Calculates costs transparently using MATERIALCOSTS and PROCESSINGCOSTS. Handles GSM ↔ sqm, area, and weight conversions automatically. Escalates support or order confirmations via Gmail when requested. --- Integrations Used | Service | Purpose | |----------|----------| | Chat | User-facing chatbot interface | | OCR Extract | Processes uploaded documents or receipts | | Supabase | Stores and retrieves OCR / quote data | | Mistral AI | Chat model and reasoning engine | | Calculator | Handles all numeric and cost calculations | | Gmail | Sends escalations or quote summaries | --- Agent System Prompt Summary > “You are an AI cost estimation assistant for a brand. > Retrieve or parse OCR data from Supabase, confirm details with the user, and calculate costs transparently. > Use the Calculator for all numeric logic based on MATERIALCOSTS and PROCESSINGCOSTS. > Handle GSM-to-sqm and other conversions automatically. > If support or follow-up is needed, send a message through Gmail. > Always guide the user conversationally, confirm assumptions, and explain every step clearly.” --- Key Features input: Chat Interface Conversational guidance even when OCR data doesnt exist OCR + Supabase integration for document reuse Interactive cost estimator for fabrics and tiles Transparent calculations and unit conversions Gmail integration for escalation or order confirmation Modular design for scaling to other product types --- Summary A powerful AI + OCR conversational cost estimation assistant that retrieves or parses order data, guides users through setup, and calculates costs transparently. It combines intelligence (Mistral), precision (Calculator), and automation (OCR + Supabase + Gmail) to create a complete, human-like quotation system — perfect for brands, manufacturers, and B2B platforms. --- We can help you set it up for free — from connecting credentials to deploying it live. Contact: shilpa.raju@digitalbiz.tech Website: https://www.digitalbiz.tech LinkedIn: https://www.linkedin.com/company/digital-biz-tech/ You can also DM us on LinkedIn for any help.

DIGITAL BIZ TECHBy DIGITAL BIZ TECH
128

Automate timesheet to invoice conversion with OpenAI, Gmail & Google Workspace

This workflow converts emailed timesheets into structured invoice rows in Google Sheets and stores them in the correct Google Drive folder structure. It: Listens to Gmail for timesheet attachments Runs OCR and AI parsing Looks up Customer and PO data from a Google Sheet Organizes files in Client → Employee → Year folders Reuses an existing invoice sheet or creates a new one and writes the invoice row --- Quick Implementation Steps Import the workflow JSON into your n8n instance. Set up credentials for: Gmail Google Drive Google Sheets OpenAI Check the OCR HTTP node: Default URL: https://universal-file-to-text-extractor.vercel.app/extract Configure "Get Customer Info From PO Sheet" with: Spreadsheet ID Correct sheet and column names Confirm Gmail Trigger filter: has:attachment (filename:timesheet OR subject:timesheet) and unread only Ensure your Client Invoices root folder exists in Google Drive. Test once with a sample timesheet email. Activate the workflow. --- What It Does Reads unread Gmail messages with timesheet attachments. Splits and processes each attachment separately. Sends files to OCR and converts them to text. Uses OpenAI to extract: Employee Name Client Name Week Start and End Dates Total Billable Hours Current Year Looks up Customer and PO data from a Google Sheet: Account Number PO Number Item Name Folder Name Invoice range Due Date offset Builds or finds: Client folder Employee folder Year folder Either: Appends to an existing sheet for that employee and period, or Creates a new sheet, sets timezone, moves it into the right folder, and adds the invoice row --- Who Is It For Agencies and consultancies billing from emailed timesheets Finance or ops teams managing many clients and employees in Google Workspace Service providers that keep one sheet per employee per period Anyone who wants to stop manually reading timesheets and filling invoice sheets --- Requirements n8n instance Gmail account with timesheet emails Google Drive and Google Sheets OpenAI API key OCR API endpoint (or the default one) Customer POs Google Sheet with: Email Customer Account Number PO Number Item Folder Name Invoice range Due Date Calculation --- How It Works Email Intake and Loop Gmail Trigger Polls every minute Filter: unread + has attachment + timesheet in file name or subject Split Binary Attachments Creates one item per attachment Loop: Process Each Attachment Handles each timesheet file in sequence OCR and AI Parsing Extract Text from Attachment Sends binary file to OCR endpoint Returns plain text Extract Timesheet Data (OpenAI) Reads the text and outputs strict JSON with: Employee Name Client Name Week Starting Date Week Ending Date Total Working Hours Set Timesheet JSON Fields Normalizes and stores: Employee Name Total Billable hours Week Start Date and Week End Date Client Name Current Year Customer and PO Lookup Get Customer Info From PO Sheet Looks up sender email Pulls: Customer Account Number PO Number Item Folder Name Invoice range Due Date Calculation Drive Folder Discovery Search: Client Invoices Folder Finds the main invoices root folder Search or create: Client folder using Client Name Employee folder using Folder Name from PO sheet Search: Year Folder Looks for folder matching Current Year If Year Folder does not exist: Create Year Folder or Create Current Year Folder Set: Invoice Range Stores invoice range and Year Folder id File Naming and Sheet Search Set: File Name from Start and End Based Date Range Builds: File Name (Start Date Based) File Name (End Date Based) Handles weekly and 15 days invoice logic Search: File By Start Date Name Search: File By End Date Name Merge: Combine Folder Search Results Merges both search results If: Invoice Range is 15 Days Uses custom 2 week window for file naming Set Invoice Date and Due Date Days Invoice Date from week end Due Date from week end plus offset Reuse vs Create Sheet If: File Already Exists If found Go to Append: Final Row to Existing Sheet If not found Go to Sheets: Create Sheet New Sheet Path Sheets: Create Sheet Creates new spreadsheet with generated name HTTP Request (create sheet) Sets spreadsheet timezone to America/New_York Drive: Move Sheet To Final Folder Moves spreadsheet into the Year Folder Set: Empty Row Structure Prepares JSON structure for invoice row Sheets: Append Row1 Writes the first invoice row Set: Spreadsheet (ID and Name) Stores id and name Append: Final Row to Existing Sheet Ensures row is appended with full mapping Existing Sheet Path Set: Spreadsheet (ID and Name) Uses found spreadsheet Append: Final Row to Existing Sheet Appends new row with: Customer Account Number Invoice Date Due Date PO Number Item and columns Total billable hours as Quantity Description with week period --- How To Set Up Import and Credentials Import JSON in n8n Set credentials for: Gmail Trigger Google Drive nodes Google Sheets nodes OpenAI node OCR HTTP node if needed Customer POs Sheet In Get Customer Info From PO Sheet: Set Spreadsheet ID Confirm column names Make sure each employee email row has: Customer Account Number PO Number Item Folder Name Invoice range Due Date Calculation Drive and Gmail Confirm Client Invoices root folder exists Confirm Gmail Trigger: Query string Poll schedule Test Send a sample timesheet email Run the workflow once manually Check: Folder structure Created or reused sheet Invoice row content Activate Turn workflow ON once tests are successful. --- How To Customize Swap the OpenAI model in Extract Timesheet Data. Change prompt to extract extra fields such as project, cost center, or approval status. Replace OCR endpoint with another service if needed. Change folder naming rules in Set and Create folder nodes. Adjust file naming rules for different billing periods. Add validation steps to handle: Missing name Zero hours Invalid dates Extend the PO sheet and invoice sheet with: Hourly rate Currency Tax codes --- Use Case Examples Weekly consulting invoices from signed timesheets. Contractor billing for staffing agencies. Internal cross charging between departments using timesheet reports. Creating a clean, auditable history of timesheets and related invoice lines. --- Troubleshooting Guide | Issue | Possible Solution | |-------|-------------------| | No rows are created | Check Gmail Trigger is active and the filter matches the email. Confirm email is unread and has attachments. | | OCR returns empty or error | Check OCR URL, status code, and supported file types. Log the response body. | | Wrong or missing dates or hours | Review OpenAI prompt and a sample output. Ensure JSON keys in Set Timesheet JSON Fields match the AI output. | | Folders not found or created | Confirm the Client Invoices root exists and that Client Name and Folder Name text matches what the workflow expects. | | Files in wrong year folder | Check Current Year extraction and Year Folder search logic. | | Duplicate sheets for same period | Check file naming code and Drive search nodes for exact match on names. | | Due Date incorrect | Confirm Due Date Calculation in PO sheet and date math formats in Set and append nodes. | --- Need Help or More Workflows? Want to customize this workflow for your business or integrate it with your existing tools? Our team at Digital Biz Tech can tailor it precisely to your use case from automation logic to AI-powered enhancements. We can help you set it up for free — from connecting credentials to deploying it live. Contact: shilpa.raju@digitalbiz.tech Website: https://www.digitalbiz.tech LinkedIn: https://www.linkedin.com/company/digital-biz-tech/ You can also DM us on LinkedIn for any help. ---

DIGITAL BIZ TECHBy DIGITAL BIZ TECH
50
All templates loaded