Jump to content
incott

2Do workflow

Recommended Posts

Hi. Im starting to use Alfred and I'm loving it.

 

Couldn't find a workflow for 2Do task manager. Anyone thinking about it?

 

Thanks in advance.

Share this post


Link to post

Hi. Im starting to use Alfred and I'm loving it.

 

Couldn't find a workflow for 2Do task manager. Anyone thinking about it?

 

Thanks in advance.

 

I would love it too

Share this post


Link to post

The problem is that 2Do has no good hooks to use, or AppleScript support (though the dev does say this is coming). However, there is URL Scheme support that allows for some interaction with other apps.

 

I've created a very limited workflow that uses the URL Scheme to create a task. It's far from ideal, and someone with more experience and time would be able to come up with something far more powerful, but it works for me. To create a task, type "todo" followed by the title of the task, then (optionally) a list title prefixed by a ":".

 

Screen%20Shot%202014-02-04%20at%209.16.0

 

Download here.

Share this post


Link to post

The problem is that 2Do has no good hooks to use, or AppleScript support (though the dev does say this is coming). However, there is URL Scheme support that allows for some interaction with other apps.

 

I've created a very limited workflow that uses the URL Scheme to create a task. It's far from ideal, and someone with more experience and time would be able to come up with something far more powerful, but it works for me. To create a task, type "todo" followed by the title of the task, then (optionally) a list title prefixed by a ":".

 

Screen%20Shot%202014-02-04%20at%209.16.0

 

Download here.

 

Thanks a lot!

 

It's not perfect but it suits my needs. I'll contact the developers for better AppleScript support for example: if they have some requests they will have to consider it.

 

Again, thanks for sharing your workflow

Share this post


Link to post

I found a really cool way to get 2do to play ball with alfred: Register a custom URL! The following one just searches 2do for tasks. Drop the following line in your browsers' url bar to do that.

 

alfred://customsearch/Search%202Do%20for%20%7Bquery%7D/2do/utf8/noplus/twodo%3A%2F%2Fx-callback-url%2Fsearch%3Ftext%3D%7Bquery%7D

 

Theoretically there should be more ways to interact according to the "api":

http://2doapp.com/kb/article/url-scheme-supported-by-2do-for-apps-like-launch-center-pro.html

 

But I couldn't get the other calls to work.

Edited by godot

Share this post


Link to post

Clever!

I just need one to add tasks; that's all. 

It sucks that there's no way currently. 

 

Also, it sucks that i can't even do a search for 2do in the alfred forums because it won't allow searches of less than four characters. 

Share this post


Link to post

I found a really cool way to get 2do to play ball with alfred: Register a custom URL! The following one just searches 2do for tasks. Drop the following line in your browsers' url bar to do that.

 

alfred://customsearch/Search%202Do%20for%20%7Bquery%7D/2do/utf8/noplus/twodo%3A%2F%2Fx-callback-url%2Fsearch%3Ftext%3D%7Bquery%7D

 

I would love to get this to work, but I must be misunderstanding your instruction. Pasting that string into my browser returns a top search engine result to this thread.

 

On the other hand, pasting the string into Alfred's quick entry pane imports a custom search under "Web Search" in Alfred's preference panel with a keyword of "2do", but when I invoke Alfred, type that keyword and enter a search term, Alfred prompts for a target application, and 2Do.app is greyed out. 

 

What am I missing?

 

jYxUOsZ.png

 

8fRHLnu.png

 

4HzLxlW.png

 

UdWFmSb.png

 

ZhwsllF.png

 

lYemFs1.png

 

vjG9jND.png

Share this post


Link to post

Thank you, deanishe.

 

That cleared things right up. Now I can make search global (and not list-specific) by default.

Edited by imurban

Share this post


Link to post

Not being able to create tasks in 2Do using the workflow generously created and posted by @Caleb G finally drove me crazy enough to hunt down fix.

 

What I found is that, in 2Do 2.x and above, the URL scheme has changed.  Updating the original workflow is trivial and and has allowed me to once again create tasks from Alfred.

 

I did a 2 minute video showing the steps which is available here: https://vimeo.com/167191672

 

If you are following along, the line you want to copy and paste is: 

twodo://x-callback-url/add?task=

Retrieved from the documentation here: http://2doapp.com/kb/article/url-scheme-supported-by-2do-for-apps-like-launch-center-pro.html

 

 

Share this post


Link to post

@Meglorin you are brilliant. 

And, I must say, a BRILLIANT voiceover artist. Superbly done. 

 

One thing; I'm wondering whether it's possible to get Alfred 3 to pop up a list of the potential Lists it could go into; I forget the names of my lists and it's a pain to type them. I'd sooner type in "keyword title" for a to do in the HOME list and "secondkeyword title" for a list of the lists that I could press return to pop it into. 

Share this post


Link to post

@bongobong - I apologize for not getting back to you.  I must not have followed this thread to get email updates.

 

Looking at the available URL schemes, there doesn't appear to be a way to query your available lists.  I use the GTD feature in 2Do and just dump everything into the Inbox for sorting during the "organize" step of the GTD process.

Share this post


Link to post

WELL this is pretty cool. Latest version seems to have loads of options. Unfortunately, I lack entirely the skills to be able to utilise them. 

 

Quote

v2.2.2 highlights:

[NEW] 

* Support for Mac OS 10.12 (Sierra)

* The CMD+V (Paste) keyboard shortcut can be used on the task list to turn your clipboard contents into tasks. Each line of text copied will turn into a separate task. Works on both iPads and iPhones.
Tip 1: Pasting when inside a Project / Checklist will add pasted tasks as sub-tasks.
Tip 2: Pasting a nested list (using either a tab character or 4 spaces or more) will automatically turn it into a project with sub-tasks (provided you’re not in project view). E.g.:

This will become a project
containing a subtask
and another one
While this will become a normal task

[AUTOMATION]

This version gives you more control over your stuff with new URL schemes. 

1. Launch 2Do with a search keyword without having to create and save multiple smart lists for occasional searches
twodo://x-callback-url/search?text=[some URL search text here]

2. Paste text directly into 2Do from your favourite automation app:

twodo://x-callback-url/paste?text=[some URL encoded text to convert into tasks]&inProject=[Title of project to paste into]&forList=


Supply a URL encoded string as text and automate the process of moving stuff into 2Do!

3. Five new parameters supported by twodo://x-callback-url/add

- forParentTask: Supply the parent task’s unique identifier

- picture: Provide a base64 encoded string, 2Do will convert it into an image and use that as the attachment.

- audio: Provide a base64 encoded audio attachment

- locations: Provide a comma separated list of locations

- saveInClipboard: Can be 0 or 1. The newly added task’s unique identifier is saved into the clipboard for easier retrieval

4. You can now obtain the internal unique identifier of a task. This can be used in conjunction with other supported URL schemes to create sub-tasks:
twodo://x-callback-url/getTaskID?task=[known task’s title]&forList=[Containing List name]&saveInClipboard=[prompt-num:Save UID in Clipboard]

Read more: 2doapp.com/kb/article/url-schemes.html

 

Share this post


Link to post

Guys, this script stopped working for me a while ago; I'm wondering whether any of you can help it get working again. Is it working for you with the updated 2do? 

 

Also, there appear to be a number of x-callback options now which I don't really know how to use at all! 

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...