Search API Connector Documentation

Print

Import Todoist Data to Google Sheets

In this tutorial we will show you how to use the Todoist API with Google sheets, using the API Connector add-on for Sheets. We will first register to the website to get a personal token and then set up requests for getting the data from Todoist API.

CONTENTS

BEFORE YOU BEGIN

Click here to install the API Connector add-on from the Google Marketplace.

PART 1: GET YOUR TODOIST-API API KEY

  1. The first step would be account registration on the  Todoist website. If you navigate yourself to https://todoist.com/prefs/integrations, you will see your personal API token, as depicted in the picture below. You will need this API token to pull the data, therefore save it!

PART 2: CREATE YOUR API REQUEST URL

To create API requests, we will use some examples provided in Todoist official API documentation, so feel free to explore them.

Putting it together, we get the full API Request URL:

https://api.todoist.com/rest/v1/projects 

PART 3: PULL TODOIST API DATA INTO GOOGLE SHEETS

Now when we collected everything we needed, let’s pull some data! Open API Connector to import the data into the sheets.

  1. Open up Google Sheets and click Add-ons > API Connector > Open.
  2. In the Create tab, enter the API URL we just created.

3. Under Headers, enter Authorization as your Key, and Bearer YOUR_TOKEN as your Value:

4. Now create a new tab, give it a name and click Set current to use that tab as your data destination.

5. Give a name to your request and click run!

6. And now you should be able to see the pulled data!

PART 4: MORE EXAMPLE API URLS

You can investigate different endpoints in the provided documentation. We will show you now how to create a new project in your Todoist account from the Sheets. With the same URL from the example above, make a POST request depicted on the picture below. 

  • A contact-type header is mandatory. Putting the value application/json indicates that we are gonna send the data in the JSON format. 
  • X-Request-Id is optional, nevertheless, it can be useful for preventing actions from being duplicated in the case of retrying failed requests. 
  • In the POST body, we send JSON data containing the project name, which is a Shopping list in this example. Please note: this is a mandatory property. Please refer to this page to find all possible properties.

After your POST request, you will be able to immediately see your created project!

PART 5: OTHER USEFUL ENDPOINTS

PART 6: LIMITATIONS

  • Limitation on requests: 1MiB HTTP request body limit on POST requests
  • The total size of HTTP headers cannot exceed 65 KiB
  • There is a processing timeout of 15 seconds on each request
  • Each user can make a maximum of 450 requests in 15 minute period

Leave a Comment