create_drive_file
Create a file in Google Drive using direct content or a URL. Supports shared drives and includes a dry-run option for preview.
Instructions
Creates a new file in Google Drive, supporting creation within shared drives. Accepts either direct content or a fileUrl to fetch the content from.
Args: user_google_email (str): The user's Google email address. Required. file_name (str): The name for the new file. content (Optional[str]): If provided, the content to write to the file. folder_id (str): The ID of the parent folder. Defaults to 'root'. For shared drives, this must be a folder ID within the shared drive. mime_type (str): The MIME type of the file. Defaults to 'text/plain'. fileUrl (Optional[str]): If provided, fetches the file content from this URL. Supports file://, http://, and https:// protocols. dry_run (bool): If True, returns a preview and does not create the file. Defaults to True.
Returns: str: Confirmation message of the successful file creation with file link.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | Yes | ||
| file_name | Yes | ||
| content | No | ||
| folder_id | No | root | |
| mime_type | No | text/plain | |
| fileUrl | No | ||
| dry_run | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |