batch_share_drive_file
Share a Google Drive file or folder with multiple users or groups at once. Assign different roles and set expiration times for each recipient.
Instructions
Shares a Google Drive file or folder with multiple users or groups in a single operation.
Each recipient can have a different role and optional expiration time.
Note: Each recipient is processed sequentially. For very large recipient lists, consider splitting into multiple calls.
Args: user_google_email (str): The user's Google email address. Required. file_id (str): The ID of the file or folder to share. Required. recipients (List[Dict]): List of recipient objects. Each should have: - email (str): Recipient email address. Required for 'user' or 'group' share_type. - role (str): Permission role - 'reader', 'commenter', or 'writer'. Defaults to 'reader'. - share_type (str, optional): 'user', 'group', or 'domain'. Defaults to 'user'. - expiration_time (str, optional): Expiration in RFC 3339 format (e.g., "2025-01-15T00:00:00Z"). For domain shares, use 'domain' field instead of 'email': - domain (str): Domain name. Required when share_type is 'domain'. send_notification (bool): Whether to send notification emails. Defaults to True. email_message (Optional[str]): Custom message for notification emails.
Returns: str: Summary of created permissions with success/failure for each recipient.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | ||
| recipients | Yes | ||
| email_message | No | ||
| send_notification | No | ||
| user_google_email | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |