#992 ✓fixreleased
David Enzel

Command to Todoist

Reported by David Enzel | December 10th, 2014 @ 01:21 AM

This is a feature request. I love Mailmate and the new faster version is lightening fast. Thank you. I have started using Todoist to track my things to do. There is a Mac app and I would like to have a command to add a new todo like is available for Omnifocus and other apps. Is this something I can add myself?

Comments and changes to this ticket

  • benny

    benny December 11th, 2014 @ 09:03 AM

    Yes, but there is little documentation on how to do this. You can find existing bundles here:

    MailMate.app/Contents/SharedSupport/Bundles/
    

    You can add your own bundles here:

    ~/Library/Application Support/MailMate/Bundles/
    

    So, based on an existing bundles you could create a new bundle. Things to note:

    • You must replace all UUIDs with new values (you can use the uuidgen commmand for this).
    • Todoist must support adding tasks using AppleScript or some URL scheme.

    I'm not currently adding more bundles to MailMate, because I first need to add a GUI for enabling/disabling bundles, but if you do work on the above and make it work then I would love to include it with MailMate some day in the future.

    You are welcome to ask questions and I'll do what I can to help.

  • benny

    benny December 11th, 2014 @ 09:32 AM

    A quick search reveals that Todoist recently added a URL scheme. This is probably the easiest approach. It's undocumented though (as far as I can see). Apparently something like this should work:

    todoist://addtask?content=...&date=today
    

    See the BusyCal bundle in MailMate for an example of how to use a URL scheme.

  • David Enzel

    David Enzel December 11th, 2014 @ 07:55 PM

    Thank you for taking the time to research Todist. I don't know how to create a bundle -- even one based on the BusyCal bundle. But I can forward an email to Todist and it will show up as a task in Todoist. That will do what I need.

  • benny

    benny December 11th, 2014 @ 07:57 PM

    • State changed from “new” to “accepted”

    But that probably does not include a link which can bring you back to the original email in MailMate?

    I'll mark the ticket as a request and I'll probably return to it at some point in the future.

  • David Enzel

    David Enzel December 11th, 2014 @ 08:08 PM

    You're right. It won't bring me back to the original email in MM. I just see the contents of the email. Thanks for marking it as a request. I have to say I am quite taken with Todoist. It lacks many of the options of Omnifocus but it is beautiful and has enough features for me. And sync is lightening fast. I find Omnifocus slow to sync.

  • benny

    benny December 14th, 2014 @ 02:30 PM

    I've attached an example bundle. Unzip and save it in

    ~/Library/Application Support/MailMate/Bundles/
    

    Then look for Todoist in the Command menu. I've implemented it using the http API for Todoist. This means that you won't get the quick add GUI of Todoist, but it appeared that there was no way to add a note to an item using the URL scheme. It also means you have to find and set your Todoist API token like this:

    defaults write com.freron.MailMate MmTodoistAPIToken -string 1b0bec3...
    

    You find that somewhere in your Todoist web settings.

    Hmm, if links are possible in the note title of a Todoist item then I could use that when a summary of the email is not needed. I'll check that.

  • benny

    benny December 14th, 2014 @ 02:37 PM

    Ok, links and newlines in note titles also work. That means that adding the link in the title might work better. I've attached a variant of the bundle which does this when adding without a summary.

  • David Enzel

    David Enzel December 14th, 2014 @ 03:31 PM

    Thank you so much for creating this. I installed the most recent bundle. Although I have my Todoist API token I don't know where to put it. In any event the Add to Todoist command works but not the add with summary. I have attached a screenshot of two tasks I added using the Add command line.

  • benny

    benny December 14th, 2014 @ 06:40 PM

    I wrote how to set the token:

    defaults write com.freron.MailMate MmTodoistAPIToken -string 1b0bec3...
    

    Replace the incomplete value with your token.

  • David Enzel

    David Enzel December 14th, 2014 @ 11:59 PM

    Hi Benny:

    I saw that but I don't know where to go to find the incomplete value so I can replace it with my token.

    David

  • benny

    benny December 15th, 2014 @ 11:29 AM

    • Title changed from “Command to Todist” to “Command to Todoist”
  • benny

    benny December 15th, 2014 @ 02:26 PM

    Oh, I thought you did have the token (you wrote “Although I have my Todoist API token”). I'll be specific:

    1. Go to http://todoist.com
    2. Click the Gear icon in the upper right of the page.
    3. Click “Todoist Settings”.
    4. Click “Account”.
    5. Copy the value of “API token”.
    6. Write the following line in the Terminal (replace token with the token from todoist):

      defaults write com.freron.MailMate MmTodoistAPIToken -string token
      

    Does that help?

  • David Enzel

    David Enzel December 15th, 2014 @ 03:51 PM

    Thanks Benny. I did not know I had to do it in Terminal. But now I understand. Thank you for your patience.

  • David Enzel

    David Enzel December 16th, 2014 @ 01:27 AM

    Hello again Benny

    I just got back to my Mac and followed your instructions and it worked perfectly. Thank you so much. Your effort was above and beyond the call of duty.

    Best wishes,

    David

  • benny

    benny December 30th, 2014 @ 12:29 PM

    • State changed from “accepted” to “fixcommitted”

    When the 64 bit version of MailMate is released (hopefully in January) then the Todoist bundle is going to be available as an optional bundle in the new Bundles preferences pane. In fact, all current bundles are going to be optional (and downloaded on demand). This also has the advantage that bundles can be updated without updating MailMate itself.

    I've also added the bundle to github, but it's currently identical to the bundle provided as a download in this ticket.

  • benny

    benny March 24th, 2015 @ 12:16 PM

    • State changed from “fixcommitted” to “fixreleased”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Mac OS X email client.

Shared Ticket Bins

People watching this ticket

Attachments

Tags

Pages