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 / extracting parts of em...
Power Automate
Answered

extracting parts of email address for planner

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I made a flow that creates a planner task from an email and I would like to have parts of the email address in my task title.

 

wegewgewg.PNG

For example, this is the email address: "name@whatever.com"

Currently my Task title would look like this: "name@whatever.com: Subject"

But I'd like it to look like this: "name: Subject"

 

Any ideas on how I could do that?

Categories:
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi!

     

    Step1 : You can create a new variable of type integer (let us name it as test) and assign it with the expression : 

    indexOf(body('Get_email')?['From'], '@')
    Step2 : Create another variable of type string and assign it with the expression : 
    substring(body('Get_email')?['From'],0,variables('test'))
     
    you can put the step 2 directly in the planner title as an expression input. 
     
    Please mark this as a solution if it helps you/ answered your question. 
     
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you for your response!

     

    dfhdfhdfh.PNG

     

    It says: "The template validation failed: 'The action(s) 'Get_email' referenced by 'inputs' in action 'Initialize_variable' are not defined in the template.'."

     

    How do I know the correct termination for "when a new email arrives"?

    {
     "inputs": {
     "host": {
     "connection": {
     "name": "@parameters('$connections')['shared_office365']['connectionId']"
     }
     },
     "method": "get",
     "path": "/Mail/OnNewEmail",
     "queries": {
     "folderPath": "Inbox",
     "importance": "Any",
     "fetchOnlyWithAttachment": true,
     "includeAttachments": true
     },
     "authentication": "@parameters('$authentication')"
     },
     "recurrence": {
     "interval": 5,
     "frequency": "Minute"
     },
     "metadata": {
     "flowSystemMetadata": {
     "swaggerOperationId": "OnNewEmail"
     }
     },
     "splitOn": "@triggerBody()?['value']"
    }

     

  • Verified answer
    gamoraes Profile Picture
    1,040 on at

    Hi @Anonymous 

     

    Just change the From with this expression:Flow 1.jpg                                                                                         \/

    Flow 3.jpg

     

    Where the expression is

    first(split(triggerBody()?['From'],'@'))

    And see the magic.

     

    Happy Flowing!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @gamoraes wrote:

    Hi @Anonymous 

     

    Just change the From with this expression:Flow 1.jpg                                                                                         \/

    Flow 3.jpg

     

    Where the expression is

    first(split(triggerBody()?['From'],'@'))

    And see the magic.

     

    Happy Flowing!


    Thank you so much! Smiley Happy it did the trick

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 275 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 235

#3
David_MA Profile Picture

David_MA 178 Super User 2026 Season 2

Last 30 days Overall leaderboard