Object → Create
AI-generatedOverview
This node enables interaction with Google Cloud Storage, specifically focusing on managing storage objects within buckets. The "Object - Create" operation allows users to upload new files (objects) into a specified bucket in Google Cloud Storage. It supports uploading file content either from binary data provided as input or directly from a text string. This flexibility makes it useful for workflows that need to programmatically add files to cloud storage, such as backing up data, storing generated reports, or handling user-uploaded content.
Practical examples:
- Uploading an image or document received from a previous node in the workflow.
- Creating text files dynamically with generated content and saving them to a cloud bucket.
- Automating backups by uploading database dumps or logs as objects.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authentication to use: Service Account or OAuth2. |
| Bucket Name | The name of the Google Cloud Storage bucket where the object will be created. |
| Object Name | The name/key of the object (file) to create inside the bucket. |
| Projection | Determines which properties are returned in the response. Options: All Properties, No ACL (Access Control List). |
| Use Input Binary Field | Whether to use binary data from an input field as the file content (true) or to use plain text content (false). |
| Input Binary Field | The name of the binary property in the input data containing the file to upload (used if "Use Input Binary Field" is true). Default is "data". |
| File Content | The textual content of the file to upload (used if "Use Input Binary Field" is false). |
| Create Fields | Additional metadata and settings for the object being created, including: - Access Control List (ACL) - Cache Control - Content Disposition - Content Encoding - Content Language - Content Type - CRC32c Checksum - Custom Time - Event Based Hold - MD5 Hash - Metadata (custom key-value pairs) - Storage Class - Temporary Hold |
| Additional Parameters | Extra query parameters for the creation request, such as: - Content Encoding - Generation (specific revision) - Conditional generation matching/excluding - Metageneration matching/excluding - KMS Key Name (for encryption) - Predefined ACL (set of access controls like private, public read, etc.) |
| Encryption Headers | Headers related to customer-supplied encryption keys, including: - Encryption Algorithm (must be AES256) - Base64 encoded encryption key - Base64 encoded SHA256 hash of the encryption key |
Output
The output JSON contains the response from the Google Cloud Storage API after creating the object. This typically includes metadata about the newly created object such as its name, size, content type, creation time, and any applied ACLs or metadata.
If the uploaded content was binary, the node does not output the binary data itself but confirms successful upload and provides metadata details.
Dependencies
- Requires valid Google Cloud credentials configured in n8n, either via a service account or OAuth2 authentication.
- Uses Google Cloud Storage API endpoints for object management.
- No additional external dependencies beyond standard n8n credential setup and network access to Google Cloud Storage.
Troubleshooting
- Authentication errors: Ensure that the selected authentication method has proper permissions to write objects to the specified bucket.
- Bucket or object not found: Verify that the bucket name exists and the object name is correctly specified.
- Invalid encryption headers: If using customer-supplied encryption keys, ensure the keys and hashes are base64 encoded and match Google's requirements.
- File content issues: When using binary input, confirm the binary property name matches the actual input data; when using text content, ensure the content is properly formatted.
- Quota or permission denied errors: Check Google Cloud IAM policies and quotas for your project and bucket.