Join egghead, unlock knowledge.

Want more egghead?

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock This Lesson
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Retrieve And Tweet Information from Google Spreadsheets


    In this lesson, we’ll learn how to retrieve and tweet data from Google Spreadsheets. We'll use Tabletop.js to make this easier. More information on Tabletop can be found at



    Become a Member to view code

    You must be a Pro Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    orLog In




    In addition to Twit, we'll need Tabletop, which is require ('tabletop'). In the Google spreadsheet we want to use, we need to make sure we have a header, which in this case is the URL of an interesting API resource.

    We need to say file publish to the Web. We press "publish," and then copy this link. Here, we'll say parse spreadsheet URL= this link. Then we say table top.init. This takes three things. A key, which is our spreadsheet URL, our callback function, which is data, tabletop, and whether or not it's a simple sheet, which is true if we only have one sheet.

    Let's see what that gives us. We can see a couple of APIs from this course. We can see ProgrammableWeb, which is an excellent resource to find other APIs, as well as ProPublica, which hosts an API of Congressional actions, including bills, votes, roll calls, etc.

    To tweet these, we can say data.for statuses/update with a status, which we'll make up here. It's d.url is a great API to use for Twitter bots. There's an error, we'll log it out. Otherwise, we'll say post in. We can see that it worked.