View Single Post
I'm glad you found it helpful.

I've changed things up yet again, due to a few shortcomings of the previous system. For starters, I don't use Mail.app. It was a PITA for me to get things into Omnifocus by way of Mail when I had no other reason to ever open it other than Omnifocus. I had it set to run every AM before I woke up (after setting mute so as not to awaken me with any new message sounds, although there is also a pref setting for this in the app). But it really bothered me that my voice-tasks didn't show up for up to 24 hours if Mail wasn't running.

Further, if I was AFK all day, added a voice task in the AM, and checked Omnifocus for iPhone later in the day, those tasks wouldn't appear yet.

On top of it all, if the transcript was unusable, it didn't include the audio file in the attachment (just a link to the Mail.app message). Totally unusable for iPhone, and even on my Macbook it required cranking up Mail.app.

Trying to come up with a way to improve this mess has been on my mind for a while. My main requirements for voice->OFocus still include
  1. Transcription
  2. No need to look at phone (or take out of pocket)
So that means I probably need to stick with a free phone-based solution (GVoice, reQall) so that I can use the iPhone's voice commands through the headset. That seemed to be the most limiting part; tons of 3rd party apps have great features, but not a whole lot of them have a free phone in option.

Anyway, this morning I realized that a possible solution was Dropbox + Folder actions. Sure enough, the basic setup that is now working (great) for me uses this flow:

*Call GVoice or reQall
*Message is transcribed and emailed to me
*GMail filter grabs those messages and forwards to my SendtoDropbox account, which is set to turn emails to plaintext
*Files are downloaded to my local DBox folder
*Folder action (below) processes everything

Limitations:
--While reQall conveniently includes a .wav copy and an .ics of any due dates, these filenames don't have any timestamp or anything to keep them from getting overwritten by subsequent messages if multiple get processed at once (if my Macbook was asleep, for example)
--For this reason, I suspect I may use GVoice more frequently, as the filenames contain a datestamp. While it doesn't include the .wav, it gives you a URL that links you to the message in your browser (no need to crank up Mail.app, and this will keep sync times faster). I will note that this URL has been a little hit and miss for me, not sure why.
--In order to keep compatibility with both reQall and GVoice (and avoid some processing that I'm too burnt out to mess with right now), the task title is simply set to the filename, with the transcription in the note. This means that the task titles are pretty useless
--Files other than .txt (such as the reQall .wav files) are simply thrown into Omnifocus as separate tasks. But at least they'll be there (since the script activates Omnifocus, it should upload them so they'll be in your database on all your devices).

Okay, the GMail filter. Note that to register your SendToDropbox email as a forwarding address you'll have to configure SendToDropbox to turn emails into .txt files, possibly "resend" the Gmail verification, and grap the verification number from the .txt file.
Code:
Matches: ((from:voice-noreply@google.com, subject:"New voicemail from [Me]") OR (from:post@reqall.com, subject:added:, has:attachment))
Do this: Skip Inbox, Mark as read, Apply label "GVoice", Forward to [mysendtodropboxemail@sendtodropbox.com]
The Folder Action. I'm a complete Applescript novice, so this may seem pretty sloppy, but it seems to work. Parts of it were borrowed from a script somewhere else on the forum. And note that I have it set to trash the files once processed.
Code:
on adding folder items to this_folder after receiving added_items
	
	repeat with item_ in added_items
		
		tell application "Finder"
			set file_name to (name of item_)
-- I have no use for the reQall .ics files, so I just trash them.  If you want 
-- them, keep them.
			if file_name is "reQall.ics" then
				move item_ to trash
			else
				if name extension of item_ is "txt" then
					set body to read alias (item_ as string)
					tell application "OmniFocus"
						tell default document
							set NewTask to make new inbox task with properties {name:file_name, note:body}
							activate
						end tell
					end tell
					move item_ to trash
				end if
				
				if name extension of item_ is not "txt" then
					tell application "OmniFocus"
						tell default document
							set NewTask to make new inbox task with properties {name:file_name}
							tell the note of NewTask
								make new file attachment with properties {file name:item_, embedded:true}
							end tell
							activate
						end tell
					end tell
					move item_ to trash
				end if
			end if
		end tell
	end repeat
end adding folder items to
So while far from perfect, this flow gives me voice-to-omnifocus, tasks appear in Omnifocus within a few minutes, and I never have to mess with Mail.app.

As an additional perk, I can email files directly to Omnifocus with the same script by sending them directly to my SendToDropbox address.

Last edited by n8henrie; 2011-02-21 at 03:41 PM..