Search API Connector Documentation
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: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Get Your Todoist API Key
- Nnavigate 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
For our first request, we’ll get a list of projects.
- API root: https://api.todoist.com
- Endpoint: /rest/v1/projects
Putting it together, we get the full API Request URL:
Part 3: Pull Todoist API Data into Google Sheets
Now that we’ve collected everything we need, let’s pull some data! Open API Connector to import the data into the sheets.
- Open up Google Sheets and click Extensions > 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: API Documentation
Official API documentation: https://developer.todoist.com/rest/v1/#overview