Give it an app name and leave the service url blank.
Under the "Test token" section, press "Create test token". This will make it so that events from your Todoist account will send a webhook.
Under the "Webhook" section, set the Webhook Callback URL to your Netlify site URL with the path /.netlify/functions/redeemer. For example, if your Netlify URL is somerandomvalue.netlify.app, then the URL you should put should be https://somerandomvalue.netlify.app/.netlify/functions/redeemer.
For watched events, check item:completed and item:uncompleted.
Save your Todoist app configuration.
Usage
In Todoist, mark an item as completed.
In Habitica, you should see an item has been added in your ToDos as completed. You may need to change your filter to show completed ToDos.
Debugging issues
In Netlify's site dashboard, go to the Functions tab and click on the redeemer function.
This will show the logs for that function.
Mark an item as completed in Todoist and view the logs in Netlify.
Limitations
Currently does not verify Todoist's webhook signature so there is a risk of someone sending similar data to your endpoint.
Accidentally marking something and unmarking it does not undo the task in Habitica. It will need to be unchecked manually.
Task difficulty is set to Easy and cannot be changed unless you change it in the code directly.
Currently does not check who completes the task or who is assigned in Todoist, so if you are using this in a shared project it might add all tasks to your Habitica account.