timlawson Posted June 27, 2014 Share Posted June 27, 2014 (edited) I still can't get this to work. It opens Omnifocus 2 OK if it is not running but does not create the new action. A pain as I always use Alfred to place new tasks into OF. Edited June 27, 2014 by timlawson Link to comment
timlawson Posted June 27, 2014 Share Posted June 27, 2014 (edited) I still can't get this to work. It opens Omnifocus 2 OK if it is not running but does not create the new action. A pain as I always use Alfred to place new tasks into OF. Fixed in now. My error, script works fine. Thanks. Edited June 27, 2014 by timlawson Link to comment
mattpitts74 Posted July 12, 2014 Share Posted July 12, 2014 Hi there, I have just installed omnifocus 2 and downloaded this workflow and copied the new script into the workflow and its still not working, am I doing something wrong? Can someone post this workflow here? Thanks Link to comment
mattpitts74 Posted July 12, 2014 Share Posted July 12, 2014 sorry, but I'm a complete beginner to using these workflows, I have tried copying and pasting in the scripts in this thread into Dan's original workflow but nothing is working. I would really apprciate it someone could explain step by step to to get this working for omnifocus 2? Thanks Link to comment
cands Posted July 22, 2014 Share Posted July 22, 2014 (edited) This is great, most convenient! It works great for me in OF2 with the code update zagdul provided. (Only thing not working for me is that I when I activate the workflow using a hotkey, the next time I open Alfred the previous calls to the workflow are not available by pressing the Up Arrow, which may be useful if you add several new tasks with similar settings. However, I guess that this is the expected behavior for Alfred and is not related to the workflow. Opening Alfred and typing todo it works of course.) Thanks! Edited July 22, 2014 by cands Link to comment
buzzard Posted August 1, 2014 Share Posted August 1, 2014 I tweaked the original script similar to zagdul above. Here it is: on alfred_script(q) set theName to (q) set isRunning to false tell application "System Events" if exists process "OmniFocus" then set isRunning to true end if end tell if isRunning is false then tell application "OmniFocus" to activate end if tell application "OmniFocus" parse tasks into default document with transport text q end tell end alfred_script Link to comment
thefranster Posted August 7, 2014 Share Posted August 7, 2014 (edited) Anybody know how to add a time to the due date? Edited August 7, 2014 by thefranster Link to comment
hiretic Posted August 20, 2014 Share Posted August 20, 2014 try "todo YourTask #tomorrow at 1.30pm" ... Its worked for me Link to comment
lilliantamayo Posted September 4, 2014 Share Posted September 4, 2014 Fixed in now. My error, script works fine. Thanks. Tim, i still can't get this script to work for me. I have cut and paste the recommended script for this workflow and it does not populate Omnifocus 2. Link to comment
jarhead Posted September 10, 2014 Share Posted September 10, 2014 Tim, i still can't get this script to work for me. I have cut and paste the recommended script for this workflow and it does not populate Omnifocus 2. For those having issues, download this version of the workflow: New OmniFocus Inbox Task.alfredworkflow It is the same version provided by khit but with the modified Applescript provided above. If you still encounter issues, make sure to delete the prior version of the workflow before installing this version. thanasut 1 Link to comment
joost Posted December 3, 2014 Share Posted December 3, 2014 I installed the workflow posted by jarhead above. Using OF 2.04 it parses my text correctly except that the project description the two colons attached upfront. So @myContext::MyProject//MyNote results in a project that is named ::MyProject Any idea how I can lose the colons? BTW, using just one colon parses OK also but still has that colon attached to the Project/Task Name. Link to comment
jonteamere Posted January 28, 2015 Share Posted January 28, 2015 Is there a way to get the task to display in a notification upon entering? I suppose it's not as simple as adding {query} to the notification text box. Link to comment
hwend88 Posted October 2, 2015 Share Posted October 2, 2015 Added some code to the AppleScript and a ‘Post Notification’ step to Dan's great workflow so it now triggers a notification in the Notification Center with the task name that the new OmniFocus task was created. I have set it up with 'command-N' as the Hotkey. You can download the updated workflow here: https://dl.dropboxusercontent.com/u/6967006/New%20OmniFocus%20Inbox%20Task%20with%20Notification.alfredworkflow cands and TimO 2 Link to comment
TimO Posted October 3, 2015 Share Posted October 3, 2015 Added some code to the AppleScript and a ‘Post Notification’ step to Dan's great workflow so it now triggers a notification in the Notification Center with the task name that the new OmniFocus task was created. I have set it up with 'command-N' as the Hotkey. You can download the updated workflow here: https://dl.dropboxusercontent.com/u/6967006/New%20OmniFocus%20Inbox%20Task%20with%20Notification.alfredworkflow Thanks for that :-) Link to comment
kbil4eva Posted January 13, 2016 Share Posted January 13, 2016 Thanks for the updated workflow hwend88. I just discovered something that was not mentioned. If you make sure the Hotkey Trigger argument is set to "Selection in OS X" you can select some text and quickly make a task from it. I added a Prefix of "//", without the double quotes, and I can now move an emailed task to the workflow with ease. Simply highlight the email body, activate via the hotkey and press command+left then command+up and type in the task name plus all the flags. This allows you to created a task in OmniFocus from a long email fairly quickly and get back to Inbox Zero. I'm not sure what the limit is but I just tested it with 50 paragraphs of text from fillertext.com and it worked flawlessly. Now it's GTD time Link to comment
luislee818 Posted April 22, 2016 Share Posted April 22, 2016 I purchased OmniFocus 2 from App Store. Not sure if that's only me, but I have to replace OmniFocus with com.omnigroup.OmniFocus2.MacAppStore in the script in order to make it work. on alfred_script(q) set theName to (q) set isRunning to false tell application "System Events" if exists process "com.omnigroup.OmniFocus2.MacAppStore" then set isRunning to true end if end tell if isRunning is false then tell application "com.omnigroup.OmniFocus2.MacAppStore" to activate end if tell application "com.omnigroup.OmniFocus2.MacAppStore" parse tasks into default document with transport text q end tell end alfred_script I believe you can run the following script in Script Editor to get the application name in your system: get id of application "OmniFocus" Link to comment
bimble Posted June 15, 2016 Share Posted June 15, 2016 I know this is probably just me being daft, but it took me a while to work out why I couldn't get this workflow to create tasks, and thought I'd mention it here in case it helps anyone. These workflows will only work with Omnifocus Pro. I don't have pro, just the standard version, and in console logs, I see this: 15/06/2016 07:41:40.732 Alfred 3[895]: [ERROR] AppleScript Error: { NSAppleScriptErrorAppName = OmniFocus; NSAppleScriptErrorBriefMessage = "Scripting OmniFocus is a Pro feature."; NSAppleScriptErrorMessage = "OmniFocus got an error: Scripting OmniFocus is a Pro feature."; NSAppleScriptErrorNumber = "-1743"; NSAppleScriptErrorRange = "NSRange: {293, 55}"; } So now I just have to work out if I want to spend the extra $40 to upgrade Link to comment
harryhunger Posted January 24, 2017 Share Posted January 24, 2017 Great Workflow. thx. Two Qs: 1) Does anyone know how to extend the script such that it also adds the selected emails to the note/description of the newly created OF description entry? I.e. if I am working through my emails in Apple Mail, I sometimes would love to create OF tasks for certain conversations which contain the full email conversations as url in the description / note of the OF task (such that I can click them easily when working through my OF tasks, instead of searching every again in my email program) 2) Does anyone know how to create a new project on the fly (if not yet existent in OmniFocus)? Currently this workflow only recognises projects that already exist in OF. Thx :-) Kristina Link to comment
boddicker Posted May 7, 2017 Share Posted May 7, 2017 On 10/2/2015 at 4:54 PM, hwend88 said: Added some code to the AppleScript and a ‘Post Notification’ step to Dan's great workflow so it now triggers a notification in the Notification Center with the task name that the new OmniFocus task was created. I have set it up with 'command-N' as the Hotkey. You can download the updated workflow here: https://dl.dropboxusercontent.com/u/6967006/New%20OmniFocus%20Inbox%20Task%20with%20Notification.alfredworkflow Is there a new link? That link appears to be dead. Looks like a great workflow! thanasut 1 Link to comment
pnodseth Posted June 14, 2017 Share Posted June 14, 2017 Hi! I've downloaded this, and I have a slight problem. When adding a task, I am not able to select/add project or context. when typing @ or :: and start typing the name of a project or context, nothing happens. If I just type ::Testproject and action it, the task is saved without a project. I am running Omnifocus 2.9.1. I tried using the debugger, but it didn't show any errors. Does anybody have a clue what might be wrong? Thanks! Link to comment
Ehler Posted September 18, 2017 Share Posted September 18, 2017 Sorry to necro, does anyone have a link to this still? thanasut 1 Link to comment
zagdul Posted October 5, 2017 Share Posted October 5, 2017 so, for some reason, this did not do anything, or caused this error: Quote [2017-10-05 13:55:44][ERROR: action.applescript] { NSAppleScriptErrorBriefMessage = "Expected end of line but found identifier."; NSAppleScriptErrorMessage = "Expected end of line but found identifier."; NSAppleScriptErrorNumber = "-2741"; NSAppleScriptErrorRange = "NSRange: {380, 5}"; } I found, that the error does not occur, if you run the script as standard osascript, not as NSAppleScript I changed the script as follows: set q to "{query}" set theName to (q) set isRunning to false tell application "System Events" if exists process "OmniFocus" then set isRunning to true end if end tell if isRunning is false then tell application "OmniFocus" to activate end if tell application "OmniFocus" tell default document parse tasks into it with transport text (q) end tell end tell the corresponding action is "Script", Language "osascript (AS)" with input as "{query}" Link to comment
thanasut Posted November 27, 2017 Share Posted November 27, 2017 (edited) The latest working link: http://cl.ly/XTZQ Thank you @jarhead Edited November 27, 2017 by thanasut Got the new link. Link to comment
Ehler Posted September 18, 2018 Share Posted September 18, 2018 On 6/21/2013 at 1:53 PM, khit said: 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 So I'm still using this workflow 5 years later and it rocks… any way to update it to work with tags? Link to comment
dfay Posted September 18, 2018 Share Posted September 18, 2018 Not until OF3 ships. I poked around in the SQL and the tag data isn’t being synced to OF2 even though it’s obviously there in the cloud. Until we can read the SQL there’s no way to tell what to look for. cands and Ehler 1 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now