When appending text to a note or editing the text of a note (with Apple shortcuts or with x-callback-url), while the text contains a tag, I encountered the following problems:
No color control: A tag with a color other than orange (i.e. the default) associated with it in Agenda, renders (or rather is created) in the note with the color orange. (Even if in Agenda the only other instance of that tag has the desired color.)
Insufficient text control: A tag containing a space (like β[#Test 1]β) is wrongly recognized as half the tag (up to the space) and the rest as normal text (β[#Test] 1β). Therefore I currently see no way to encode tags containing a space.
I cannot use the \tag(name: abc, color: xyz) notation. This would be one option to solve the problems.
Yes #(Test with space) works! I probably had never tried that combination. Thank you very much!
For the colors: I have a tag with a magenta color assigned to it. Now I want to add this tag via a shortcut to another note. I would like this appended tag to also be magenta, but it always defaults to orange. (In my specific use case I want to change some text in a note with a shortcut. To do this I grab the text from the note, do something with the text in the shortcut, and then set the note text to the new text. Doing this always defaults the colors of all tags to orange).
For the \tag() notation: It seems to me that using this in Shortcuts is kind of blocked currently. In the app it works just fine.