OmniFocus Attachment to Apple Shortcut and back

Does anyone know how to access an action’s attachments, get them to an Apple Shortcut and back to the action again? I read the Omni Automation pages about attachments, but failed to implement something working.

That’s an interesting question. In general, I use fromBase64 and toBase64 methods from Data class.

attachments instance property of Task class should give you an Array of FileWrapper. And so, each instance of FileWrapper class has a contents property of type Data. You should convert that using toBase64 method to a base-64 encoded string for the purposes of sending that information to Shortcuts.

That’s off the top of my mind, haven’t tested. Feel free to ask further. I can’t promise I will be back soon since I have many things going on, but I will reply as soon I get the chance to do it.

1 Like

Worked. Thanks!

1 Like