Seeking Guidance on Conditional Text Replacement in Keyboard Maestro

Hi, @Macaniac; welcome to the Keyboard Maestro forum.

Since you are a new forum user, I'm going to refer you to four references that will make your time here much more efficient:

Once you've read the above information and dive in, you'll find that there are many friendly users that are happy to assist.


Regarding your objective, I have a couple questions/comments:

  • What email application are you using?

  • Finding and selecting the text block to be replaced would be the most difficult, if not impossible (depends on the email program), automation challenge. However, if you selected the text, and triggered a macro (e.g., with a hot key) it is relatively easy to replace the selected block with the format you specified. See below.


Download: Replace Selected Mail From Block.kmmacros (7.9 KB)

Macro-Image


Macro-Notes
  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.

System Information
  • macOS 14.2 (23C5030f) PRE-RELEASE SEED SOFTWARE
  • Keyboard Maestro v11.0.1