Skip to content

Jim Christian

Thoughts on tech, tools, and life.

Menu
  • Home
  • About
  • Newsletter
  • Code
  • Notion
Menu

Quick PDFPen to Email Automation with Google Drive and Hazel

Posted on April 9, 2014 by Jim

Here’s a quick and dirty bit of automation that I put together today that emails annotated PDFs from PDFPen via Google Drive with Hazel (It’s not that PDFPen can’t email files itself, it’s that there are some issues with my recipient on the other end of the email).

Once a week I go through all the purchase orders I’ve been emailed so I can authorise and send them back to my colleague in Finance. Ideally, I’d like to do this solely from my iPad, as all each PO needs is for me to write the category it comes out of and add signature.

PDFPen by a Smile Software is ideal for this. I load each attached PO into my PDFPen documents then delete the original emails. Then, in PDFPen, I write the code and load in my signature from Photo Stream (extra tip – I keep a separate Photo Stream album called ‘Essentials’ that contains my signature, company logo, iPad wallpaper etc. Things I frequently need  access to across all my devices.). Once I’m finished, I send it to my colleague by email.

 

Therein lies the problem. For some reason, the way iOS sends PDFs seriously doesn’t jive with how they are read in Outlook 2010 on her PC.

03

 

So I’ve tried to get around it my emailing the file to myself on my Mac and then forwarding it back on to her from Apple Mail. By the time all that is done, it’d be quicker to print it, sign it and walk it to her mail tray.

So I started thinking about other ways to automate it. PDFPen has other share options, including to Dropbox and Google Drive. I use Dropbox a lot for personal things but we use Google Apps at work, so I opted for sharing it to a specific folder in my Google Drive.

04

I still wasn’t satisfied with this as the goal is to get the file to my colleague via email as I didn’t want to add more steps to her workload by asking her to log onto Drive just to get any authorised POs I might have sent her. There must be a way of automating it further.

Hazel and watchfolders sprang to mind, and after some Googling around I found this bit of AppleScript that will send an attached file.

==================
set theAttachment1 to (POSIX path of theFile)
set subject_ to "Authorised PO"
set the_content to "Incoming automated message from Jim - authorised PO attached."
tell application "Mail"
    set newMessage to make new outgoing message with properties {subject:subject_, content:the_content & return & return}
    tell newMessage
        set visible to false
        set sender to "my.email@website.com"
        make new to recipient at end of to recipients with properties {address:"recipient.email@website.com"}
        make new attachment with properties {file name:theAttachment1} at after the last paragraph
        
        (* change save to send to send*)
        send --<<<<---------------- change save to send to send or send to save to save to drafts
        (* change save to send to send*)
    end tell
end tell
==================

05

So now, once I’ve finished my work on the purchase order, I share it to a watch folder in Google Drive, which Hazel then sends on on my behalf then files the PDF away into a subfolder.


Resources

  • PDFPen by Smile Software
  • Google Drive
  • Hazel by Noodlesoft

Post navigation

← Winnie the Pooh as Darth Vader
Automating iOS: A Comprehensive Guide to Launch Center Pro →

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Looking for my Prompting Frameworks? They've moved!

April 2014
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
282930  
« Mar   May »
  • Building an AI-Powered WordPress Publishing Pipeline with Claude Code
  • From Remote Access to Agentic OS: Two Weeks with Claude Code
  • This Apple Ad Genuinely Makes Me Smile
  • Updating my Claude setup to support remote work
  • Behind the Screens: Optimising My Newsletter With AI
  • December 2025
  • November 2025
  • August 2025
  • July 2025
  • May 2025
  • April 2025
  • February 2025
  • January 2025
  • December 2024
  • June 2024
  • May 2018
  • March 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • July 2017
  • May 2017
  • March 2017
  • December 2015
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • April 2013
  • January 2013
  • June 2012
  • April 2012
  • March 2012
  • January 2012
  • December 2011
  • February 2011
  • November 2010
  • July 2009
  • January 2008

AI AI writing animation apple automation bbc books Claude claude code coding content creation course creation education Estonia Gaming imovie Informatic AI ios iPad ipados launch center pro lecture london mac mcedit MCP microbit minecraft newsletter obsidian os x productivity raspberry pi restrictions scifi software bugs star wars streaming setup​​​​​​​​​​​​​​​​ subscription software tech technology textexpander URL schemes valencia wordpress

  • Bluesky
  • Facebook
  • GitHub
  • Instagram
  • LinkedIn
  • Mail
  • Mastodon
  • Medium
  • YouTube
  • X
Jim Christian
© 2025 Jim Christian | Powered by Minimalist Blog WordPress Theme