ZIP archive action

Hi there

I’m looking for an action which can zip up the selected drafts and attach them to a new email.

Thanks for any pointers!

I’m not aware of one that does or could do this. I would therefore look to create an action that does the following:

  1. Exports the Drafts to files in a specific directory.
  2. Runs a Shortcuts shortcut.

The Shortcut would do the following:

  1. Select the files.
  2. Zip the files.
  3. Attach the files to an e-mail.
  4. Allow me to customise the body of the e-mail.
  5. Send the e-mail.
  6. Delete the files that were sent and the zip file.

I would probably choose Dropbox as the file location as both apps can share access, and I would also probably have it so all files in the folder are zipped and deleted each time. This avoids having to pass lots of file names around or manually select. I just zip everything available each time.

Hope that helps.

Thanks. Your suggestion makes sense.

Shame though that there is no direct action for this…

Well, I think it should be possible to do more of it just in an action, but the level of complexity ramps up.

Drafts allows you to make API calls to Dropbox that you build yourself, so you could build one to download a folder as a ZIP. You could similarly do the file deletion.

As for the e-mail, the native e-mail action step doesn’t support adding attachment, but if you base 64 encode the ZIP with a script step(probably possible, but I’d have to check that) and find a mail app that supports a URL scheme that allows for attachments, you could then also build the e-mail.

Whilst it may be possible, the path of least resistance is probably to utilise Shortcuts. It’s essentially a system feature as of the impending release, so in the grand scheme of things I think it is well placed to support Drafts for a scenario like this.

Thanks sylumer. Will look into this.