May 5, 2021, 8:38am
New to Keyboard Maestro and trying to figure out if this is something I can build.
I’ve got a group of 100+ emails that all contain a link to a secure messaging website that then has a link to a file I need to download. Each email and secure message look exactly the same. What I’m trying to do is automate the below process.
1. Open link in Outlook (Mac or web app)
2. Download file on messaging website
3. Close tab
4. Loop the process for the remaining emails.
Some random notes
• Browser I use is Chrome but can also run Safari
• I do have my email account in Apple Mail as well but rarely have the app open
Please let me know if there is a similar thread as well.
Welcome to the forum!
You say you're using Microsoft Outlook as your mail client?
On what version of macOS?
Your task should be possible up to the download.
The download part I wouldn't guarantee – it depends upon how difficult the source site makes it.
This automation is very doable, but will require substantial skills and at least several hours to produce.
Here is an untested outline of how I would approach this. This specific outline is untested, but I have done a number of similar projects.
Select the messages in Outlook that you want to process
Execute an AppleScript action that get the messages selected
1.extracts the body HTML of each message
2. uses Regex to extract the link in that message.
3. Returns a list of URLs to open Use a KM
For Each action on this URL list.
Open the URL
Use KM to set the download folder
Pause until download is completed.
Development of this automation could easily take many hours, depending on the complexity of the email messages and the web page with the file to download.
May 9, 2021, 12:42am
Thanks everyone for the suggestions. I was able to figure out a way to do it triggering for each individual email, mostly using keyboard and clicking automation.
@JMichaelTX thank you for a quick outline. I think like you said it may take longer than it’s worth for the task to make it fully automated but I’ve figured out a workable solution
If you don't mind sharing, it would be great if you could upload your final macro. I'm sure this would help a lot of other KM users.
How to upload your macro. Instructions for uploading to an existing post are just below the main instruction.
You may also find this Macro useful: MACRO: Upload KM Macro to New or Existing Topic @KM [Pub].