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.
- Before You Begin
- Part 1: Get your Todoist-API API Key
- Part 2: Create your API Request URL
- Part 3: Pull API data into Sheets
- Part 4: More Example API URLs
- Part 5: Other useful endpoints
- Part 6: Limitations
BEFORE YOU BEGIN
Click here to install the API Connector add-on from the Google Marketplace.
PART 1: GET YOUR TODOIST-API API KEY
- 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.
- API root: https://api.todoist.com/rest/v1
- Endpoint: /projects
Putting it together, we get the full API Request URL:
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.
- Open up Google Sheets and click Add-ons > API Connector > Open.
- 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 Content-Type header is mandatory. Putting the value as application/json indicates that we will send the data in 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 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
- Working with tasks: https://api.todoist.com/rest/v1/tasks
- Working with sections: https://api.todoist.com/rest/v1/sections
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