https://linen.dev logo
Google Drive - Parse file
# 🖥│support-forum
p
Hi! I am looking at the google drive toolkit, trying to understand how/if we can use it to read the content of a file. I know google APIs are usually a huge hassle to work with. So I was hoping you would have solved it for my agent 😄 It looks like it is only possible to download a file, not get its contents? If this is the case, is it possible to control where the file is downloaded? Id like to download it to a tmp directory. Currently I am wrapping the download file tool with a after_execute modifier that reads the content, then deletes the file. I am hoping there is another way that lets me control where the file ends up, or reads the file content.
u
Hey @Pontus, you cannot get file contents. ref [doc](https://developers.google.com/workspace/drive/api/reference/rest/v3/files/get?apix_params=%7B"fileId"%3A"1Vur3reuiiouGz7N8dt9ShtrSXBArJybPwLnwiWCeqN8"%7D). — You can export/download the file and read it's contents. Also, to manage the download file directory, you can refer this documentation: https://docs.composio.dev/docs/executing-tools#automatic-file-handling Let me know if this works for you.
p
Great!! Thank you!