Package Information
Released: 5 mo ago
Downloads: 5 weeklyΒ /Β 70 monthly
Latest Version: 1.3.0
Author: Gabriel Lacanna
Available Nodes
Documentation generatingβ¦
Documentation
n8n-nodes-gcs-service-account
An n8n community node for downloading files from Google Cloud Storage using Service Account authentication instead of OAuth. Perfect for automated workflows and server-to-server applications.
π Features
- π Service Account Authentication - Use JSON key files instead of OAuth
- π₯ Single File Download - Download specific files from your bucket
- π¦ Bulk Download - Download all files from bucket root directory
- π― Prefix Filtering - Filter files by prefix when bulk downloading
- π n8n Integration - Seamless integration with n8n workflows
- β‘ Production Ready - No token refresh issues, works 24/7
- π‘οΈ Error Handling - Robust error handling with detailed feedback
π¦ Installation
Via n8n Community Nodes (Recommended)
- Open your n8n instance
- Go to Settings β Community Nodes
- Click Install a community node
- Enter:
n8n-nodes-gcs-service-account - Click Install
Manual Installation
npm install n8n-nodes-gcs-service-account
π§ Setup
1. Create Google Cloud Service Account
- Go to Google Cloud Console
- Navigate to IAM & Admin β Service Accounts
- Click Create Service Account
- Assign these roles:
Storage Object Viewer(to read objects)Storage Legacy Bucket Reader(to list buckets)
- Create and download a JSON key file
2. Configure n8n Credentials
- In n8n, go to Settings β Credentials
- Click Add Credential
- Select Google Service Account
- Paste the complete JSON key file content
- Save the credential
π― Operations
1. Download Single File
Download a specific file from your GCS bucket.
Parameters:
- Bucket Name: Name of your GCS bucket
- File Path: Path to the specific file (e.g.,
documents/file.pdf) - Binary Property: Name for the output binary data (default:
data)
2. Download All Files from Root
Download all files from the root directory of your bucket.
Parameters:
- Bucket Name: Name of your GCS bucket
- Prefix Filter: (Optional) Only download files starting with this prefix
- Max Files: Maximum number of files to download (default: 100)
- Binary Property: Name for the output binary data (default:
data)
π‘ Usage Examples
Example 1: Download a Single PDF File
{
"operation": "downloadSingle",
"bucketName": "my-documents",
"filePath": "reports/monthly-report.pdf"
}
Example 2: Download All Files from Root
{
"operation": "downloadAll",
"bucketName": "my-images",
"maxFiles": 50
}
Example 3: Download Files with Prefix
{
"operation": "downloadAll",
"bucketName": "my-data",
"prefix": "exports/",
"maxFiles": 20
}
π Output Data
Single File Download
{
"fileName": "monthly-report.pdf",
"filePath": "reports/monthly-report.pdf",
"bucketName": "my-documents",
"size": 2048576,
"contentType": "application/pdf",
"downloadedAt": "2024-01-01T12:00:00.000Z",
"etag": "abc123",
"updated": "2024-01-01T10:00:00.000Z",
"operation": "downloadSingle"
}
Bulk Download
Each file creates a separate output item:
{
"fileName": "image1.jpg",
"filePath": "image1.jpg",
"bucketName": "my-images",
"size": 1024000,
"contentType": "image/jpeg",
"downloadedAt": "2024-01-01T12:00:00.000Z",
"etag": "def456",
"updated": "2024-01-01T11:00:00.000Z",
"operation": "downloadAll",
"totalFiles": 5
}
π Binary Data
Downloaded files are available as binary data in the specified property (default: data). You can:
- Save to disk using the Write Binary File node
- Send via email using Email nodes
- Upload elsewhere using HTTP Request or other storage nodes
- Process content using appropriate nodes based on file type
β οΈ Important Notes
- Permissions: Ensure your service account has
Storage Object Viewerrole - File Limits: Bulk download is limited to prevent memory issues (default: 100 files)
- Large Files: Very large files may cause memory issues - consider using streams for production
- Billing: Downloads count towards your GCS egress charges
π Troubleshooting
Authentication Errors
- Verify your service account JSON is complete and valid
- Check that the service account has proper GCS permissions
- Ensure the bucket exists and is accessible
File Not Found
- Verify the file path is correct (case-sensitive)
- Check that the file exists in the specified bucket
- Ensure you have read permissions on the file
Memory Issues
- Reduce
maxFilesparameter for bulk downloads - Process files in smaller batches
- Consider file size limits in your n8n instance
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
π License
MIT Β© Gabriel Lacanna
π Credits
- Built for the n8n community
- Uses Google Cloud Storage SDK
Need help? Open an issue or check the n8n community forum.