Change Links in Rich Text to Markdown (or similar)

Hi All,
I have to use a portal for work, which allows me to communicate with members of teams based on certain criteria. One of the issues I have with the portal is that it does not accept rich text links. If I wanted to write KM, you would have to enter this as [link target=new href=]KM[/link]- any rich text links will simply be converted to plain text.
I have to do a lot of copying and pasting of text with multiple rich text links for messages I send through this portal. My question is, how I would best approach creating a Macro that identifies rich text links and formats them above? I have looked at filters, but I am not yet able to even identify rich text links.
Thanks in advance for your help.

I can't help via Keyboard Maestro, but may be useful.