Back to Catalog

Build an OpenAI assistant with Google Drive integration

DavideDavide
14788 views
2/3/2026
Official Page

Workflow Overview

This workflow automates the creation and management of a custom OpenAI Assistant for a travel agency ("Travel with us"), leveraging Google Drive for document storage.


How It Works

1. Create the OpenAI Assistant

  • Node: OpenAI
    • Action: Creates a custom assistant named "Travel with us" Assistant using the gpt-4o-mini model.
    • Instructions:
      • Respond only using the provided document (e.g., agency-specific info).
      • Stay friendly, brief, and focused on travel-related queries.
      • Ignore irrelevant questions politely.
    • Credentials: Requires OpenAI API key.

2. Upload Agency Document

  • Google Drive Node:
    • Action: Downloads a Google Doc as a PDF.
  • OpenAI2 Node:
    • Action: Uploads the PDF to OpenAI with purpose: "assistants".
    • Output: Generates a file_id.

3. Update the Assistant with the Document

  • OpenAI Node:
    • Action: Updates the assistant to include the uploaded file.

4. Chat Interaction

  • Chat Trigger:
    • Activates when a message is received ("When chat message received").
  • OpenAI Assistant Node:
    • Action: Uses the updated assistant to respond to user queries.
    • Memory: Window Buffer Memory retains chat context for coherent conversations.

Set Up Steps

  1. Prepare the Document:

    • Store your travel agency guide in Google Drive (e.g., as a Google Doc).
    • Update the Google Drive node with your document’s ID.
  2. Configure Credentials:

    • Google Drive: Connect via OAuth2 (googleDriveOAuth2Api).
    • OpenAI: Add your API key to all OpenAI nodes.
  3. Customize the Assistant:

    • Modify the instructions in the OpenAI node to reflect your agency’s needs.
    • Ensure the document includes FAQs, policies, and travel info.
  4. Test the Workflow:

    • Trigger manually ("Test workflow") to create the assistant and upload the file.
    • Send a chat message (e.g., "What are your travel packages?") to test responses.

Dependencies

  • Google Drive Account: To store and retrieve the agency document.
  • OpenAI API Access: For assistant creation and file uploads.

Need help customizing?

Contact me for consulting and support or add me on Linkedin.

n8n OpenAI Assistant with Google Drive Integration

This n8n workflow demonstrates how to integrate OpenAI's capabilities with Google Drive, allowing for interactive AI assistance within a chat interface, leveraging Google Drive as a data source or for output.

What it does

This workflow sets up an AI assistant that can interact with users through a chat interface, maintaining conversation history and potentially utilizing information from Google Drive.

  1. Triggers on Chat Message: The workflow starts whenever a new chat message is received, initiating a conversation with the AI assistant.
  2. Manages Conversation History: A "Simple Memory" node keeps track of the ongoing conversation, allowing the AI to maintain context across multiple messages.
  3. Processes with OpenAI: The user's message, along with the conversation history, is sent to OpenAI for processing. This is where the AI generates its response.
  4. Google Drive Integration (Placeholder): A Google Drive node is included, suggesting the potential for the AI assistant to interact with Google Drive. This could involve reading files, creating documents, or searching for information based on user queries. Note: As per the current JSON, the Google Drive node is present but not actively connected to the main flow. It serves as an example of potential integration.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running instance of n8n.
  • OpenAI API Key: An API key for OpenAI to power the AI assistant.
  • Google Account: A Google account with access to Google Drive for the Google Drive node. You will need to configure credentials for n8n to access your Google Drive.

Setup/Usage

  1. Import the workflow: Download the JSON provided and import it into your n8n instance.
  2. Configure Credentials:
    • OpenAI: Set up your OpenAI credential within n8n, providing your API key.
    • Google Drive: Set up your Google Drive OAuth2 credential to allow n8n to access your Google Drive.
  3. Activate the workflow: Once credentials are configured, activate the workflow.
  4. Interact via Chat: Use the "Chat Trigger" mechanism (e.g., a connected chat service like Slack or Telegram, configured separately to send messages to this trigger) to send messages and interact with your OpenAI assistant.
  5. Expand Google Drive Integration: To fully utilize the Google Drive node, connect it into the main flow. You can configure it to perform actions like:
    • Searching for files based on AI-generated queries.
    • Creating new documents or spreadsheets with AI-generated content.
    • Reading content from specific files to inform the AI's responses.

Related Templates

Send WooCommerce cross-sell offers to customers via WhatsApp using Rapiwa API

Who Is This For? This n8n workflow enables automated cross-selling by identifying each WooCommerce customer's most frequently purchased product, finding a related product to recommend, and sending a personalized WhatsApp message using the Rapiwa API. It also verifies whether the user's number is WhatsApp-enabled before sending, and logs both successful and unsuccessful attempts to Google Sheets for tracking. What This Workflow Does Retrieves all paying customers from your WooCommerce store Identifies each customer's most purchased product Finds the latest product in the same category as their most purchased item Cleans and verifies customer phone numbers for WhatsApp compatibility Sends personalized WhatsApp messages with product recommendations Logs all activities to Google Sheets for tracking and analysis Handles both verified and unverified numbers appropriately Key Features Customer Segmentation: Automatically identifies paying customers from your WooCommerce store Product Analysis: Determines each customer's most purchased product Smart Recommendations: Finds the latest products in the same category as customer favorites WhatsApp Integration: Uses Rapiwa API for message delivery Phone Number Validation: Verifies WhatsApp numbers before sending messages Dual Logging System: Tracks both successful and failed message attempts in Google Sheets Rate Limiting: Uses batching and wait nodes to prevent API overload Personalized Messaging: Includes customer name and product details in messages Requirements 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) How to Use — Step-by-Step Setup Credentials Setup WooCommerce API: Configure WooCommerce API credentials in n8n (e.g., "WooCommerce (get customer)" and "WooCommerce (get customer data)") Rapiwa Bearer Auth: Create an HTTP Bearer credential with your Rapiwa API token Google Sheets OAuth2: Set up OAuth2 credentials for Google Sheets access Configure Google Sheets Ensure your sheet has the required columns as specified in the Google Sheet Column Structure section Verify Code Nodes Code (get paying_customer): Filters customers to include only those who have made purchases Get most buy product id & Clear Number: Identifies the most purchased product and cleans phone numbers Configure HTTP Request Nodes Get customer data: Verify the WooCommerce API endpoint for retrieving customer orders Get specific product data: Verify the WooCommerce API endpoint for product details Get specific product recommend latest product: Verify the WooCommerce API endpoint for finding latest products by category Check valid WhatsApp number Using Rapiwa: Verify the Rapiwa endpoint for WhatsApp number validation Rapiwa Sender: Verify the Rapiwa endpoint for sending messages Google Sheet Required Columns You’ll need two Google Sheets (or two tabs in one spreadsheet): A Google Sheet formatted like this ➤ sample The workflow uses a Google Sheet with the following columns to track coupon distribution: Both must have the following headers (match exactly): | name | number | email | address1 | price | suk | title | product link | validity | staus | | ---------- | ------------- | ----------------------------------------------- | ----------- | ----- | --- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | -------- | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | verified | sent | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | unverified | not sent | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | verified | sent | 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. Product Availability: The workflow recommends the latest product in a category, but doesn't check if it's in stock. Consider adding stock status verification. Testing: Always test with a small batch before running the workflow on your entire customer list. 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

RapiwaBy Rapiwa
183

Track SDK documentation drift with GitHub, Notion, Google Sheets, and Slack

📊 Description Automatically track SDK releases from GitHub, compare documentation freshness in Notion, and send Slack alerts when docs lag behind. This workflow ensures documentation stays in sync with releases, improves visibility, and reduces version drift across teams. 🚀📚💬 What This Template Does Step 1: Listens to GitHub repository events to detect new SDK releases. 🧩 Step 2: Fetches release metadata including version, tag, and publish date. 📦 Step 3: Logs release data into Google Sheets for record-keeping and analysis. 📊 Step 4: Retrieves FAQ or documentation data from Notion. 📚 Step 5: Merges GitHub and Notion data to calculate documentation drift. 🔍 Step 6: Flags SDKs whose documentation is over 30 days out of date. ⚠️ Step 7: Sends detailed Slack alerts to notify responsible teams. 🔔 Key Benefits ✅ Keeps SDK documentation aligned with product releases ✅ Prevents outdated information from reaching users ✅ Provides centralized release tracking in Google Sheets ✅ Sends real-time Slack alerts for overdue updates ✅ Strengthens DevRel and developer experience operations Features GitHub release trigger for real-time monitoring Google Sheets logging for tracking and auditing Notion database integration for documentation comparison Automated drift calculation (days since last update) Slack notifications for overdue documentation Requirements GitHub OAuth2 credentials Notion API credentials Google Sheets OAuth2 credentials Slack Bot token with chat:write permissions Target Audience Developer Relations (DevRel) and SDK engineering teams Product documentation and technical writing teams Project managers tracking SDK and doc release parity Step-by-Step Setup Instructions Connect your GitHub account and select your SDK repository. Replace YOURGOOGLESHEETID and YOURSHEET_GID with your tracking spreadsheet. Add your Notion FAQ database ID. Configure your Slack channel ID for alerts. Run once manually to validate setup, then enable automation.

Rahul JoshiBy Rahul Joshi
31

Automate Gmail responses with GPT and human-in-the-loop verification

Try It Out! This n8n template uses AI to automatically respond to your Gmail inbox by drafting response for your approval via email. How it works Gmail Trigger monitors your inbox for new emails AI Analysis determines if a response is needed based on your criteria Draft Generation creates contextually appropriate replies using your business information Human Approval sends you the draft for review before sending Auto-Send replies automatically once approved Setup Connect your Gmail account to the Gmail Trigger node Update the "Your Information" node with: Entity name and description Approval email address Resource guide (FAQs, policies, key info) Response guidelines (tone, style, formatting preferences) Configure your LLM provider (OpenAI, Claude, Gemini, etc.) with API credentials Test with a sample email Requirements n8n instance (self-hosted or cloud) Gmail account with API access LLM provider API key Need Help? Email Nick @ nick@tropicflare.com

Nick CanfieldBy Nick Canfield
88