Simple integration that includes different UI extensions:
- Project context menu UI extension to add lorem ipsum tasks to the current Todoist project
- Composer extension that injects lorem ipsum text into the composer
- Settings extension that displays a message in the integration settings
To tailor your dev environment, create a .env
file and put in the relevant settings:
PORT
: The port the backend will run onVERIFICATION_TOKENS
: This is a comma-separated list of valid tokens from https://todoist.com/app_console that will be used to verify the token has come from Todoist.BASE_URL
: This is the domain for accessing static files (like images)
npm install
npm run dev
Before you run the integration locally, copy example.env
as .env
, and edit by adding necessary credentials (follow the comments inside the file).
In order for Todoist to be able to communicate with your integration, we need to expose your service to the internet. There are a couple of tools available to create this kind of tunnel:
Make sure to start your tool of choice with the PORT
from .env
, for example ngrok http 3000
.
For example, if you choose to use ngrok
, you'll be running some variation of the following command (we chose to listen on port 3000):
Take note of the URL exposed by your tool of choice, as you'll need it in the next step (i.e. https://my-extension-service
).
- Visit the App Management Console (you'll be prompted to log in if you're not already)
- Click "Create a new app" and insert a name in the "App name" field (i.e. "Lorem Ipsum")
- Create three different UI Extensions:
- In the
UI Extensions
section, click "Add a new UI extension":- Give it a name (i.e. "Add lorem ipsum tasks")
- Select "Context menu" as the "Extension type" (and "Project" as the "Context type")
- Point "Data exchange endpoint URL" to your service URL followed by
/process
(or the endpoint name you chose). This value in this field might look something likehttps://my-extension-service/process
- In the
UI Extensions
section, click "Add a new UI extension":- Give it a name (i.e. "Add lorem ipsum content")
- Select "Composer" as the "Extension type"
- Point "Data exchange endpoint URL" to your service URL followed by
/process
(or the endpoint name you chose). This value in this field might look something likehttps://my-extension-service/process
- In the
UI Extensions
section, click "Add a new settings extension":- Give it a name (i.e. "Lorem ipsum settings")
- Point "Data exchange endpoint URL" to your service URL followed by
/process
(or the endpoint name you chose). This value in this field might look something likehttps://my-extension-service/process
- In the
- Select the
task:add
scope - In the
Installation
section, click on theInstall for me
button
- Visit Todoist
- Test your context menu extension:
- Select any of your Todoist projects (or create a new one)
- Click on the context menu icon of that project, select "Integrations" and finally select your UI Extension from the list (i.e. "Add lorem ipsum tasks")
- You should see a few tasks being added to your current project
- Test your composer extension:
- Select any of your Todoist tasks (or create a new one)
- Click inside the comment composer, select "Add lorem ipsum content" in the composer extensions menu
- You should see content being injected into the composer
- Test your settings extension:
- Click on the profile picture menu > "Settings" > "Integrations"
- Click on the name of your app (i.e. "Lorem Ipsum"), then "Settings"
- You should see some custom text