Skip to content

Audio File Downloader from Google Drive

This workflow automatically searches for audio files (.m4a and .aac) in a specific Google Drive folder and downloads them for local processing. It's designed for batch downloading of audio content from a designated Drive location.

Purpose

No business context provided yet — add a context.md to enrich this documentation.

This workflow serves as an automated solution for retrieving audio files from Google Drive storage. It targets a specific folder and filters for common audio formats, making it useful for content management, media processing, or backup operations.

How It Works

  1. Manual Trigger: The workflow starts when manually executed
  2. Search Audio Files: Queries a specific Google Drive folder (ID: 1fnelIRAyA2muOUKlmqqqOjL6EnHqIdNJ) for audio files with .m4a or .aac extensions
  3. Download Files: For each found audio file, downloads the file content to the n8n instance

The workflow processes all matching files in a single execution, downloading them sequentially.

Workflow Diagram

graph TD
    A[Manual Trigger] --> B[Search Audio Files]
    B --> C[Download Files]

    B -.->|For each file found| C

Trigger

Manual Trigger: This workflow runs on-demand when the "Execute workflow" button is clicked in the n8n interface. It does not run automatically on a schedule.

Nodes Used

Node Type Node Name Purpose
Manual Trigger When clicking 'Execute workflow' Initiates the workflow manually
Google Drive Search files and folders Finds audio files in specified Drive folder
Google Drive Download file1 Downloads each found audio file

External Services & Credentials Required

Google Drive API

  • Service: Google Drive API v3
  • Required Credentials:
    • Google Drive OAuth2 API credentials (2 different accounts configured)
    • Account 1: "Google Drive account" (for search operations)
    • Account 2: "Google Drive account 2" (for download operations)
  • Permissions Needed:
    • Read access to Google Drive files
    • Download permissions for target folder

Note: Two different Google Drive accounts are configured, which may indicate cross-account file access or different permission levels.

Environment Variables

No environment variables are used in this workflow. All configuration is handled through node parameters and credentials.

Data Flow

Input

  • Trigger: Manual execution (no input data required)
  • Target Folder: Hardcoded Google Drive folder ID 1fnelIRAyA2muOUKlmqqqOjL6EnHqIdNJ

Processing

  • Search Query: '1fnelIRAyA2muOUKlmqqqOjL6EnHqIdNJ' in parents and (name contains '.m4a' or name contains '.aac') and trashed=false
  • File Metadata: Returns file ID, name, and web view link for each match
  • Download: Retrieves binary file content for each found file

Output

  • File Data: Binary content of each downloaded audio file
  • File Metadata: Name, ID, and web link for each processed file

Error Handling

This workflow does not implement explicit error handling mechanisms. Potential failure points include:

  • Authentication Issues: If Google Drive credentials are invalid or expired
  • Permission Errors: If the service account lacks access to the target folder
  • File Access: If files are moved, deleted, or permissions changed between search and download
  • Storage Limits: If downloaded files exceed available storage on the n8n instance

Known Limitations

  • Hardcoded Folder: The workflow targets a specific Google Drive folder ID and cannot be easily reconfigured for different folders
  • File Format Restriction: Only processes .m4a and .aac audio files
  • No Duplicate Handling: Will re-download files on each execution
  • Sequential Processing: Downloads files one at a time, which may be slow for large batches
  • No Progress Tracking: No indication of download progress for multiple files

No related workflows identified in the current context.

Setup Instructions

1. Import Workflow

  1. Copy the workflow JSON
  2. In n8n, go to Workflows → Import from JSON
  3. Paste the JSON and save

2. Configure Google Drive Credentials

  1. Create Google Drive OAuth2 API credentials in n8n:
    • Go to Credentials → Add Credential
    • Select "Google Drive OAuth2 API"
    • Complete OAuth flow for both required accounts
  2. Update credential references in both Google Drive nodes

3. Customize Target Folder (Optional)

  1. Edit the "Search files and folders" node
  2. Replace the folder ID 1fnelIRAyA2muOUKlmqqqOjL6EnHqIdNJ in the query string
  3. Modify file type filters if needed (currently .m4a and .aac)

4. Test Execution

  1. Ensure the target Google Drive folder contains audio files
  2. Click "Execute workflow" to test
  3. Verify files are found and downloaded successfully

5. Activate Workflow

  1. Set the workflow to "Active" if you plan to use it regularly
  2. Note: This workflow requires manual triggering and won't run automatically