Same macro on different home/work computer

I have a macro that pulls a variable from Keychain in the process that is shared between home and work computer. The variable name is the same, but the computer names "accounts" are different. What would be the easiest way to make it work on both computers short of creating a duplicate and the chose between two after triggering it?

It is not clear what your issue is.

Please read:
Tip: How Do I Get The Best Answer in the Shortest Time?

If you’re saying you want your macro to do something different depending on the Mac it’s running on, try using one of the KM Tokens, like this one: token:MacName [Keyboard Maestro Wiki] together with an If…Then…Else action where you can set the appropriate account in a variable.

There are others - refer to the KM wiki about Tokens here Tokens [Keyboard Maestro Wiki]

Thanks @tiffle, this is exactly what I needed.

Also you could use a Switch Case Action, which allows as many Macs as you like to do different things with the same Macro:

Awesome - thank you - I’ll take a look at these.