Search

Get Document Content

Last Updated: Mar 15, 2021

Articles

Use this function to read the content in the Google Doc.

Syntax

Get Document Content (document_id, private_key, client_email)

Parameters

Input Parameter Name Description
document_id Name of the document
private_key Private key of the service account
client_email Email ID of the service account

Returns

Return Value Description
Output
  • On Success returns 1, Document data
  • On Failure returns 0, Error Message

Sample

Get Document Content (XYZ123, —–BEGIN PRIVATE KEY—–\nABCD\n—–END PRIVATE KEY—–, name@project-id.iam.gserviceaccount.com)

  • Uses the private key —–BEGIN PRIVATE KEY—–\nABCD\n—–END PRIVATE KEY—– to connect to the Email ID name@project-id.iam.gserviceaccount.com, reads the content in the Google Doc with ID XYZ123.
    Returns the Document data after reading the content.

To view all the Google Docs functions, click here.

Did you find what you were looking for?