Skip to main content
Community site session details

Community site session details

Session Id : hK+2BDTDZ7WMpztMbyCvEX
Power Automate - Building Flows
Answered

Flow

Like (0) ShareShare
ReportReport
Posted on 24 Mar 2024 10:24:13 by 17

I need a help to extract texts which contains _ from email

 

 

sample email : 

 

Hello

 

Billing date is due for this month. Please find the servies below 

 

GYO_PL6801_HD_YTO

KY_YO_HHS_GY_9610

 

Thanks,

 

  • Chriddle Profile Picture
    7,932 Super User 2025 Season 1 on 28 Mar 2024 at 08:09:34
    Re: Flow

    I assume that you haven't followed

    If you need a HTML new-line, replace decodeUriComponent('%0A') with '<br>'

    Of course you can also add a comma

    join(
    	body('Filter_array'),
    	',<br>'
    )
  • KNAR Profile Picture
    17 on 27 Mar 2024 at 16:11:30
    Re: Flow

    @Chriddle  is there any way to add break line when posting to the teams message 

     

    still getting output as below

    GHYWI_YWHD_NAT_68901_0","YUPLE_HU_MJU_561803uh_0","UTWNJ_UGW_6820_Y

     

    would be easier if i got message output in teams message 

    like below 

    GHYWI_YWHD_NAT_68901_0",

    "YUPLE_HU_MJU_561803uh_0",

    "UTWNJ_UGW_6820_Y

     

    tried couple of things like apply each action doesn’t seems to be working 

     

     

    thanks in advance 

     

     

     

  • Chriddle Profile Picture
    7,932 Super User 2025 Season 1 on 27 Mar 2024 at 12:35:17
    Re: Flow

    Here are 2 options:

    1. If you want to keep it as JSON, stringify the array and add new-lines
    2. If you just want to list the values, join the array

    If you need a HTML new-line, replace decodeUriComponent('%0A') with '<br>'

     

    Chriddle_1-1711542460514.png

    replace(
    	string(body('Filter_array')),
    	',',
    	concat(',', decodeUriComponent('%0A'))
    )
    join(
    	body('Filter_array'),
    	decodeUriComponent('%0A')
    )

     

    Chriddle_2-1711542871666.png

     

     

  • KNAR Profile Picture
    17 on 27 Mar 2024 at 12:19:17
    Re: Flow

    Requirement is to paste a every result as anew line delimiting “ , “

  • Chriddle Profile Picture
    7,932 Super User 2025 Season 1 on 27 Mar 2024 at 12:14:07
    Re: Flow

    I don't get it.

    Your proposed output looks strange.

     

     

  • KNAR Profile Picture
    17 on 27 Mar 2024 at 11:49:47
    Re: Flow

    hey @Chriddle  thanks above solutions works could you please help me with the solution for the below 

    As im trying to post this result in the group chat 

    while i am getting ouput as the below 

     

    ["GHYWI_YWHD_NAT_68901_0","YUPLE_HU_MJU_561803uh_0","UTWNJ_UGW_6820_Y"]

     

    BUT Need a output like the below 

     

    "GHYWI_YWHD_NAT_68901_0",

    "YUPLE_HU_MJU_561803uh_0",

    "UTWNJ_UGW_6820_Y"]

     

     

     

  • Verified answer
    Chriddle Profile Picture
    7,932 Super User 2025 Season 1 on 27 Mar 2024 at 10:50:41
    Re: Flow

    Even simpler:

    Chriddle_0-1711536587288.png

    From

    split(
    	replace(
    		outputs('Compose'),
    		decodeUriComponent('%0A'),
    		' '
    	),
    	' '
    )

    Filter

    @contains(item(), '_')

  • jibbs Profile Picture
    82 on 25 Mar 2024 at 18:12:45
    Re: Flow

    Hi @KNAR , give @Chriddle's solution a try. If you still face any issues, you could try the AI Builder action to extract the text, but keep in mind that that solution requires premium PA license with limitations on AI Builder action credits. 

  • Verified answer
    Chriddle Profile Picture
    7,932 Super User 2025 Season 1 on 25 Mar 2024 at 08:56:49
    Re: Flow

    Chriddle_0-1711356908711.png

     

    Select From:

    split(
    	replace(
    		outputs('Compose'),
    		decodeUriComponent('%0A'),
    		' '
    	),
    	' '
    )

     Map:

    if(
    	contains(item(), '_'),
    	item(),
    	''
    )

     

    Filter:

    @greater(length(item()), 0)

     

    Chriddle_1-1711356999178.png

     

  • KNAR Profile Picture
    17 on 25 Mar 2024 at 04:39:20
    Re: Flow

    @jibbs @abm 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1

Loading complete