Text Content Extraction from Google Docs & Sheets

There are many times in an automated workflow where you need the actual text content of a file, rather than just the file itself. You might need to parse specific data, inject the text into an email body, or—most importantly—pass the content to an AI action (like Gemini or OpenAI). Giving an AI the actual text context instead of a file attachment dramatically increases its accuracy and reliability!

For standard files like .pdf or .txt, Zenphi’s 'Convert file contents to string' action is the perfect tool for this.

However, Google-based files (like Google Docs and Sheets) are a bit unique! Because they are cloud-native formats rather than traditional binary files, you need a slightly different approach to read them. To extract text from these specific formats, we can easily tap into the Google API.

To save you time, I have created a ready-to-use Mini-Flow for this exact scenario!

🛠️ How to Use This Mini-Flow

There is no need to build this from scratch. Just follow these quick steps:

  1. Download the Flow: Download the attached .json file at the bottom of this post.

  2. Upload into Zenphi: Import the .json file directly into your Zenphi flow.

  3. Set the Connection: Open the 'Redeem OAuth Token' action and make sure to pick your Google Drive connection from the dropdown to authorize the API call.

  4. Target your File: The flow uses the 'Find file/folder' action to locate your target Google Doc and automatically extracts its content. Once connected, it is ready to use immediately!

⚠️ Important Note on OAuth Tokens: > If you search for the 'Redeem OAuth Token' action and cannot find it in your action panel, or if you add it and see an error saying "Unable to load the settings for this action", don't worry! Just reach out to the Zenphi Support Team. Let them know, and they will enable this feature for your workspace immediately.

Extract Text from Google Doc_1780082009388.json