Skip to content

Commit

Permalink
add MailSpy automator workflow!
Browse files Browse the repository at this point in the history
  • Loading branch information
core-code committed Jul 4, 2018
1 parent add0d03 commit 132e3e4
Show file tree
Hide file tree
Showing 3 changed files with 272 additions and 0 deletions.
23 changes: 23 additions & 0 deletions MailSpy/Automator/Send To MailSpy.workflow/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSServices</key>
<array>
<dict>
<key>NSMenuItem</key>
<dict>
<key>default</key>
<string>Send To MailSpy</string>
</dict>
<key>NSMessage</key>
<string>runWorkflowAsService</string>
<key>NSRequiredContext</key>
<dict>
<key>NSApplicationIdentifier</key>
<string>com.apple.mail</string>
</dict>
</dict>
</array>
</dict>
</plist>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
249 changes: 249 additions & 0 deletions MailSpy/Automator/Send To MailSpy.workflow/Contents/document.wflow
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AMApplicationBuild</key>
<string>444.7</string>
<key>AMApplicationVersion</key>
<string>2.8</string>
<key>AMDocumentVersion</key>
<string>2</string>
<key>actions</key>
<array>
<dict>
<key>action</key>
<dict>
<key>AMAccepts</key>
<dict>
<key>Container</key>
<string>List</string>
<key>Optional</key>
<true/>
<key>Types</key>
<array>
<string>com.apple.mail.message-object</string>
<string>com.apple.mail.mailbox-object</string>
<string>com.apple.mail.account-object</string>
</array>
</dict>
<key>AMActionVersion</key>
<string>2.0.2</string>
<key>AMApplication</key>
<array>
<string>Mail</string>
</array>
<key>AMParameterProperties</key>
<dict>
<key>itemType</key>
<dict/>
</dict>
<key>AMProvides</key>
<dict>
<key>Container</key>
<string>List</string>
<key>Types</key>
<array>
<string>com.apple.mail.message-object</string>
<string>com.apple.mail.mailbox-object</string>
<string>com.apple.mail.account-object</string>
</array>
</dict>
<key>AMRequiredResources</key>
<array/>
<key>AMSelectedInputType</key>
<string>com.apple.mail.message-object</string>
<key>AMSelectedOutputType</key>
<string>com.apple.mail.message-object</string>
<key>ActionBundlePath</key>
<string>/System/Library/Automator/Get Selected Mail Items 2.action</string>
<key>ActionName</key>
<string>Get Selected Mail Messages</string>
<key>ActionNameComment</key>
<string></string>
<key>ActionParameters</key>
<dict>
<key>itemType</key>
<string>com.apple.mail.message-object</string>
</dict>
<key>BundleIdentifier</key>
<string>com.apple.Automator.GetSelectedMailItems2</string>
<key>CFBundleVersion</key>
<string>2.0.2</string>
<key>CanShowSelectedItemsWhenRun</key>
<false/>
<key>CanShowWhenRun</key>
<true/>
<key>Category</key>
<array>
<string>AMCategoryMail</string>
</array>
<key>Class Name</key>
<string>Get_Selected_Mail_Items_2</string>
<key>InputUUID</key>
<string>A5A7A9DF-379C-4D39-8C5F-57BCC45F1FA2</string>
<key>Keywords</key>
<array/>
<key>OutputUUID</key>
<string>9A9D3C34-4DC1-4A69-89B7-1EEF2270914E</string>
<key>UUID</key>
<string>4CBD8ABA-29ED-49D6-B8B5-7ACD25F686FC</string>
<key>UnlocalizedApplications</key>
<array>
<string>Mail</string>
</array>
<key>arguments</key>
<dict>
<key>0</key>
<dict>
<key>default value</key>
<string>com.apple.mail.message-object</string>
<key>name</key>
<string>itemType</string>
<key>required</key>
<string>0</string>
<key>type</key>
<string>0</string>
<key>uuid</key>
<string>0</string>
</dict>
</dict>
<key>isViewVisible</key>
<true/>
<key>location</key>
<string>620.000000:173.000000</string>
<key>nibPath</key>
<string>/System/Library/Automator/Get Selected Mail Items 2.action/Contents/Resources/Base.lproj/main.nib</string>
</dict>
<key>isViewVisible</key>
<true/>
</dict>
<dict>
<key>action</key>
<dict>
<key>AMAccepts</key>
<dict>
<key>Container</key>
<string>List</string>
<key>Optional</key>
<true/>
<key>Types</key>
<array>
<string>com.apple.applescript.object</string>
</array>
</dict>
<key>AMActionVersion</key>
<string>1.0.2</string>
<key>AMApplication</key>
<array>
<string>Automator</string>
</array>
<key>AMParameterProperties</key>
<dict>
<key>source</key>
<dict/>
</dict>
<key>AMProvides</key>
<dict>
<key>Container</key>
<string>List</string>
<key>Types</key>
<array>
<string>com.apple.applescript.object</string>
</array>
</dict>
<key>ActionBundlePath</key>
<string>/System/Library/Automator/Run AppleScript.action</string>
<key>ActionName</key>
<string>Run AppleScript</string>
<key>ActionParameters</key>
<dict>
<key>source</key>
<string>-- SendToMailSpy v1.0-- macOS workflow-- Install MailSpy from the Mac App Store first: https://www.corecode.io/mailspy/index.html-- Install workflow by double-clicking on it, or move to ~/Library/Services manually-- Access workflow: Mail &gt; Services &gt; SendToMailSpy-- Optional: assign a keyboard shortcut, e.g. CTRL-ALT-CMD-Y, in System Preferences &gt; Keyboard &gt; Shortcuts &gt; Services &gt; General-- Note: written for macOS 10.13 (High Sierra); if you have a different system, change "V5" in the script below to your actual Mail directory version number, e.g. "V4", "V3", "V2" etc.on run {input, parameters} tell application "Mail" selected messages of message viewer 1 repeat with eachMessage in result set theMessagePath to (do shell script "find ~/Library/Mail/V5 -name " &amp; (get id of eachMessage) &amp; ".\\*") do shell script "/usr/bin/open -a MailSpy " &amp; theMessagePath end repeat end tell return inputend run</string>
</dict>
<key>BundleIdentifier</key>
<string>com.apple.Automator.RunScript</string>
<key>CFBundleVersion</key>
<string>1.0.2</string>
<key>CanShowSelectedItemsWhenRun</key>
<false/>
<key>CanShowWhenRun</key>
<true/>
<key>Category</key>
<array>
<string>AMCategoryUtilities</string>
</array>
<key>Class Name</key>
<string>RunScriptAction</string>
<key>InputUUID</key>
<string>98F4637E-4DC8-464E-844B-1A856C284E3C</string>
<key>Keywords</key>
<array>
<string>Run</string>
</array>
<key>OutputUUID</key>
<string>87F0E942-7E35-47A1-8419-101E2D6987E7</string>
<key>UUID</key>
<string>959BF774-0BCF-49F6-8323-0CF92452C7FA</string>
<key>UnlocalizedApplications</key>
<array>
<string>Automator</string>
</array>
<key>arguments</key>
<dict>
<key>0</key>
<dict>
<key>default value</key>
<string>on run {input, parameters}

(* Your script goes here *)

return input
end run</string>
<key>name</key>
<string>source</string>
<key>required</key>
<string>0</string>
<key>type</key>
<string>0</string>
<key>uuid</key>
<string>0</string>
</dict>
</dict>
<key>isViewVisible</key>
<true/>
<key>location</key>
<string>620.000000:642.000000</string>
<key>nibPath</key>
<string>/System/Library/Automator/Run AppleScript.action/Contents/Resources/Base.lproj/main.nib</string>
</dict>
<key>isViewVisible</key>
<true/>
</dict>
</array>
<key>connectors</key>
<dict>
<key>3116CF83-DFE2-4CFD-832E-6014288FE1AD</key>
<dict>
<key>from</key>
<string>4CBD8ABA-29ED-49D6-B8B5-7ACD25F686FC - 4CBD8ABA-29ED-49D6-B8B5-7ACD25F686FC</string>
<key>to</key>
<string>959BF774-0BCF-49F6-8323-0CF92452C7FA - 959BF774-0BCF-49F6-8323-0CF92452C7FA</string>
</dict>
</dict>
<key>workflowMetaData</key>
<dict>
<key>serviceApplicationBundleID</key>
<string>com.apple.mail</string>
<key>serviceApplicationPath</key>
<string>/Applications/Mail.app</string>
<key>serviceInputTypeIdentifier</key>
<string>com.apple.Automator.nothing</string>
<key>serviceOutputTypeIdentifier</key>
<string>com.apple.Automator.nothing</string>
<key>serviceProcessesInput</key>
<integer>0</integer>
<key>workflowTypeIdentifier</key>
<string>com.apple.Automator.servicesMenu</string>
</dict>
</dict>
</plist>
Expand Down

0 comments on commit 132e3e4

Please sign in to comment.