What This Automation Does
This workflow gets a festival document from Google Drive, changes it to PDF, and sends it to OpenAI.
Then it makes a custom assistant who answers questions using only that document.
Users can chat with the assistant through a webhook that listens to their messages.
This saves time and gives accurate answers fast.
Tools and Services Used
- Google Drive API: Downloads and converts Google Docs files.
- OpenAI API: Uploads files, creates assistants, and generates chat replies.
- n8n Workflow Automation: Connects the steps and runs the process.
Inputs, Processing Steps, and Outputs
Inputs
- Festival document file ID from Google Drive (Google Docs format).
- OpenAI API key for uploading and assistant creation.
- OAuth2 credentials for Google Drive access.
- User chat messages received via webhook.
Processing Steps
- Download and convert document: The workflow uses Google Drive API to download the file and convert it to PDF format.
- Upload PDF to OpenAI: The workflow uploads the PDF as a knowledge base file for OpenAI assistants.
- Create custom AI assistant: A new assistant is created with instructions to only use the uploaded document for answering queries.
- Enable chat interaction: A webhook uses Langchain’s Chat Trigger node to listen for user messages and send them to the assistant for a reply.
Outputs
- A custom AI assistant locked to the festival document knowledge.
- Chat responses that are brief, friendly, and based only on the uploaded file.
- A webhook URL to integrate chat input from user interfaces.
Beginner Step-by-Step: How to Use This Workflow in n8n
Step 1: Import Workflow
- Download the workflow file from this page using the Download button.
- Open the n8n editor.
- Use the Import from File option to load the workflow into n8n.
Step 2: Configure Credentials and IDs
- Add your Google Drive OAuth2 credentials inside the Google Drive Download node.
- Insert your OpenAI API Key in the OpenAI nodes for file upload and assistant creation.
- Update the Google Drive file ID for the festival document.
- Check the Assistant creation node and update file IDs if needed after upload.
Step 3: Test the Workflow
- Run the workflow manually in n8n to confirm the document downloads, uploads, and assistant is created without errors.
- Send a test request to the webhook URL from a client to confirm the chat trigger responds properly.
Step 4: Activate the Workflow
- Make sure the workflow is active in n8n so it listens continuously for user messages.
- Use the webhook URL in your chat interface or website to start receiving chats.
If using self-host n8n, setup the server with self-host n8n to run this workflow independently.
Common Edge Cases and Troubleshooting
- File upload failed or wrong format: Check Google Drive node’s conversion option is set to
application/pdf. Without this, file format is wrong. - Assistant creation fails for duplicate: Use failIfExists=true in the assistant creation node or delete the existing assistant to prevent conflicts.
- Chat trigger no response: Verify webhook URL is correct and activated. Test webhook with a sample JSON payload to debug.
Customization Ideas
- Add more Google Drive files with Download nodes and upload their PDFs to OpenAI. Include multiple file IDs when creating the assistant.
- Change the assistant’s tone or reply length by editing the instruction prompt in the assistant creation node.
- Translate instructions for multi-language user support.
- Schedule automatic updates for the festival documents to keep the assistant updated.
- Connect the chatbot to WhatsApp or Telegram using tutorials and expand its reach.
Summary of Results
✓ The workflow automatically fetches and formats official festival documents.
✓ Users get fast, accurate festival answers from a custom AI assistant.
✓ Ted’s workload is greatly reduced by automating question replies.
✓ The assistant can be extended to many chat platforms easily.

