web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Trying to extract stri...
Power Automate
Unanswered

Trying to extract string from plain text

(0) ShareShare
ReportReport
Posted on by 13

I have output like this in plain text:

 

 

 

BEGIN:VCALENDAR
PRODID:-//Service-now.com//Outlook 11.0 MIMEDIR//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:email@emailaddress.com
ORGANIZER:email@emailaddress.com
DTSTART:20230710T100000Z
DTEND:20230710T113000Z
UID:e61m11jt9fxe9107402h0561263af9b
DTSTAMP:20230703T150531Z
DESCRIPTION:Description of invite
SUMMARY:Test summary here
LOCATION:england
END:VEVENT
END:VCALENDAR

 

 

 

 How can I extract the text after "SUMMARY:" and the same for other things for each one of these invites?

 

Thanks

Categories:
I have the same question (0)
  • S-Venkadesh Profile Picture
    923 Moderator on at

    Hi @AhmetC ,

    You can use the Substring formula to extract the desired text.

    The following example demonstrates how to extract the string after the "SUMMARY" text:
    substring(variables('varText'), add(indexOf(variables('varText'), 'SUMMARY:'), 8))

    Below screenshot is for your reference:

    SVenkadesh_0-1688486324846.png

     

    I hope this information is helpful. If it is, please consider giving a thumbs up.

    Best regards,

    Venkadesh Sundaramurthy

  • Verified answer
    ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @AhmetC 

     

    I have used a string variable 'varInputString' to store the input text in the given example:

    ManishSolanki_0-1688486660788.png

     

    Next, using expression in 'Compose' action, we will fetch the Summary text. The expression needs to be written in the expression window:

    ManishSolanki_1-1688486766207.png

     

    The expression used inside 'Compose' box is:

    first(split(last(split(variables('varInputString'),'SUMMARY:')),decodeUriComponent('%0A')))

    Pls replace the variable name as per your need. Likewise, you can fetch the other information from the input text.

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • AhmetC Profile Picture
    13 on at

    Unfortunately, this was giving everything after SUMMARY: including next lines which I didn't need. 

  • AhmetC Profile Picture
    13 on at

    Thank you sir 🙂

  • trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at

    One way to do this is to dynamically find the starting position of Summary and Location (you would do this for other values too).  This allows you to grab subtext between the two positions in your text.  This has worked really well for me in production flows and is dependable.  Let me know if this works for you - always glad to help!  Tom

     

    The successful runThe successful runPart 1Part 1Part 2Part 2

     

     

     

  • S-Venkadesh Profile Picture
    923 Moderator on at

    Hi @AhmetC ,

     

    Below screenshot explains how to extract the string after "SUMMARY" and before "LOCATION" from the input text

    SVenkadesh_0-1688490318411.png

    I hope this information is helpful. If it is, please consider giving a thumbs up.

     

    Best regards,

    Venkadesh Sundaramurthy

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard