# Extract the first document for a search — Google Drive Botize method — `drive.get_first_from_query` (action). Returns the first document whose title matches a given search and optionally within a specific folder. This method also allows you to search for documents within the trash folder. Note: only documents created or previously opened by Botize are accessible due to Google Drive permission restrictions. This is an action: it runs as a step of a task. Several can be chained. ## Fields you set The field's internal name, its type and the values it accepts. These fields accept `{{...}}` tags from earlier steps. - `filename_contains` *(string)* — Only documents that contain this word in the name - `folder_url` *(string)* — Only documents in this folder - `include_trash_folder` *(boolean)* ## Output variables Data this step makes available. Reference them in later steps with the double-brace tag. - `{{document_id}}` *(text)* — Document Id - `{{document_name}}` *(text)* — Document Name - `{{document_mimetype}}` *(text)* — Document MimeType - `{{document_url_export_as_tab_csv}}` *(url)* — CSV Document URL ## Account Needs a connected Google Drive account in Botize: https://botize.com/en/app/drive/authenticate ## This app Every trigger and action for Google Drive: https://botize.com/en/app/drive.md ## How to build this An AI assistant (Claude, ChatGPT, Cursor…) can create and edit these tasks in the user's account through the Botize MCP connector, included in every plan: https://webhook.botize.es/mcp - Connection guide: https://botize.com/en/mcp - Agent map: https://botize.com/llms.txt - New account: https://botize.com/en/join (500 free operations, no card) --- Machine-readable summary for AI assistants. Human version: https://botize.com/en/method/drive/get_first_from_query