Copy Information From Email in Gmail to a Form in a Browser

Hello Keyboard Maestro users,

I'm trying to automate a really painful task that I have to do multiple times a day.

The task :

  • I receive an order on my Gmail account that contains title, name, last name, airport code, departure date
  • With those informations, I need to fill a 3 steps form.

What would be the logic to achieve this automatically with KM?

Thanks a lot for your help

Hi @RyanMee, I suggest to copy the content from the email to the clipboard, filter the desired items using Regular Expressions (regex) followed by storing them in variables to paste them in the desired webform fields.

Hey @Neo , thanks a lot for the insight, that's really helpful.
I'm just feeling a bit lost trying to find out the Regular Expressions for this content in the clipboard. For the "Form" and "To" I would just need what's between the brackets. GDL and CDG. Do you have any idea what would be the expression for the following :

Title		First name		Last name
Mr		John		Doe
Itinerary
From
Guadalajara (GDL), MX  
To
Paris (CDG), FR

@RyanMee this should do it for you: (?<=().+?(?=))

Take a look at https://regex101.com/

Hey Ryan,

I wouldn't even try to do this with Gmail in a browser.

I'd use Apple Mail to access the Gmail account and then use AppleScript to extract the data from the email.

From there the sky is the limit, but I'd have to see real samples in order to advise further.

-Chris

Thank you @ccstone and @Neo ,
I didn't think about AppleScript to extract the data from the email. I will try this out!

1 Like