Skip to main content

Build an OpenAI assistant with Google Drive integration

Workflow preview

Workflow preview
100%
Build an OpenAI assistant with Google Drive integration preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. 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 Ope...

Best for

  • Support Chatbot automation workflows
  • AI Chatbot automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.googledrive, @n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Davide.

Original n8n.io source

1.1 Workflow description

Title
Build an OpenAI assistant with Google Drive integration
Workflow name
Build an OpenAI assistant with Google Drive integration

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.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Test workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Google Drive

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 3 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 4 - Window Buffer Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 5 - OpenAI

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 6 - OpenAI2

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 7 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - OpenAI1

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 11 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - OpenAI Assistent

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

3. Summary Table

Workflow Build an OpenAI assistant with Google Drive integration
Complexity intermediate
Nodes 12
Categories Support Chatbot, AI Chatbot
Author Davide
Published 23 Jan 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/2782/2782.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Build an OpenAI assistant with Google Drive integration do?

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 Ope...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI Chatbot use case.