Skip to content

Google Cloud Storage

Node: googleCloudStorage · Full type: n8n-nodes-base.googleCloudStorage · Version: 1

Credentials

googleCloudStorageOAuth2Api (alias: @google)

CREDENTIAL @google = googleCloudStorageOAuth2Api "My Google Cloud Storage"

Operations

Resource: bucket

create

Parameter Type Default Details
projectId string "" required
bucketName string "" required
projection options "noAcl" full, noAcl
createAcl collection {} keys: predefinedAcl, predefinedDefaultObjectAcl
createBody collection {} keys: acl, billing, cors, customPlacementConfig, dataLocations, defaultEventBasedHold, ...

delete

Parameter Type Default Details
bucketName string "" required
getFilters collection {} keys: ifMetagenerationMatch, ifMetagenerationNotMatch

get

Parameter Type Default Details
bucketName string "" required
projection options "noAcl" full, noAcl
getFilters collection {} keys: ifMetagenerationMatch, ifMetagenerationNotMatch

getAll

Parameter Type Default Details
projectId string "" required
prefix string ""
projection options "noAcl" full, noAcl
returnAll boolean false

update

Parameter Type Default Details
bucketName string "" required
projection options "noAcl" full, noAcl
getFilters collection {} keys: ifMetagenerationMatch, ifMetagenerationNotMatch
createAcl collection {} keys: predefinedAcl, predefinedDefaultObjectAcl
createBody collection {} keys: acl, billing, cors, customPlacementConfig, dataLocations, defaultEventBasedHold, ...

Resource: object

create

Parameter Type Default Details
objectName string "" required
updateProjection options "full" full, noAcl
createFromBinary boolean true
createBinaryPropertyName string "data"
createContent string ""
createData collection {} keys: acl, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, ...
createQuery collection {} keys: contentEncoding, generation, ifGenerationMatch, ifGenerationNotMatch, ifMetagenerationMatch, ifMetagenerationNotMatch, ...
encryptionHeaders collection {} keys: X-Goog-Encryption-Algorithm, X-Goog-Encryption-Key, X-Goog-Encryption-Key-Sha256

delete

Parameter Type Default Details
objectName string "" required
getParameters collection {} keys: generation, ifGenerationMatch, ifGenerationNotMatch, ifMetagenerationMatch, ifMetagenerationNotMatch

get

Parameter Type Default Details
objectName string "" required
projection options "noAcl" full, noAcl
alt options "json" json, media
binaryPropertyName string "data"
getParameters collection {} keys: generation, ifGenerationMatch, ifGenerationNotMatch, ifMetagenerationMatch, ifMetagenerationNotMatch
encryptionHeaders collection {} keys: X-Goog-Encryption-Algorithm, X-Goog-Encryption-Key, X-Goog-Encryption-Key-Sha256

getAll

Parameter Type Default Details
projection options "noAcl" full, noAcl
returnAll boolean false
maxResults number 100
listFilters collection {} keys: delimiter, endOffset, includeTrailingDelimiter, prefix, startOffset, versions

update

Parameter Type Default Details
objectName string "" required
updateProjection options "full" full, noAcl
updateData collection {...} keys: acl, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, ...
metagenAndAclQuery collection {} keys: generation, ifGenerationMatch, ifGenerationNotMatch, ifMetagenerationMatch, ifMetagenerationNotMatch, predefinedAcl
encryptionHeaders collection {} keys: X-Goog-Encryption-Algorithm, X-Goog-Encryption-Key, X-Goog-Encryption-Key-Sha256

Common Parameters

Parameter Type Default Details
bucketName string "" required
requestOptions collection {} keys: batching, allowUnauthorizedCerts, proxy, timeout

Parameter Details

createAcl children:

Parameter Type Default Details
predefinedAcl options "authenticatedRead" authenticatedRead, private, projectPrivate, publicRead, publicReadWrite
predefinedDefaultObjectAcl options "authenticatedRead" authenticatedRead, bucketOwnerFullControl, bucketOwnerRead, private, projectPrivate, publicRead

createBody children:

Parameter Type Default Details
acl json "[]"
billing json "{}"
cors json "[]"
customPlacementConfig json "{}"
dataLocations json "[]"
defaultEventBasedHold boolean true
defaultObjectAcl json "[]"
encryption json "{}"
iamConfiguration json "{}"
labels json "{}"
lifecycle json "{}"
location string "US"
logging json "{}"
retentionPolicy json "{}"
rpo string "DEFAULT"
storageClass string "STANDARD"
versioning json "{}"
website json "{}"

getFilters children:

Parameter Type Default Details
ifMetagenerationMatch number 0
ifMetagenerationNotMatch number 0

createData children:

Parameter Type Default Details
acl json "[]"
cacheControl string ""
contentDisposition string ""
contentEncoding string ""
contentLanguage string ""
contentType string ""
crc32c string ""
customTime string ""
eventBasedHold boolean false
md5Hash string ""
metadata json "{}"
storageClass string ""
temporaryHold boolean false

createQuery children:

Parameter Type Default Details
contentEncoding string ""
generation number -1
ifGenerationMatch number -1
ifGenerationNotMatch number -1
ifMetagenerationMatch number -1
ifMetagenerationNotMatch number -1
kmsKeyName string ""
predefinedAcl options "authenticatedRead" authenticatedRead, bucketOwnerFullControl, bucketOwnerRead, private, projectPrivate, publicRead

encryptionHeaders children:

Parameter Type Default Details
X-Goog-Encryption-Algorithm options "AES256" AES256
X-Goog-Encryption-Key string ""
X-Goog-Encryption-Key-Sha256 string ""

getParameters children:

Parameter Type Default Details
generation number -1
ifGenerationMatch number -1
ifGenerationNotMatch number -1
ifMetagenerationMatch number -1
ifMetagenerationNotMatch number -1

updateData children:

Parameter Type Default Details
acl json "[]"
cacheControl string ""
contentDisposition string ""
contentEncoding string ""
contentLanguage string ""
contentType string ""
customTime string ""
eventBasedHold boolean false
metadata json "{}"
temporaryHold boolean false

metagenAndAclQuery children:

Parameter Type Default Details
generation number -1
ifGenerationMatch number -1
ifGenerationNotMatch number -1
ifMetagenerationMatch number -1
ifMetagenerationNotMatch number -1
predefinedAcl options "authenticatedRead" authenticatedRead, bucketOwnerFullControl, bucketOwnerRead, private, projectPrivate, publicRead

listFilters children:

Parameter Type Default Details
delimiter string "/"
endOffset string ""
includeTrailingDelimiter boolean false
prefix string ""
startOffset string ""
versions boolean false

requestOptions children:

Parameter Type Default Details
batching fixedCollection {...} groups: batch
allowUnauthorizedCerts boolean false
proxy string ""
timeout number 10000

Example

NODE "googleCloudStorage" @google AS "Google Cloud Storage" {
  resource: "bucket",
  operation: "get",
  projectId: {{ $json.projectId }},
  bucketName: {{ $json.bucketName }},
  objectName: {{ $json.objectName }}
}