Get an mp4 attachment from Gmail to Google Drive
This simple workflow allows you to get an mp4 attachment from gmail email and then upload it to Google Drive to get attachment webview link.
Get an MP4 Attachment from Gmail to Google Drive
This n8n workflow automates the process of extracting MP4 attachments from incoming Gmail emails and uploading them to a specified folder in Google Drive. It's designed to simplify the management of media files received via email, ensuring they are automatically backed up or organized in your cloud storage.
What it does
- Triggers on new Gmail emails: The workflow starts whenever a new email is received in your configured Gmail account.
- Processes email attachments: It then iterates through all attachments found in the incoming email.
- Filters for MP4 files: It checks each attachment to ensure its filename ends with
.mp4. - Uploads to Google Drive: For every MP4 attachment found, it uploads the file to a designated folder in your Google Drive.
Prerequisites/Requirements
- n8n Account/Instance: You need an active n8n instance (cloud or self-hosted).
- Gmail Account: A Google account with Gmail enabled, and appropriate credentials configured in n8n.
- Google Drive Account: A Google account with Google Drive enabled, and appropriate credentials configured in n8n.
- Google Drive Folder ID: The ID of the Google Drive folder where you want the MP4 files to be uploaded.
Setup/Usage
- Import the workflow:
- Download the provided JSON file for this workflow.
- In your n8n instance, go to "Workflows" and click "New".
- Click the "Import from JSON" button and paste the workflow JSON or upload the file.
- Configure Credentials:
- Gmail Node:
- Click on the "Gmail" node.
- Select or create a new "Google OAuth2 API" credential. Follow the n8n documentation for setting up Google credentials if you haven't already. Ensure it has access to your Gmail account.
- Google Drive Node:
- Click on the "Google Drive" node.
- Select or create a new "Google OAuth2 API" credential. Ensure it has access to your Google Drive.
- Gmail Node:
- Customize Google Drive Folder:
- In the "Google Drive" node, locate the "Folder ID" field.
- Replace the placeholder value with the actual ID of the Google Drive folder where you want the MP4 files to be uploaded. You can find this ID in the URL of your Google Drive folder (e.g.,
https://drive.google.com/drive/folders/YOUR_FOLDER_ID).
- Activate the Workflow:
- Once all credentials and settings are configured, click the "Activate" toggle in the top right corner of the n8n editor to turn the workflow on.
Now, whenever an email with an MP4 attachment arrives in your Gmail inbox, this workflow will automatically save that attachment to your specified Google Drive folder.
Related Templates
Send WooCommerce discount coupons to customers via WhatsApp using Rapiwa API
Who is this for? This workflow is ideal for WooCommerce store owners who want to automatically send promotional WhatsApp messages to their customers when new coupons are created. It’s designed for marketers and eCommerce managers looking to boost engagement, streamline coupon sharing, and track campaign performance effortlessly through Google Sheets. Overview This workflow listens for WooCommerce coupon creation events (coupon.created) and uses customer billing data to send promotional WhatsApp messages via the Rapiwa API. The flow formats the coupon data, cleans phone numbers, verifies WhatsApp registration with Rapiwa, sends the promotional message when verified, and logs each attempt to Google Sheets (separate sheets for verified/sent and unverified/not sent). What this Workflow Does Listens for new coupon creation events in WooCommerce via the WooCommerce Trigger node Retrieves all customer data from the WooCommerce store Processes customers in batches to control throughput Cleans and formats customer phone numbers for WhatsApp Verifies if phone numbers are valid WhatsApp accounts using Rapiwa API Sends personalized WhatsApp messages with coupon details to verified numbers Logs all activities to Google Sheets for tracking and analysis Handles both verified and unverified numbers appropriately Key Features Automated coupon distribution: Triggers when new coupons are created in WooCommerce Customer data retrieval: Fetches all customer information from WooCommerce Phone number validation: Verifies WhatsApp numbers before sending messages Personalized messaging: Includes customer name and coupon details in messages Dual logging system: Tracks both successful and failed message attempts Rate limiting: Uses batching and wait nodes to prevent API overload Data formatting: Structures coupon information for consistent messaging Google Sheet Column Structure A Google Sheet formatted like this ➤ sample The workflow uses a Google Sheet with the following columns to track coupon distribution: | name | number | email | address1 | couponCode | couponTitle | couponType | couponAmount | createDate | expireDate | validity | status | | ----------- | ------------- | --------------------------------------------------- | --------- | ---------- | -------------- | ---------- | ------------ | ------------------- | ------------------- | ---------- | -------- | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur-DOHS | 62dhryst | eid offer 2025 | percent | 20.00 | 2025-09-11 06:08:02 | 2025-09-15 00:00:00 | unverified | not sent | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur-DOHS | 62dhryst | eid offer 2025 | percent | 20.00 | 2025-09-11 06:08:02 | 2025-09-15 00:00:00 | verified | sent | Requirements n8n instance with the following nodes: WooCommerce Trigger, Code, SplitInBatches, HTTP Request, IF, Google Sheets, Wait WooCommerce store with API access Rapiwa account with API access for WhatsApp verification and messaging Google account with Sheets access Customer phone numbers in WooCommerce (stored in billing.phone field) Important Notes Phone Number Format: The workflow cleans phone numbers by removing all non-digit characters. Ensure your WooCommerce phone numbers are in a compatible format. API Rate Limits: Rapiwa and WooCommerce APIs have rate limits. Adjust batch sizes and wait times accordingly. Data Privacy: Ensure compliance with data protection regulations when sending marketing messages. Error Handling: The workflow logs unverified numbers but doesn't have extensive error handling. Consider adding error notifications for failed API calls. Message Content: The current message template references the first coupon only (coupons[0]). Adjust if you need to handle multiple coupons. Useful Links Dashboard: https://app.rapiwa.com Official Website: https://rapiwa.com Documentation: https://docs.rapiwa.com Support & Help WhatsApp: Chat on WhatsApp Discord: SpaGreen Community Facebook Group: SpaGreen Support Website: https://spagreen.net Developer Portfolio: Codecanyon SpaGreen
Monitor stock market with AI: news analysis & multi-channel alerts via Slack & Telegram
AI Customer Support Triage with Gmail, OpenAI, Airtable & Slack How it Works This workflow monitors your Gmail support inbox every minute, automatically sending each unread email to OpenAI for intelligent analysis. The AI evaluates sentiment (Positive/Neutral/Negative/Critical), urgency level (Low/Medium/High/Critical), categorizes requests (Technical/Billing/Feature Request/Bug Report/General), extracts key issues, and generates professional response templates. The system calculates a priority score (0-110) by combining urgency and sentiment weights, then routes tickets accordingly. Critical issues trigger immediate Slack alerts with full context and 30-minute SLA reminders, while routine tickets post to standard monitoring channels. Every ticket logs to Airtable with complete analysis and thread tracking, then updates a Google Sheets dashboard for real-time analytics. A secondary AI pass generates strategic insights (trend identification, risk assessment, actionable recommendations) and stores them back in Airtable. The entire process takes seconds from email arrival to team notification, eliminating manual triage and ensuring critical issues get immediate attention. --- Who is this for? Customer support teams needing automated prioritization for high email volumes SaaS companies tracking support metrics and response times Startups with lean teams requiring intelligent ticket routing E-commerce businesses managing technical, billing, and return inquiries Support managers needing data-driven insights into customer pain points --- Setup Steps Setup time: 20-30 minutes Requirements: Gmail, OpenAI API key, Airtable account, Google Sheets, Slack workspace Monitor Support Emails: Connect Gmail via OAuth2, configure INBOX monitoring for unread emails AI Analysis Engine: Add OpenAI API key, system prompt pre-configured for support analysis Parse & Enrich Data: JavaScript code automatically calculates priority scores (no changes needed) Route by Urgency: Configure routing rules for critical vs routine tickets Slack Alerts: Create Slack app, get bot token and channel IDs, replace placeholders in nodes Airtable Database: Create base with "tblSupportTickets" table, add API key and Base ID (replace appXXXXXXXXXXXXXX) Google Sheets Dashboard: Create spreadsheet, enable Sheets API, add OAuth2 credentials, replace Sheet ID (1XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX) Generate Insights: Second OpenAI call analyzes patterns, stores insights in Airtable Test: Send test email, verify Slack alerts, check Airtable/Sheets data logging --- Customization Guidance Priority Scoring: Adjust urgency weight (25) and sentiment weight (10) in Code node to match your SLA requirements Categories: Modify AI system prompt to add industry-specific categories (e.g., healthcare: appointments, prescriptions) Routing Rules: Add paths for High urgency, VIP customers, or specific categories Auto-Responses: Insert Gmail send node after routine tickets for automatic acknowledgment emails Multi-Language: Add Google Translate node for non-English support VIP Detection: Query CRM APIs or match email domains to flag enterprise customers Team Assignment: Route different categories to dedicated Slack channels by department Cost Optimization: Use GPT-3.5 (~$0.001/email) instead of GPT-4, self-host n8n for unlimited executions --- Once configured, this workflow operates as your intelligent support triage layer—analyzing every email instantly, routing urgent issues to the right team, maintaining comprehensive analytics, and generating strategic insights to improve support operations. --- Built by Daniel Shashko Connect on LinkedIn
Automate hotel booking requests from Gmail to Google Sheets with GPT-5-mini
Who’s it for This workflow is for hotel managers, travel agencies, and hospitality teams who receive booking requests via email. It eliminates the need for manual data entry by automatically parsing emails and attachments, assigning booking cases to the right teams, and tracking performance metrics. What it does This workflow goes beyond simple automation by including enterprise-grade logic and security: 🛡️ Gatekeeper: Watches your Gmail and filters irrelevant emails before spending money on AI tokens. 🧠 AI Brain: Uses OpenAI (GPT-5-mini) to extract structured data from unstructured email bodies and PDF attachments. ⚖️ Business Logic: Automatically routes tasks to different teams based on urgency, room count, and VIP status. 🔒 Security: Catches PII (like credit card numbers) and scrubs them before they hit your database. 🚨 Safety Net: If anything breaks, a dedicated error handling path logs the issue immediately so no booking is lost. 📈 ROI Tracking: Calculates the time saved per booking to prove the value of automation. How to set up Create your Google Sheet: Create a new sheet and rename the tabs to: Cases, Team Assignments, Error Logs, Success Metrics. Add Credentials: Go to n8n Settings → Credentials and add your Gmail (OAuth2), Google Sheets, and OpenAI API keys. Configure User Settings: Open the "Configuration: User Settings" node at the start of the workflow. Paste your specific Google Sheet ID and Admin Email there. Adjust Business Rules: Open the "Apply Business Rules" node (Code node) to adjust the logic for team assignment (e.g., defining what counts as a "VIP" booking). Customize Templates: Modify the email templates in the Gmail nodes to match your hotel's branding. Test: Send a sample booking email to yourself to verify the filters and data extraction. Setup requirements Gmail account (OAuth2 connected) Google Sheets (with the 4 tabs listed below) OpenAI API key (GPT-5-mini recommended) n8n Cloud or self-hosted instance How to customize Filter Booking Emails: Update the trigger node keywords to match your specific email subjects (e.g., "Reservation", "Booking Request"). Apply Business Rules: Edit the Javascript in the Code node to fit your company’s internal logic (e.g., changing priority thresholds). New Metrics: Add new columns in the Google Sheet (e.g., “Revenue Metrics”) and map them in the "Update Sheet" node. AI Model: Switch to GPT-5 if you need higher reasoning capabilities for complex PDF layouts. Google Sheets Structure Description This workflow uses a Google Sheets document with four main tabs to track and manage hotel booking requests. Cases This is the main data log for all incoming booking requests. case_id: Unique identifier generated by the workflow. processed_date: Timestamp when the workflow processed the booking. travelagency / contactdetails: Extracted from the email. numberofrooms / checkindate: Booking details parsed by the AI. special_requests: Optional notes (e.g., airport transfer). assigned_team / priority: Automatically set based on business rules. daysuntilcheckin: Dynamic field showing urgency. Team Assignments Stores internal routing and assignment details. timestamp: When the case was routed. case_id: Link to the corresponding record in the Cases tab. assignedteam / teamemail: Which department handles this request. priority: Auto-set based on room count or urgency. Error Log A critical audit trail that captures details about any failed processing steps. errortype: Categorization of the failure (e.g., MISSINGREQUIRED_FIELDS). error_message: Detailed technical explanation for debugging. original_sender / snippet: Context to help you manually process the request if needed. Success Metrics Tracks the results of your automation to prove its value. processingtimeseconds: The time savings achieved by the automation (run time vs. human time). record_updated: Confirmation that the database was updated. 🙋 Support If you encounter any issues during setup or have questions about customization, please reach out to our dedicated support email: foivosautomationhelp@gmail.com