$npx -y skills add googleworkspace/cli --skill recipe-share-folder-with-teamShare a Google Drive folder and all its contents with a list of collaborators.
| 1 | # Share a Google Drive Folder with a Team |
| 2 | |
| 3 | > **PREREQUISITE:** Load the following skills to execute this recipe: `gws-drive` |
| 4 | |
| 5 | Share a Google Drive folder and all its contents with a list of collaborators. |
| 6 | |
| 7 | ## Steps |
| 8 | |
| 9 | 1. Find the folder: `gws drive files list --params '{"q": "name = '\''Project X'\'' and mimeType = '\''application/vnd.google-apps.folder'\''"}'` |
| 10 | 2. Share as editor: `gws drive permissions create --params '{"fileId": "FOLDER_ID"}' --json '{"role": "writer", "type": "user", "emailAddress": "colleague@company.com"}'` |
| 11 | 3. Share as viewer: `gws drive permissions create --params '{"fileId": "FOLDER_ID"}' --json '{"role": "reader", "type": "user", "emailAddress": "stakeholder@company.com"}'` |
| 12 | 4. Verify permissions: `gws drive permissions list --params '{"fileId": "FOLDER_ID"}' --format table` |