Friday, September 30, 2016

Data Entry / Write-Back in Tableau using Google Forms and Google Sheets

Here is a neat technique you can use to gather data right from inside your Tableau dashboard and write it to a 'database', which you can then connect to live to see real-time results.

Tableau is a read-only tool.  This is on purpose.  However sometimes there are scenarios where you might want to capture commentary, or host a poll/survey from inside Tableau, and you want to write that data back somewhere else.  Enter Google Forms and Google Sheets.  This technique works because Google Forms can accept entries via URL.  And Tableau and send URL actions which include dynamic inputs from your data.  Therefore we can post data to a Google Form from any Tableau dashboard to achieve 'write back' functionality.  I will walk through two use cases, but Im sure you will find many other creative ways of using this.

First step is to create your Google Form.  Create questions that are the same data type as what you want to have your users enter in tableau (numbers, string/text, etc).

For long Text input choose Paragraph:

And for numerical input you still choose text type of input, but choose Short Answer:

Note the unique ID of your form.  You will need this later when we make the URL Action in Tableau.

Right click in background and choose ‘View Page Source’:

Search for ‘entry’ and you will see them listed in order.  First occurrence is Question 1, next is Question 2, etc.  We will need to reference these when we create our URL action in Tableau.

Now let's set up a couple things in Tableau before we get to the URL actions (will need to make parameters and will need a sheet to act as the 'send' or 'submit' button).

Create a Parameter(s) in Tableau of the data type you want (string, integer, float, etc).  Show the Parameter(s) on your dashboard somewhere.  In this example I have a set of numerical parameters used for voting and another parameter used to capture comments (lets focus on the comment for now).

Create a new worksheet which uses the ‘Shape’ mark type and add a custom shape for your ‘Submit’ button.

Add this worksheet to your dashboard.

We will now create a URL Action to post the data to the Google Form.  Construct your URL so that it contains the Unique ID for your Google Form we found earlier in the browser, as well as all the entries/responses/inputs/parameters in it as well (separating them with ‘&’).  The form of the URL should look like this:[UNIQUE_ID_OF_YOUR_GOOGLE_FORM]/formResponse?ifq&entry.[ENTRY_1_ID]=[INSERT_PARAMETER_YOU_WANT_TO_ENTER]&submit=Submit

If you need to submit multiple parameters/entries from this submission/click then separate them with ‘&’s and enter as many as you want:


Add the Parameter values using the arrow on the side:

Then after you submit your first response you can return to the Google Form in the browser and you will see your first ‘comment’.  Click the Spreadsheet icon to create (and then see) the Google Sheet:

And now let's look at what the Numerical inputs for out beer voting parameters look like in the Google Sheet of Responses:
Awesome!  Now we can open a new Tableau workbook to connect to this Google Sheet and build whatever dashboards we want from it.  If you are using Tableau 10 just select ‘Google Sheets’ in the Connect To Data list:
 In 9.3 and earlier you will need to use the Web Data Connector to connect to Google Sheets.  Go here and scroll down until you get to the Google Sheets Connector:

Now you have a live connection set up to the sheet of responses – create whatever you want with it!  Here is a simple example using the voting/poll results:

Credit to Dash Davidson who showed me this technique in his presentation at Tableau Conference 2015!

-The Don


  1. The great service in this blog and the nice technology is visible in this blog. I am really very happy for the nice approach is visible in this blog and thank you very much for using the nice technology in this blog

    Tableau Online Training|
    SAS Online Training |
    R Programming Online Training|


  2. Great Article. its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.

    Tableau online training bangalore

  3. well done! the blog is good and it is about tableau it is useful for students and tableau Developers for more updates on Tableau tableau online course

  4. Hi, I am Faiza. I can assist you with all kinds of Data Entry, Web Research, Copy Paste Work, Contact Details from Websites, PDF to Excel/Word, Image to Excel/Word, Typing in Excel/Word, , E-Manually Typing Work to Excel or Word Document and other various business related works. data entry