TL;DR: Turn a multiline text block into a loopable array in Power Automate with split(text, separator).

๐Ÿ’ก Challenge

How do you process a copied multiline text block, each line a record (IDs, email addresses, URLs), in a Power Automate flow without splitting it by hand? Manual steps donโ€™t scale and are error-prone.

โœ… Solution

Use the split() expression to turn the multiline string into an array. With a simple separator (a line break, comma, or any character) you get an array you can loop through with โ€œApply to eachโ€.

๐Ÿ”ง How Itโ€™s Done

1. Capture the text

๐Ÿ”ธ Add a Compose action and paste your multiline text into it. Name it DataInput.

2. Define the separator

๐Ÿ”ธ Add a second Compose containing only a line break (press Enter in the input). Name it Separator.

3. Loop the array

๐Ÿ”ธ Add an Apply to each control and set its input to:

split(outputs('DataInput'), outputs('Separator'))

4. Process each line

๐Ÿ”ธ Inside the loop, use Current item to trim, validate, call an API, or create records.

๐ŸŽ‰ Result

Your flow now accepts any multiline text block and processes each line as a separate item. No more copy-paste, no manual cleanup, just reliable automation that scales.

๐ŸŒŸ Key Advantages

๐Ÿ”ธ Saves time by automating repetitive data preparation

๐Ÿ”ธ Flexible: works with lists from Excel, emails, Power Apps, or paste operations

๐Ÿ”ธ Reduces human errors from manual handling

๐Ÿ”ธ Scales to hundreds or thousands of lines without extra effort


๐ŸŽฅ Video Tutorial


๐Ÿ› ๏ธ FAQ

1. What if my data is comma-separated instead of line breaks? Replace the Separator Compose content with a comma. The same split() expression produces the array.

2. Can the text originate from a Power App? Yes. Pass a multiline text input from Power Apps into the flow; the split logic stays identical.

3. How do I handle empty lines from accidental extra newlines? Add a condition inside the loop to check that trim(Current item) is not empty before processing.

Need Help with Your Power Platform Project?

Get expert guidance through personalized workshops, consulting, and training tailored to your specific needs.

Request Workshop

Consulting and process automation for SMBs is delivered by KMUpower. Prefer structured, German-language courses? The Power Platform Academy offers live Power Platform Schulung and hands-on Power Platform courses for Power Apps, Power Automate and Copilot.