My iOS receipt scanning workflow

Ben - Mon 18 February 2013 - urlscheme, hazel, iOS, dropbox, workflow

I have been intrigued by the rise in iOS workflows with URL schemes. This has been boasted by the launch of Drafts 2.5 with it's custom URL actions and people like Federico Viticci showing off the power of them.

Being inspired by that, I've finally nailed the final piece of my iOS receipt workflow. File naming with TextExpander. I use David Sparks' Paperless Dropbox action folder idea, to automatically file my receipts away based on the file name. But I have not found a way to rename pdf's using a TextExpander snippet on iOS. You can't even do it in PDFPen for iPhone.

Scanning Receipts

I use Scanner Pro to scan my receipts on the road. I haven't tried many other scanning apps but Scanner Pro seems to work well. It does a good job of capturing and automatically finding the edges of the receipt, and will upload straight to Dropbox or [insert any other popular web service].

Setting up ScannerPro

The only real setup here is to configure the auto upload to Dropbox. Under settings you can link your Dropbox account and set it to auto upload. You can also choose which folder it uploads to.

A TextExpander snippet on your Clipboard using Launch Center Pro, and Drafts

My goal was to use these tools to some how get the result of a TextExpander snippet on to my clipboard and launch me back to ScannerPro. This is so I can enter the receipt file name before it uploads to Dropbox.

Setting up Drafts

First you need to setup Drafts to accept actions to be triggered via URL. Open up Drafts settings page and scroll down to "URL Security". You will need to change Allow URLs to trigger actions? to On for this to work.

Now scroll back up to the top, select Manage Actions and find the Copy to Clipboard action. Make sure it is Active and under Advanced, change After Success to Delete (this is optional but I do not want to store the snippets once I've copied them).

Setting up Launch Center Pro

Launch Center Pro supports TextExpander snippets straight out of the box in its input prompt. So my plan was to:

  • Launch a new prompt in Launch Center Pro
  • Type in a TextExpander snippet
  • The snippet expands
  • Edit the snippet in the prompt window if needs be
  • Though Drafts x-callback-url support, send the completed snippet to Drafts
  • Copy the snippet to the clipboard
  • Delete it from Draft and launch me back to ScannerPro

And it worked!

To add a new action to Launch Center Pro, hit the edit pencil button in the top right, select an empty square and choose Action. Now select Custom URL from the menu and you will be brought to the composer window. Give the action a name (mine is called "TE to ScannerPro") and use the following for the URL.


All this does, is it takes the text from the prompt window, calls the "Copy to Clipboard" action and opens ScannerPro on successful completion.

Putting it all together

Now the actions are setup, all I need to do now is open up ScannerPro and snap a photo of my receipt. Make any adjustments to the image like rotate or contrast and then save. When you hit the back button to the Documents you will be prompted to enter a filename. This is where the magic starts. Exit to the home screen and open Launch Center Pro. Select our TE To Scanner Pro action, type your snippet and when you are done, hit Go. After Drafts has done it's thing, it will throw you back to ScannerPro. You can now paste the snippet from your clipboard into the text box. Select 'Done' and your nicely named pdf receipt scan is being sent off to Dropbox in the background.

Dropbox, Hazel and Filing

I won't spend much time on this as most of these ideas came from David Sparks' Paperless book and you should buy that instead!

But the basic concept is that my receipt scan gets uploaded to a folder in Dropbox. My Mac running Hazel watches that folder for pdf's with a certain name e.g "freelance expense". Once it has found a match, it will move it to my freelance receipt folder and filed under the year it was created. I also got hazel to add a red label to it. This is so I know I need to process it into my accounting software.