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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Need help to extract o...
Power Automate
Unanswered

Need help to extract out the time as well on how to slice

(0) ShareShare
ReportReport
Posted on by 29

Hi All, 

I facing some difficulties in extracting out the information out of a email body.

"Event Source : xx-xxxxxx",
"Identifier Link:",
"https://console.aws.amazon.com/rds/home?region=ap-southeast-1#snapshot:id=rds:aaaaaaa-2023-03-21-12-06",
"SourceId: rds:aaaaaaa-2023-03-21-12-06",
"Notification time : 2023-03-21 12:08:32.758",
"Message : Automated snapshot created",
"Event ID :",
"http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.Messages.html#RDS-EVENT-0091",
"--",
"If you wish to stop receiving notifications from this topic, please click or",
"visit the link below to unsubscribe:",
"https://sns.ap-southeast-1.amazonaws.com/unsubscribe.html?SubscriptionArn=arn:aws:sns:ap-southeast-1:123-123-123-123:Prod-AWS-Backup-Alerts:xxxxxxxxxxx-xxxxxxxxxxxxx-xxxxxxxxxxxx&Endpoint=xxx@xxx.xxx",
"Please do not reply directly to this email. If you have any questions or",
"comments regarding this email, please contact us at",
"https://aws.amazon.com/support",

1. Can someone please show me how to extract out just the hh:hh from ["Notification time : 2023-03-21 12:08:32.758",]

 

2. Can someone please show me how to extract / slice out the just the word [aaaaaaa] from [aaaaaaa-2023-03-21-12-06]

 

Categories:
I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @newbieguy 

    You can use slice option 

     

    I have did this way

     

    Nived_Nambiar_0-1679479913964.png

     

     

    Here i have placed the string as input in compose action

    Nived_Nambiar_1-1679479940747.png

     

    2. Next step is find the text near to Notification time and get hour:minute component from it , ie 12:08

      2a. First is to find the Text position of Notification Time: using find text position action

    Nived_Nambiar_2-1679480071622.png

     

      2b. Next is to find the text position of Message word in the input

    Nived_Nambiar_3-1679480105033.png

     

    [Here outputs is the dynamic variable from compose 2 action where our input text is present]

     

    Now use below function to get the hh:mm component from the notification time text

    Nived_Nambiar_4-1679480186676.png

     

    formatDateTime(replace(replace(replace(slice(outputs('Compose_2'),outputs('Find_text_position:_Notiifcation_Time')?['body'],outputs('Find_text_position')?['body']),'Notification time : ',''),'"',''),',',''),'hh:mm')
     
    3. Next step is to find the aaa word 
       3a. for that find the position of word SourceId: rds: from input text using the Find text position
    Nived_Nambiar_5-1679480312627.png

     

      3b. Find the word aaaaa using the below function

    Nived_Nambiar_6-1679480341987.png

     

    split(slice(outputs('Compose_2'),add(outputs('Find_text_position_2_-_SourceId:_rds:')?['body'],length('SourceId: rds:'))),'-')?[0]
     
    Results obtained: 
    Notification Time: 
    Nived_Nambiar_7-1679480398664.png

     

     

    Source id rds: 

    Nived_Nambiar_8-1679480423506.png

     

     

    Mark it as solution if this helps in solving your query

     

      
  • newbieguy Profile Picture
    29 on at

    @Nived_Nambiar 

     

    I will try it later to see on my flow.

     

    On the same note, can this be done with the compose function instead? The reason for me asking is that there are emails with the same content daily.

  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    So you are trying to say, whether the find text position and all can be done via expressions instead of using action ?

  • newbieguy Profile Picture
    29 on at

    Yes. Cause I am getting notifications daily and would like it be more maintenance free.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 286

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard