Object → Delete
AI-generatedOverview
This node provides enhanced integration with Google Cloud Storage, allowing users to manage storage buckets and objects programmatically within n8n workflows. Specifically for the Object Delete operation, it enables deleting an object stored in a specified bucket on Google Cloud Storage.
Common scenarios where this node is beneficial include:
- Automating cleanup of obsolete or temporary files in cloud storage.
- Managing lifecycle of data by removing outdated versions or unwanted objects.
- Integrating with other workflow steps that generate or process files, ensuring storage stays organized and cost-effective.
For example, after processing images uploaded to a bucket, you might use this node to delete the original raw files automatically.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method used to authenticate with Google Cloud Storage API. Options: - Service Account - OAuth2 |
| Bucket Name | The name of the Google Cloud Storage bucket containing the object to delete. This is required. |
| Object Name | The name (key) of the object within the bucket to delete. This is required. |
| Additional Parameters | Optional parameters to control conditional deletion based on object generation and metageneration values: - Generation: Specific revision of the object to delete. - Generation Match: Only delete if generation matches this value. - Generation Exclude: Only delete if generation does not match this value. - Metageneration Match: Only delete if object's current metageneration matches this value. - Metageneration Exclude: Only delete if object's current metageneration does not match this value. |
Output
The output JSON contains the response from the Google Cloud Storage API after attempting to delete the specified object. Typically, a successful delete operation returns an empty response or confirmation of deletion.
json: Contains metadata about the deleted object or an empty object if deletion was successful.- If the operation fails, the output may contain an error message describing the failure.
This node does not output binary data for the delete operation.
Dependencies
- Requires valid authentication credentials for Google Cloud Storage, either via a service account or OAuth2.
- Properly configured Google Cloud project with permissions to delete objects in the specified bucket.
- Network access to Google Cloud Storage API endpoints.
Troubleshooting
Common Issues:
- Permission Denied: Ensure the provided credentials have sufficient permissions to delete objects in the target bucket.
- Object Not Found: Verify the bucket name and object name are correct; the object must exist to be deleted.
- Conditional Parameters Mismatch: Using generation or metageneration conditions incorrectly can cause the delete operation to fail silently or return errors if conditions are not met.
Error Messages:
"403 Forbidden": Insufficient permissions; check IAM roles and credentials."404 Not Found": The specified object or bucket does not exist."412 Precondition Failed": Conditional parameters (generation/metageneration) did not match; adjust or remove these parameters if not needed.
To resolve errors, verify all input parameters, ensure credentials are valid and authorized, and confirm the object exists.