Jump to content


Photo

Create new task in OmniFocus inbox

OmniFocus Tasks

  • Please log in to reply
34 replies to this topic

#1 CapnAverage

CapnAverage

    Newbie

  • Member
  • Pip
  • 5 posts
  • LocationLondon, UK

Posted 16 March 2013 - 09:27 PM

Hey everyone!
 
Just dipping my toe into the proverbial waters of Alfred 2 workflows, and managed to come up with this workflow.
 New%20OF%20Task.png
It creates a new named task in your OmniFocus inbox – it checks if OmniFocus is open and, if it's not, opens it so you don't have to.
 
It's not particularly complicated or elegant, but I hope it's useful to a couple of you out there!

 

DOWNLOAD: New OmniFocus Inbox Task Workflow


  • drking, telonaes and binaryanomaly like this

#2 cmsj

cmsj

    Newbie

  • Member
  • Pip
  • 11 posts

Posted 16 March 2013 - 09:31 PM

Love it, thanks!



#3 Ryan M

Ryan M

    Member

  • Member
  • PipPip
  • 23 posts

Posted 17 March 2013 - 03:14 AM

Love this script! I have one power user suggestion. If you use the following Applescript, you can do more than just add items to your inbox:

 

on alfred_script(q)
tell application "OmniFocus"
	tell default document
		parse tasks with transport text q
	end tell
end tell
end alfred_script

 

This will allow you to add items using the following syntax:

 

Action! @Context ::Project #Start #Due $Duration //Note


  • drking likes this

#4 orky

orky

    Newbie

  • Member
  • Pip
  • 1 posts
  • LocationVienna, Austria

Posted 17 March 2013 - 12:09 PM

This is great! I was looking for an OmniFocus workflow this morning. I found another one but that always opened the OmniFocus Quick Entry window after I executed the alfred search. This is much smoother. Also, I added the lines Ryan M is talking about and changed the Subtext of the Keyword Search to "Action! @Context ::Project #Start #Due $Duration //Note". That way, I always see what I have to type if I want to further define its context or project.

 

Grab the updated Workflow here.


  • drking and telonaes like this

#5 CapnAverage

CapnAverage

    Newbie

  • Member
  • Pip
  • 5 posts
  • LocationLondon, UK

Posted 17 March 2013 - 04:38 PM

Great stuff, chaps – thanks for making it much more awesome than I was able to!  :D



#6 ripvega

ripvega

    Newbie

  • Member
  • Pip
  • 5 posts

Posted 18 March 2013 - 10:41 AM

Well done. This is excellent and thanks for posting it.



#7 mlondon

mlondon

    Newbie

  • Member
  • Pip
  • 2 posts

Posted 19 March 2013 - 01:32 AM

Thanks for this. Hugely helpful.
 
A few clarifications/changes. 
 
The "!" syntax is actually used for Flagging an Action.
So if you just enter text as in "todo myaction" it will NOT be flagged
But if you enter "todo myaction!" it will be flagged.
 
Also, using one instance of # will create a DUE date, while two instances will create a START DATE and then a DUE Date
So "myaction #today" creates a due date of today
But "myaction #today #tomorrow" creates a start date of today and a due date of tomorrow.
 
For clarity, I changed my subtext to:
Flag! @Context ::Project #Due (#Start #Due) $Duration //Note
 
Can someone point me to documentation which shows the complete lists of available syntaxs for OF? I searched on the Omni website, but could not find.



#8 piratx

piratx

    Newbie

  • Member
  • Pip
  • 3 posts
  • LocationGreece

Posted 19 March 2013 - 01:51 AM

Great! Thank you!


Greek iPhone

Tweet @piratxmac


#9 hubutz

hubutz

    Newbie

  • Member
  • Pip
  • 14 posts

Posted 21 March 2013 - 07:08 PM

Thanks for this. Hugely helpful.
 
A few clarifications/changes. 
 
The "!" syntax is actually used for Flagging an Action.
So if you just enter text as in "todo myaction" it will NOT be flagged
But if you enter "todo myaction!" it will be flagged.
 
Also, using one instance of # will create a DUE date, while two instances will create a START DATE and then a DUE Date
So "myaction #today" creates a due date of today
But "myaction #today #tomorrow" creates a start date of today and a due date of tomorrow.
 
For clarity, I changed my subtext to:
Flag! @Context ::Project #Due (#Start #Due) $Duration //Note
 
Can someone point me to documentation which shows the complete lists of available syntaxs for OF? I searched on the Omni website, but could not find.

 

Dunno if I'm doing something wrong, but "todo test!! only creates an unflagged task "test!" at my side, same with "todo test #today #tommorrow", this just creates the task test #today #tommorrow. 

 

I'm using the downloadable script from above and have a supporter licences. Dunno if i have to change something on my settings? Thanks for help :)

 

cheers



#10 jrsinclair

jrsinclair

    Newbie

  • Member
  • Pip
  • 2 posts

Posted 21 March 2013 - 11:26 PM

This is fantastic. Thank you.



#11 rdg

rdg

    Newbie

  • Member
  • Pip
  • 8 posts

Posted 22 March 2013 - 01:07 AM

I've made an addition to the script, to launch Omnifocus first, just in case it's not running; I was getting a hang on OF if I used my workflow without doing that:

 

on alfred_script(q)
	tell application "OmniFocus"
		launch
	end tell
	
	tell application "OmniFocus"
		tell default document
			parse tasks with transport text q
		end tell
	end tell
end alfred_script


#12 kfergthegreat

kfergthegreat

    Newbie

  • Member
  • Pip
  • 4 posts

Posted 06 May 2013 - 03:56 PM

Love this script! I have one power user suggestion. If you use the following Applescript, you can do more than just add items to your inbox:

 

on alfred_script(q)
tell application "OmniFocus"
	tell default document
		parse tasks with transport text q
	end tell
end tell
end alfred_script

 

This will allow you to add items using the following syntax:

 

Action! @Context ::Project #Start #Due $Duration //Note

where do you put this in the script to get it to work?



#13 rdg

rdg

    Newbie

  • Member
  • Pip
  • 8 posts

Posted 08 May 2013 - 06:18 PM

That's the entire script... Are you asking where in the workflow do you go to replace the original scrip with that one? That would be in the "Run NSApplescript" object of the workflow. Just double-click it, and the script window will appear.



#14 khit

khit

    Newbie

  • Member
  • Pip
  • 3 posts

Posted 21 June 2013 - 06:53 PM

Beautiful! Adding the natural language parsing makes this so much smoother than Quick Entry (and looks better!). (Hoping Omnigroup keeps this Applescript exposed in 2.0...) 

 

I added a Hotkey Trigger ("box") to the workflow so that I could access it via keyboard shortcut without even having to invoke Alfred. That also allows us to set the Argument field to "Selection in OS X". This pulls in any text you have selected before invoking the hotkey!

 

Here's the workflow with that modification: New Omnifocus Inbox Task

(Alfred imports Hotkey Triggers, but strips out the hotkey assignments, so you'll need to double click the hotkey step/box and press your desired hotkey. I used ⇧⌃A which works well for the scheme _mk_ recommends for his OF Task Actions workflow.)

 

Thanks everyone for your contributions to this workflow!

 

UPDATE 2013-06-21: fixed broken download link


Edited by khit, 21 June 2013 - 10:11 PM.


#15 mitchellm

mitchellm

    Newbie

  • Member
  • Pip
  • 10 posts

Posted 21 June 2013 - 09:44 PM

@khit: Can not download your modification. Droplr says there is no linked item. 



#16 khit

khit

    Newbie

  • Member
  • Pip
  • 3 posts

Posted 21 June 2013 - 10:12 PM

@mitchellm, thanks for letting me know about the dead link. not sure what went wrong but I reuploaded and have updated in my original post.



#17 mitchellm

mitchellm

    Newbie

  • Member
  • Pip
  • 10 posts

Posted 21 June 2013 - 11:10 PM

Many thanks!



#18 nick

nick

    Member

  • Member
  • PipPip
  • 28 posts

Posted 24 June 2013 - 07:35 PM

Hiya,

 

I am a huge fan of Alfred and Omnifocus.

 

I recently came across a natural language processing Alfred workflow for creating new tasks.

 

It's amazing.

 

Check it out:

 

http://www.dirtdon.com/?p=963

 

The creator is hoping someone will fork it in GitHub and pick it up from there. I've installed it and it's great but it could definitely use a community like the folks here to work on it.

 

I'm not a coder but I think it's only 500 lines of code and the guy who wrote it is fairly well known. I don't know him but I know his name from posts on Mashable and Macstories. 

 

It's not a simple Alfred workflow to install but if you follow the steps it's easy enough to do it. It could use packaging.

 

I'm happy to help anyone who needs I thought I would share this with the folks here.

 

Enjoy. :)



#19 binaryanomaly

binaryanomaly

    Newbie

  • Member
  • Pip
  • 4 posts

Posted 01 January 2014 - 12:44 AM

Nice workflow, thx guys!



#20 Mafamaticks

Mafamaticks

    Newbie

  • Member
  • Pip
  • 6 posts

Posted 28 April 2014 - 12:31 PM

Has anyone tried using this with the Omnifocus 2 beta? I love the simplicity of this workflow.

 

 

This is what I get when I try to run it.

[ERROR: alfred.workflow.action.applescript] {

    NSAppleScriptErrorBriefMessage = "Expected end of line but found plural class name.";

    NSAppleScriptErrorMessage = "Expected end of line but found plural class name.";

    NSAppleScriptErrorNumber = "-2741";

    NSAppleScriptErrorRange = "NSRange: {278, 5}";

}

 

 

It opens OF when it's not open but it doesn't add the task.


Edited by Mafamaticks, 28 April 2014 - 12:45 PM.

  • metaedge likes this



Also tagged with one or more of these keywords: OmniFocus, Tasks

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users