All docs This doc
Skip to end of metadata
Go to start of metadata

To use the Google Spreadsheet connector, add the <googlespreadsheet.init> element in your proxy configuration before use any other Google Spreadsheet operations. The <googlespreadsheet.init> element is used to authenticate the user using OAuth2 authentication and allows the user to access the Google account which contains the spreadsheets. For more information on authorizing requests in Google Spreadsheets, see https://developers.google.com/sheets/api/guides/authorizing.

Info

Follow the guide to set up the Google Spreadsheets and get credentials such as clientId, clientSecret, accessToken, refreshToken.

init
<googlespreadsheet.init>
    <accessToken>{$ctx:accessToken}</accessToken>
    <clientId>{$ctx:clientId}</clientId>
    <clientSecret>{$ctx:clientSecret}</clientSecret>
    <refreshToken>{$ctx:refreshToken}</refreshToken>
    <apiUrl>{$ctx:apiUrl}</apiUrl>
</googlespreadsheet.init>

To get the OAuth access token directly call the init method (this method call getAccessTokenFromRefreshToken method itself) or add  <googlespreadsheet.getAccessTokenFromRefreshToken> element before <googlespreadsheet.init> element in your configuration.

getAccessTokenFromRefreshToken
<googlespreadsheet.getAccessTokenFromRefreshToken>
    <clientId>{$ctx:clientId}</clientId>
    <clientSecret>{$ctx:clientSecret}</clientSecret>
    <refreshToken>{$ctx:refreshToken}</refreshToken>
</googlespreadsheet.getAccessTokenFromRefreshToken>

Note

When trying it out the first time, you need to use valid accessToken to use the connector operations. If the provided accessToken has expired then the token refreshing flow will be handled inside the connector.


Properties
  • accessToken:Access token which is obtained through the OAuth2 playground.
  • apiUrl: The application URL of Google Sheet version v4. 
  • clientId: Value of your client id, which can be obtained via Google developer console.

  • clientSecret: Value of your client secret, which can be obtained via Google developer console.

  • refreshToken: Refresh token which is obtained through the OAuth2 playground. It is used to refresh the accesstoken.

Now that you have connected to Google Spreadsheet, use the information in the following topics to perform various operations with the google spreadsheet connector.

  • No labels