What I am looking for: a macro triggered by an email
I sometime do some freelance work for a company. They email me and other people who work for them will tasks they want us to do. The first person to go to the website, login na click on a confirmation link gets the job. What I would like to do is to have keyboard maestro go to the website and do the confirmation for me everytime an email from them land in my gmail inbox. So the macro should be triggered by an email containing certain text.
What is important: response time. I need the confirmation on the website to be made ASAP. If I am late someone else will take the job.
My mac mini is running 24/7 so the solution doesn’t have to be energy efficient or elegant.
The solution may include dropbox, ifttt, google drive or hazel if needed.
using terms from application "Mail"
on perform mail action with messages messageList for rule theRule
tell application "Mail"
repeat with theMessage in messageList
set msgSubject to theMessage's subject
display notification "Mail Message" with title msgSubject subtitle "arrived" sound name "Sosumi"
end perform mail action with messages
end using terms from
You can get the contents or source of a message and parse it for what you need.
Personally I’d use the Satimage.osax AppleScript Extension to do the parsing and open the given URL in Safari – but you can also use the AppleScript to populate Keyboard Maestro variables and call a Keyboard Maestro macro.
This little task is NOT as simple as most people want it to be, but it’s doable.
I get an email with the subject ’ “Apply Now” Form - Contact form on’ these emails automatically appear in the junk I have in Mail a rule for Mail to then put these emails into the main Inbox. When ever I get these emails I would like to trigger a macro which will extract data from the email and save as a variable into KM. For the non techincal KM users could you provide a recipe of how we can get KM to trigger a macro when ever the email is received?
Many thanks for your assistance, greatly appreciated.