Contents

View Drive File

GoogleDriveViewFileTool · Tools · Connections

Open a Google Drive file by id, with Google Docs, Sheets, Slides and Drawings shown as a PDF export. A PDF or an image (PNG, JPEG, GIF or WebP up to 5 MB) is shown to you in a message right after this call's result; a text file returns its text, cut at 100,000 characters. Anything else, and any file over 50 MB, returns the file's details and says it can't be displayed.

Parameters

NameTypeRequiredDescription
file_idstringYesThe file's Drive id.

View Drive File Tool#

drive_view_file opens a file for the agent to inspect in the conversation.

When to Use#

Open a Drive file found with drive_list_files, drive_search_files or drive_get_file. Google Docs, Sheets, Slides and Drawings open as PDF exports.

Parameters#

Parameter Type Required Description
file_id string Yes The Drive file id

Returns#

The result includes file_id alongside the file’s details in attachment and one of three view values:

  • shown: A PDF or an image (PNG, JPEG, GIF or WebP up to 5 MB) follows the tool results in the conversation.
  • text: The text field contains up to 100,000 characters, with a note if the text was cut.
  • not_viewable: A reason and note explain why the file cannot be displayed. This includes unsupported formats or files over 50 MB.

Notes#

Folders and Google files that cannot be exported as PDF return not_a_file. An export above Google’s 10 MB export limit returns too_large. The selection switch is view_file.

Verdalia keeps shown files privately for 7 days without making a Library item or a share link.