A business needed a simple but reliable way to take an image URL, download the file, and store it in a specific Google Drive folder. The manual process of copying, downloading, renaming, and uploading was time-consuming and prone to errors.
The Challenge: Manual file transfer creates risks of wrong file names, repetitive tasks waste time, and there was no automation available for batch scenarios.
Goal: Build a lightweight automation that accepts an image URL, downloads it as binary, uploads it to a specific Google Drive folder, and returns confirmation with file ID.
The workflow is built in n8n using the HTTP Request node in binary mode and the Google Drive API. It dynamically extracts filenames from URLs or uses provided names, ensuring correct binary handling throughout the process.
// Filename logic in Google Drive Node
// If specific filename provided -> use it
// Else -> extract name from URL
={{ $json.filename ?
$json.filename :
$json.image_url.split('?')[0].split('/').pop()
}}
// This ensures clean filenames even if URL
// contains query parameters like ?size=large
Download the ready-to-use n8n workflow JSON file. Import it directly into your n8n instance.