Update permissions for a file by permission ID
This example pipeline demonstrates how to update permissions for
a specific file in Google Drive. It maps permission data and then uses Google Drive
operations to update the permissions for a designated file ID.
Download this pipeline.
-
Configure the Mapper Snap to map the expression
commenter
to the target path for
role permissions in the request body using JSON path extraction.

-
Configure the Misc Operations to update permissions for a specific file using the specified File ID.

On validation, the pipeline updates permissions for a Google Drive file with
the specified file ID 17WeQCQ8iYKI5NdDhI80hQK8EZQJfYNlI using the
permission ID 05032816828153286365 and performs an Update operation
on the Permissions resource.
You can view the output as shown below in the output
preview:
[
{
"fileId": "17WeQCQ8iYKI5NdDhI80hQK8EZQJfYNlI",
"Item status": "success",
"response": {
"role": "commenter",
"kind": "drive#permission",
"id": "05032816828153286365",
"type": "domain",
"allowFileDiscovery": false
},
"original": {
"requestBody": [
{
"role": "commenter"
}
]
}
}
]