Mac|Life

Save web receipts to iCloud

Keep track of your online orders across all of your Apple devices

- Nik Rawlinson

REQUIRES > OS X 10.10 or higher

LEVEL > Medium

IT WILL TAKE > 20 minutes

The PDF pop-up menu in OS X’s Print dialog provides you with a way to save a PDF of a web page, an email or any other printable document to a dedicated Web Receipts folder.

The trouble with this is that it gives you no control over the location of the Web Receipts folder, which is automatica­lly placed within Documents in your user account, out of reach of your iOS devices and, typically, of your other Macs, too.

So we’re going to create a new tool from scratch, which will appear as a new command in the Print dialog’s PDF menu. This route gives you full control over how your saved PDFs are named and where they are saved. For example, you may want to create separate commands that save your business and personal receipts in different folders, using this guide as a basis.

We’ll do this using an Automator workflow, specifical­ly in the app’s Print Plugin template. Of course, you can use this to process many more things than just web receipts – you could adapt the technique shown here to save any other kind of printable document, encrypt your PDF file, email it, and so on.

introducin­g automator

Technicall­y, working with Automator is programmin­g – just not in the traditiona­l sense of writing code. While Apple has a dedicated method for writing apps for iOS and OS X, called Xcode, Automator is its programmin­g tool for the rest of us. Think of it like building up LEGO from instructio­ns, putting pre-made pieces into the right place in the right way, with each brick providing an important function to ensure that the overall shape is correct.

Like a LEGO build, though, get one action wrong and the whole workflow will fail to produce your intended result. Think of each action as a macro, just like the step-by-step routines you

may have used to accomplish the same task on multiple occasions in Photoshop or Word.

Automator workflows are smarter than regular macros, as they’re not restricted to running inside particular apps. Although we’ll build one that processes output from OS X’s printing system, turning it into a PDF and then performing additional tasks on the resultant file, you can also create workflows that act like a standalone app, or that keep an eye on a particular folder and perform actions on any files dropped into it.

Workflows can also process images imported from a camera using the Image Capture utility, perform a task when you give a particular instructio­n to OS X’s dictation system, or run when a calendar event’s alarm goes off.

Apple has already done a lot of the hard work for you by providing a library of useful actions. Each one calls upon the services of an app, such as Finder, Calendar or Mail, to give you direct access to its core features, such as renaming a file, setting up an event, or sending a new message.

Each action in your workflow takes some input – which could be a web address, a name or, in our case, a PDF of a receipt you’ve received – performs some actions on it, and then either gives you the result or passes it to the next action in the chain for further work.

When creating an original workflow, you pick the actions that will accomplish your overall task and add them to a workflow in the appropriat­e order. You can have as many actions as you like, but each must understand the output of the preceding one. For example, you couldn’t get an event from your calendar in one action and perform color correction on it in the next, as there’d be no colors to work with. Automator will alert you when this sort of error occurs, though.

In the six steps that follow we’re going to create a Print Plugin workflow that’s accessed when you choose File > Print or press ç+p. It will use the message that’s selected in Mail or the web page displayed in the browser as its input, but, rather than sending it straight to the printer, it’ll first convert it into a PDF, give it a unique name so it doesn’t overwrite any other stored documents, and put it on iCloud Drive for safekeepin­g.

Our workflow doesn’t need any third‑party actions, only those provided with Yosemite and El Capitan. These systems are required to access iCloud Drive; if you’re running an earlier version of OS X, you could amend the closing steps to save the file to a folder that syncs with a service such as Dropbox or OneDrive, or to a NAS (network attached storage) drive in your home or office.

 ??  ??
 ??  ??

Newspapers in English

Newspapers from Australia