# Power Automate: Add a New Line in Text or Email

> For the full documentation index, see https://250highstreet.com/llms.txt

> Add a line break in Power Automate text. Press Enter in Compose, use decodeUriComponent('%0A') in an expression, or use <br> in an email body.

In a Compose action, press Enter inside the Inputs box to add a line break. In an expression, use decodeUriComponent('%0A'). In an email body, which is HTML, use <br>, because a line break inside text shows as a space.

## How do you add a line break in a Compose action?

This works in the plain text box of Compose and in most text inputs. It does not change how an email shows the text. That depends on the email format.

1. Add a Compose action and click inside the Inputs box.
2. Type the first line of text.
3. Press Enter, then type the second line.
4. Save and run the flow.
5. Check the run: the Compose result now sits on two lines.

## How do you add a new line inside an expression?

An expression cannot hold a raw Enter key. Build the break from its code instead. The function decodeUriComponent() turns the code %0A into a line feed character.

```
concat('Order received', decodeUriComponent('%0A'), 'Total: 40 USD')

Result:
Order received
Total: 40 USD
```

## Why does my email ignore the line break?

![Diagram comparing two-line Compose text in an email body, which shows one line, and text with a br tag, which shows two lines](/guides/img/fig-power-automate-new-line-in-text-and-email.svg)

An email body is HTML, so only a tag creates a new line.

The Send an email (V2) action takes its Body as HTML, per Microsoft's Office 365 Outlook connector reference. HTML shows a line feed inside text as a space, so breaks that come from a Compose output, a variable or a multi-line column disappear. Use the tag <br> where you want a new line, or wrap each paragraph in <p> and </p>.

To fix text that already holds line feeds, swap them for tags in an expression: replace(outputs('Compose'), decodeUriComponent('%0A'), '<br>'). See the [shared mailbox email guide](/guides/power-automate-send-email-from-shared-mailbox/) for the rest of the action.

## Which code gives which break?

| Where you use it | Code | Result |
|---|---|---|
| Expression, text or file | decodeUriComponent('%0A') | Line feed (new line) |
| Expression for Windows text files | decodeUriComponent('%0D%0A') | Carriage return and line feed |
| Email body or HTML table | <br> | HTML line break |
| Email body paragraph | <p>text</p> | Paragraph with spacing |

## How do you put each array item on its own line?

Use the join() function with the line break as the separator. The expression join(variables('names'), decodeUriComponent('%0A')) returns one item per line.

**Tip:** Store the break in a variable named NL once, then reuse it in every expression.

For an email, use '<br>' as the separator instead. See [the Join action](/guides/power-automate-join-action/) for the no-code version and [join text together](/guides/power-automate-concat-join-text-together/) for concat().

## Which mistakes break the result?

## How do you remove a line break?

Use replace() to swap the break for a space. The expression replace(outputs('Compose'), decodeUriComponent('%0A'), ' ') removes every line feed. See [the replace function](/guides/power-automate-replace-text-replace-function/) for more cases.

## FAQ

### Does Power Automate support \n in expressions?

No. The two characters \ and n stay as text. Use decodeUriComponent('%0A') for a line feed.

### How do I add a new line in a Teams message?

Microsoft's Teams connector reference does not state the message format, so test one post in a private chat first. If the break does not show, try <br>.

### What is the difference between %0A and %0D%0A?

%0A is a line feed. %0D%0A is a carriage return plus a line feed, which some Windows files expect.

### Can I use the char function for a new line?

No. Microsoft's functions reference lists no char() function. Use decodeUriComponent('%0A').

## Sources

- [Reference guide to workflow expression functions (Microsoft Learn)](https://learn.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference)
- [Office 365 Outlook connector reference (Microsoft Learn)](https://learn.microsoft.com/en-us/connectors/office365/)
- [Expression cookbook for cloud flows (Microsoft Learn)](https://learn.microsoft.com/en-us/power-automate/expression-cookbook)
- [Microsoft Teams connector reference (Microsoft Learn)](https://learn.microsoft.com/en-us/connectors/teams/)

## Related guides

- [Power Automate Send Email From a Shared Mailbox](/guides/power-automate-send-email-from-shared-mailbox/)
- [Power Automate Join Action: Turn an Array Into Text](/guides/power-automate-join-action/)
- [Power Automate concat(): Join Text Together](/guides/power-automate-concat-join-text-together/)
- [Power Automate replace(): Replace or Remove Text](/guides/power-automate-replace-text-replace-function/)
- [Moving SharePoint files to another library without losing history](/guides/sharepoint-move-files-keep-version-history-metadata/)

Source: https://250highstreet.com/guides/power-automate-new-line-in-text-and-email/
