How Use Keyboard Maestro to Log-In To a Webpage?

Is it possible for KM to simplify the login on a webpage?
The idea was to use 1 macro trigger, to get up the page, then entering username & password = that's it.

But I know all web pages are different, and even if not completely automated, a macro would be still worth it.

Any suggestions?


You can try using the browser actions to set field to whatever your username and password is. How ever not all websites are built in such away that this will work. You other option is using found images to input the info but this may not be 100% reliable. Either of these methods however would require you to have a copy of your password in km which some people recommend against. I have a few macros that do this for me though and after enough tweaking they work 99% of the time. I’ll try and post some more info on how I did it tomorrow when I’m back at my computer.

It goes without saying that placing your password in a macro is a bad idea, from a security perspective.

Also, some websites go out of their way to make automated logins difficult (eg, captchas). Different approaches may be better for different websites. Since you haven't said which website you are accessing, it's hard to give you the best advice. I'm not sure if the senior members will give much advice on this subject since it's a security pitfall. You don't own a password management utility? (I don't use them, but they might be more secure than a home baked solution.)

You could try looking at this:

You never have to put passwords in plaintext in macros and you never should! Have a look at this:

and ensure you use a Local variable to receive the password.

Setting the field, how is this done?

the site I'm addressing is

@Sleepy this is it:

As for now, I have used the UI Recording with KM, just to get so far as to click the login button, already this is helpful.

@tiffle " This action does not work with Internet Passwords – only with Generic Passwords" → what is the difference?

Internet Passwords – when login to a webpage?!


By using the "Set browser field to text" can do this with Safari, Chrome or "front browser" which has limited support for other browsers.

Insert the action, then click the corresponding browser name (on the right of the action) which will display a dropdown menu that has all the fields that can be set using KM. Usually they will say something to the effect of email or password. In the second space of the action you would then put the corresponding info, email or password.

If the field isn't there, it can't be populated this way.

Again, this isn't a very secure way of doing this, so use it at your own risk. I only use it on one website.

No idea what the difference is but I use this action to retrieve passwords whether they relate to desktop apps (like 1Password) or websites.

Web Login With Keychain - #11 by ccstone

1 Like

The smart, reliable, and more secure ways to solve this are by following the advice that others are giving you here. But there are other solutions. Firstly, I noticed that the link you gave me isn't actually the login page. There is at least one other link to an actual login page, which is:

"Free email accounts with | Log in here or register today"

So if you want to try my quick and dirty way to solve this, use that page. Then wait a few seconds for the page to load. (Make sure you don't use the mouse when KM runs because the website uses javascript to have popups cover the login window.) Then send a TAB key to your browser. Then paste your login name into the site. Then send another TAB key. Then paste your password. Then send the RETURN key. And that should be it. I could probably do that in six KM actions. If you can't understand my advice, then it's better that you follow the advice of others here.

But if you are a paid user of their service, then you shouldn't be using that page at all, because there is a different page for you to avoid all the ads, popups and latency.

With me it looks somewhat different, it works, but not like yours:

Your take?


Yes that's how it should look. One action to set the email field and another to set the password field. Glad you got it working!