Skip to main content
Question

Create new lines in RENDER() function

  • March 16, 2026
  • 4 replies
  • 22 views

I have a notify step that uses RENDER() with a generated input string training_str. The template uses HTML tags (e.g. <b>) and a training_str built from a $MAP / $CONCAT expression, but the newline characters render literally (you see \n) when the message is sent to Teams. I’ve also tried "<br>" and "<br >" and they also end up displayed literally.

 

How can I generate a string from my inputs that will render new lines appropriately in Teams? 

MS Teams screenshot of how the message renders with a literal \n

 

Notify YAML (relevant parts only): 

- notify:
output_key: notification
recipient_id: data.user_mw_record.user.record_id
message:
RENDER():
args:
training_str: response_element.t.$MAP(t => $CONCAT(["*📖 ", t.nm, " -- Due ", t.dt, "*"])).$CONCAT("\n")
template: >-
<b>📣 Notice: Upcoming My Learning Trainings</b>


Hi {{recipient_name}}!


This is an automated notice that you have <b>{{training_len}} training(s)</b> due in
<b>{{window_end_days}} days</b>:


{{training_str}}

 

Example response_element:

{
"t": [
{
"dt": "2026-04-10",
"nm": "Personal Protective Equipment" },
{
"dt": "2026-04-10",
"nm": "Fall Protection Systems End User"
}
],
"b": "1234567"
}

 

4 replies

  • Author
  • New Participant
  • March 16, 2026

For whatever reason, if I instead generate the string as a script action, the newline characters do render appropriately in the teams message. 

lines = []
for t in trainings:
title = t.get("nm", "Untitled training")
due = t.get("dt", "No due date")
lines.append(f"*📖 {title} -- Due {due}*")
training_names = "\n".join(lines)
training_names

I’d prefer to avoid this way just for cleanliness and organization. 


Kevin Mok
Forum|alt.badge.img+1
  • Community Manager
  • March 16, 2026

@cdbarringer You may want to change the last concat to

.$CONCAT(" \n ")

I think the problem here is that the reasoner sees that *\n* and does not interpret it correctly… Maybe adding some spacing will make it understand your intentions better


  • Author
  • New Participant
  • March 16, 2026

@cdbarringer You may want to change the last concat to

.$CONCAT(" \n ")

I think the problem here is that the reasoner sees that *\n* and does not interpret it correctly… Maybe adding some spacing will make it understand your intentions better

 

@Kevin Mok good thought! That fixed the issue with the bold text, but the newline is still shown literally ☹️

 


varockiasamy

.