Share File

google_drive.share_file
ActionFiles & storageconnection required

Calls Drive permissions.create. Needs a read/write Drive scope (drive or drive.file) on the connection.

Grant a person, group, domain or anyone access to a Drive file or folder.

Connection

Required
Yes — the node will not save without one
Auth type
OAuth 2.0
Providers
Google Drive
Secret shape
{"client_id", "client_secret", "refresh_token"}
Config it needs
token_uri
Resolved by
config.connection_id, else node.connection_id

Configuration

7 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
file_id
The Drive file id.
stringYes———
role
Access level to grant. 'owner' transfers ownership to the grantee — Drive requires a user grantee and always mails them.
stringNoreaderone of "reader", "commenter", "writer", "fileOrganizer", "organizer", "owner"—
type
Who the grant is for.
stringNouserone of "user", "group", "domain", "anyone"—
email_address
Grantee address (required for user/group).
stringNo—email format—
domain
Grantee domain (required for domain).
stringNo———
send_notification
Let Google mail the grantee about the share.
booleanNofalse——
message
Note in the notification mail.
stringNo———

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "role": "reader",
  "send_notification": false,
  "type": "user"
}

Output

One shape.

permission

FieldTypeExample
file_id
string—
permission_id
Drive's id for the grant.
string—
role
string—
type
user / group / domain / anyone.
string—
email_address
The grantee, for user/group grants.
string—
domain
The grantee domain, for domain grants.
string—
notified
True when Google mailed the grantee.
boolean—
{
  "domain": "",
  "email_address": "",
  "file_id": "",
  "notified": false,
  "permission_id": "",
  "role": "",
  "type": ""
}

See Share File run in a workflow.

In a technical demo we add the Google Drive connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.