Alteryx Designer

Definitive answers from Designer experts.
Register for the upcoming Live Community Q&A Session - and don't forget to submit your questions for @DeanS regarding the future role of analytics here.

How to use the "Connection Token" for the Google Sheets and Google Analytics Connectors

Alteryx
Alteryx
Created

How to use the "Connection Token" for the Google Sheets and Google Analytics Connectors

Google allows users up to 50 refresh tokens per account, so if you are a heavy user of Google Sheets or Google Analytics, you can easily reach this threshold. A clear sign of having reached the limit is that the tools start asking for re-authentication.

Starting with the Version 2.2 of the Google Sheets Connector and Version 8.0.0 of the Google Analytics Connector, you are able to share the same Connection Token across tools, helping you stay under the refresh token limit.

 

Prerequisites

  • Alteryx product - Designer
    • Version 2018.3 and up (Google connector authentication updated in Designer Version 2020.2 and later)
  • Google Sheets Connector
    • Version 2.2 and later
  • OR Google Analytics Connector
    • Version 8.0.0 and later
  • Previously authenticated Google Sheets or Google Analytics Connector tool (either with End user credentials or using the OAuth2 Overrides, please see the following on How to obtain the Client ID and Client Secret from your Google Account
 

Procedure

  1. To obtain a Connection Token, you first need to authenticate the tool (either with End user credentials by clicking "Connect", or by clicking Optional OAuth Overrides checkbox and entering your Google Client ID and Client Secret)
    1. Once successfully authenticated, you can find the tool's Connection Token in any screen of the Google Sheets or Google Analytics Input and Output tools
                                             idea Skyscrapers
      1. To use the Connection Token at login, either by itself, or in combination with any of the existing authentication options above, simply paste (Ctrl + v) the token in the Connection Token field. If the Connection Token was created with OAuth2 Overrides, then also enter credentials
        • Note a Connection Token allows you to access data under your Google account, and holds the permissions you have granted the specific tool from which you have copied the token. Therefore, a token copied from an Input tool will only have read rights and it won't work with an Output tool
                                    
          idea Skyscrapers
      2. To use the token in a working workflow, you can input the Connection Token in any screen of the Google Sheets or Google Analytics tools. Paste the token in the Connection Token field and select Apply (please make sure there are no white spaces before or after)
                                
        idea Skyscrapers    
        •  If you have inserted an invalid token, you can click on the canvas and back to the tool, and the old token will be displayed again.

       

       

      Common Issues and Troubleshooting Tips

      • The Connection Token IS NOT the Access Token or the Refresh Token
      • Connection Tokens can not be shared across accounts. If a Connection Token from a different user is inserted, it will be valid initially but the tool will fail at runtime
      • A Connection Token obtained from an Input tool should not be applied to an Output tool due to it having only Read rights. This will lead to a runtime error. A Connection Token from an Output tool can be used for both types of tools
      • The Connection Token can be used by itself, but if the account for which this token belongs to has no right to access the selected data, the workflow will fail at runtime
      • The Apply button must be used after pasting the Connection Token inside the tools. Otherwise, the inserted token will be lost when clicking away from the tool
      • Please note Connection Tokens are shareable between Google Sheets and Google Analytics tools
      Comments
      Alteryx
      Alteryx

      In collaboration with @dbabiac . Thanks Diana!

      7 - Meteor

      There no longer is an Other option when created new credentials (see below).  I tried selecting Desktop app and after attempting to connect, I was asked to Sign into Google, which failed because my "browser" was not authorized. Signing in with username and password yields the same results.

       

      All documentation about getting Alteryx authorized no longer aligns with the options Google is offering. Please help.  I have a lot of processes depending on getting this corrected.

       

      MeanLeanDean_0-1590000754346.png

       

       

      8 - Asteroid

      Hi everybody and thanks Sabrina and Diana for this great post.  Unfortunately, I'm having trouble at Step One too.  After entering my Client ID and secret key in the Google Analytics connector, I click the Connect button and I can't sign in (please see error pasted below).  I'm using the latest Google Analytics tool (v8) and I chose "Desktop app" from the Application Type drop-down (in the absence of the "other" option).  I have also tried "Web application" as I'm sure this worked for me last year with the old GA tool, but that didn't work either. 

       

      It would be useful to know if anyone IS successfully using this version of the GA tool, or are we all having these issues?  Thank you in advance for your kind help. Completely stuck.

       

      TeePee_0-1591094565152.jpeg

       

      6 - Meteoroid

      The following is the short-term workaround to get my old Client ID and Secret from the pre-2.2 Google Input Tool to work again since they will no longer work in the version 2.2 of the Google Input Tool:

       

      When rehosting the Alteryx server to a new server, I found a flow using an older version the Google Input tool was now failing on the new server. I tried installing the latest Google Input tool = version 2.2 with the Client ID and Secret from the old version. But ran into the similar issues as the previous 2 posts have mentioned when I tried to create new credentials for the v2.2 Google Input Tool. In short there is no longer an application type = Other available to select when creating credentials. The Google API documentation is like very dense forest and I needed a quick short-term work around to get this flow working again.

       

      From The 'How to Guide' to Google Sheets link provided above in the right hand site navigation link panel, I learned that the Google Tools are packaged as .yxi files - the Server documentation refers to this on page 57 The .yxi package design issues are noted also at the end of the How to Guide to Google Sheets. This means that Alteryx looks to find the Google Input Tool in at least one of 3 specific locations copied below from p. 57. So, I copied the Tool folder from C:\ProgramData\Alteryx\Tools on the old server to the new server and the flow began working again.   

       

      1.) C:\Users\<username>\AppData\Roaming\Alteryx\Tools
      2.) C:\ProgramData\Alteryx\Tools

      3.) Alteryx install folders