<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z00009xRSdYCAWOkta Identity EngineWorkflowsAnswered2026-01-26T09:00:28.000Z2024-01-26T01:07:45.000Z2024-01-30T16:14:57.000Z

v1k68 (v1k68) asked a question.

Get Google Doc content to place in email body preferably in HTML

We have an orientation document which resides in Google Docs. I wish to automatically send the content of that file to a user when their OKTA account is activated. I do not wish to use html in a Compose box, as we don't want to have to update this workflow every time our applications change. I want to update the Google file only.

 

However, when using the Google Docs Read Document function in workflows I can't get at the actual CONTENT of the file, just all of the metadata about the file instead. How can I get at this information and add it to the Body field in my Gmail - Send email function?

 

I have tried downloading the file using the Google Drive function and using Send email with attachment, but that also fails to attach an actual file. I would prefer to just get the html from the Google Doc into the body of the email but will settle for an attached document if that's the only way it's possible.


  • Mihai N. (Okta, Inc.)

    Hi @v1k68 (v1k68)​ , Thank you for reaching out to the Okta Community! 

     

    While your request is outside of my area of expertise, I did ask some of my Workflows colleagues for their insight. Here’s how they broke it down: 

     

    The implementation would imply the following: 

    1.Reading the Google Docs document contents directly (so the raw text from the document)

    2.Downloading a google doc and uploading it to another service

     

    Number 1 - is not possible with the built-in connector actions, although you might be able to investigate the Google Drive API and use our Custom API Action to accomplish it.

     

    Number 2 - should be working, but it can be a bit complicated to get up and running. The best advice we’ve seen work for customers asking about this is to add the file extension they want to the file name on the Google Drive side. Here's a note from our Download File doc:

    “Note that the values from the Download Format drop-down and the file name and extension are independent. After a file is downloaded, it is stored with the file name provided by Google Drive regardless of the option selected from the Download Format drop-down.”

     

     

    That being said, I recommend checking out the dedicated Workflows discussion group as well for insight and assistance:

    https://support.okta.com/help/s/group/0F91Y000000PueUSAS/workflows?language=en_US

     

    If my answer helped, remember to mark it as best to increase its visibility for other members of the Okta Community who might have the same questions as you. 

     

    Hope my answer helps! 

    --------------------------------

    Ask the Experts: Now Thru 1/31 Okta FastPass Engineering and Product Teams Answer Your Questions

    Expand Post
  • TimL.58332 (Workflows)

    @v1k68 (v1k68)​  -- To expand on what Mihai previously provided.

     

    Workflows is only going to be able to perform actions that the endpoints of the service you are connecting to allow for. If Google (or any other third-party) provides an endpoint that allows you to request the RAW text content of files then it would be possible. I have seen some endpoints that let you RAW read plain text files which also includes CSVs (Doc's are typically not plain text files they are typically ZIP files). However, if the vendor does not have this capability then the use case will not be possible.

     

    As stated above the attachment process is pretty well vetted and should be working fine. Gmail is drag and drop into the attachments field of a "type : file" in Workflows. O365 requires it to be a list of attachments so there is an extra step where you need to drag the attachment into a List Construct then feed that output "list of files" to O365.

     

     

    Expand Post
  • v1k68 (v1k68)

    Thank you both for helping me solve this issue!

     

    I was able to get the Downloaded attachment to show up properly for users in PDF format which allows for hyperlinking, etc. which was my main goal.

     

    I appreciate the community helping me out, hopefully one day I can return the favor

    Expand Post
This question is closed.
Loading
Get Google Doc content to place in email body preferably in HTML