See llms.txt for all machine-readable content.

Google Drive and Mailgun integration

Save yourself the work of writing custom integrations for Google Drive and Mailgun and use n8n instead. Build adaptable and scalable Data & Storage, workflows that work with your technology stack. All within a building experience you will love.

How to connect Google Drive and Mailgun

Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

Google Drive and Mailgun integration: Create a new workflow and add the first step

Process scanned invoices with Google Drive, OCR & OpenAI to Google Sheets

This template allows you to automatically process scanned invoices from Google Drive, extract key information using AI, and organize the data in Google Sheets with email notifications. Overview This comprehensive workflow automates the entire invoice processing pipeline by monitoring a Google Drive folder for new invoice uploads, intelligently processing both PDF and image formats, extracting structured data using AI-powered information extraction, and automatically organizing the results in a Google Sheet while sending email notifications. The system handles various file formats and includes smart fallback mechanisms for challenging documents like CamScanner PDFs. How it Works File Monitoring: The workflow continuously monitors a specified Google Drive folder for new invoice files using a trigger that checks every minute for newly created files. File Processing: When new files are detected, the system downloads them and determines the file type (PDF or image) using a smart switch mechanism. Text Extraction: For PDFs: Attempts direct text extraction first For Images: Uses OCR.Space API for optical character recognition For problematic PDFs (like CamScanner): Falls back to OCR processing AI Information Extraction: Processes the extracted text through OpenAI's language model to identify and extract key invoice information including: Company name Total amount Currency Invoice date Invoice number Data Storage: Automatically appends the extracted information to a Google Sheet with links back to the original scanned documents. Notification: Sends formatted email notifications via Mailgun when new invoices are processed, including an HTML table summary. How to Use Setup Google Drive: Create a dedicated folder in Google Drive for invoice uploads and note the folder ID. Configure Credentials: Set up the following credential connections in n8n: Google Drive OAuth2 API Google Sheets OAuth2 API OpenAI API OCR.Space API Mailgun API Update Configuration: Replace the Google Drive folder ID with your target folder Replace the Google Sheets document ID with your destination spreadsheet Update email addresses in the Mailgun node Test the Workflow: Use the manual trigger to process existing invoices in your folder for initial testing. Activate: Enable the workflow to start automatic monitoring of new invoice uploads. Requirements External APIs: OpenAI API - For AI-powered information extraction from invoice text OCR.Space API - For optical character recognition of image-based invoices Mailgun API - For sending email notifications Google Services: Google Drive API - For monitoring folders and downloading files Google Sheets API - For storing extracted invoice data Setup Prerequisites: Google Drive folder dedicated to invoice uploads Google Sheet with appropriate column headers (date, company name, total, currency, invoice number, scan link, etc.) Email domain configured with Mailgun (or alternative email service) OCR.Space account for image processing capabilities: https://ocr.space/OCRAPI Recommended Settings: Set the Google Drive trigger to check for new files every minute Ensure sufficient API rate limits for your expected invoice volume Configure proper error handling for failed OCR or AI extraction attempts

Popular ways to use the Google Drive and Mailgun integration

Build your own Google Drive and Mailgun integration

Create custom Google Drive and Mailgun workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

Google Drive supported actions

Google Drive and Mailgun integration details

Google Drive

Google Drive

Google Drive is a storage and synchronization service offered by Google. It allows individuals and organizations to store all types of files on the cloud, sync it across different devices, and share it with others.

Mailgun

Mailgun

Mailgun provides useful email services for developers and businesses. It is used by over 100,000 companies, offering them email marketing, sending and parsing, with powerful user-friendly APIs, inbound routing, advanced analytics, and much more.

Save engineering resources

Reduce time spent on customer integrations, engineer faster POCs, keep your customer-specific functionality separate from product all without having to code.

Learn more

FAQ about Google Drive integrations

Need help setting up your Google Drive and Mailgun integration?

Discover our latest community's recommendations and join the discussions about Google Drive and Mailgun integration.

  • Karim Lameer

    Download a file from google drive and use in a http request

    Karim Lameer

    Describe the problem/error/question I am trying to download a file from Google Drive and upload it into a http request. I have created credentials and the node works well. The problem is that I cannot access the actual f…

    Open topic
  • Hameez Yaser

    Google drive set up

    Hameez Yaser

    Hi does anyone know How I can fix this? I hav e done everything in the set up docs yet it still wont work. Thanks.

    Open topic
  • hubschrauber

    Google Drive Search File/Folder Returns Folder Id, not Contents

    hubschrauber

    Goal Trying to use the Google Drive node to get the list of files / sub-folders in a specified folder. Workflow Setup Based on this I set up the Google Drive node with: Resource: File/Folder , Operation: Search , Sear…

    Open topic
  • Jon

    Connecting to Google on localhost

    Jon

    I am stuck on creating a Google Drive connection to my google account. I’ve been following guide in this Youtube video: https://www.youtube.com/watch?v=gZ6N2H3_vys&ab_channel=n8n I made sure the Google Drive API was en…

    Open topic
  • roundedhexagon

    Google drive node - Search folder: exact search results only

    roundedhexagon

    Hi guys! Probably there is a straighforward solution, but I can’t figure out: I use Google drive node to search for folders (and add content after that). The problem is if I search for “Bringa 23” and it shows “Bringa 23…

    Open topic

Looking to integrate Slack and VirusTotal in your company?

Trusted by teams building smarter workflows

Why

Why use n8n to integrate Google Drive with Mailgun

Handle branching, merging and iteration easily. Pause your workflow to wait for external events.

Re-run single steps to test changes in no time. And pin your data to avoid generating trigger events every time you execute.

Your data is displayed alongside your settings, making edge cases easy to track down.

Use 1000+ workflow templates available from our core team and our community.

Copy and paste, easily import and export workflows.

Simple enough to 
understand + sophisticated 
enough to ship