Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Send email with pre-submitted Form Details when Planner Task is completed

(0) ShareShare
ReportReport
Posted on by

I can see how to send an email when a task is completed, but I also want to include some of the original MS Form details in the email from the completed task. I'm struggling how to do this, can anyone help?

  • Barking_Mad1 Profile Picture
    on at
    Re: Send email with pre-submitted Form Details when Planner Task is completed

    Hi,

     

    I've come back to this after being busy with my usual work and hit a couple of problems.....

     

    1) Not all of the dynamic field names are available when I select 'Send an Email (V2)' and look at the list.

     

    2) I can choose the ones that are available in the list and place them in the email, but then when the flow runs the email appears without the relevant fields (ie they're just blank)

     

    Any suggestions?

  • Barking_Mad1 Profile Picture
    on at
    Re: Send email with pre-submitted Form Details when Planner Task is completed

    Thank you so much for the help, that is working perfectly! 

  • Verified answer
    v-yujincui-msft Profile Picture
    on at
    Re: Send email with pre-submitted Form Details when Planner Task is completed

    Hi @Barking_Mad1 ,

     

    Based on the sample title you provided, this expression should work.

    In addition, you could try nesting a replace() function on the original expression to remove extra spaces.

    vyujincuimsft_1-1658387595997.png

    replace(last(split(triggerOutputs()?['body/title'],'-')),' ','')

    vyujincuimsft_2-1658387684903.png

     

    Best Regards,
    Charlie Choi

  • Barking_Mad1 Profile Picture
    on at
    Re: Send email with pre-submitted Form Details when Planner Task is completed

    Hi,

     

    Thanks for the reply and sorry for the delay in getting back to you.

     

    I think this will work, the only issue I have is that the flow that creates the task, creates different planner tasks depending on the details entered in the MS Form. However thankfully all the 'Create a Task' options do so with the same Title (so I think this should be ok?):

     

    'First Name' 'Surname' | 'Programme' | 'Cohort' - 'Response ID'

     

    (they are divided by the '|' symbol)

    However I'm not sure how I amend this in regard to the expression you wrote out below, any chance you could advise?

     

    last(split(triggerOutputs()?['body/title'],'-'))

     

  • v-yujincui-msft Profile Picture
    on at
    Re: Send email with pre-submitted Form Details when Planner Task is completed

    Hi @Barking_Mad1 ,

     

    I guess you have two Flows, one to create a Planner Task based on the MS Forms' response, and the other to get the MS Forms' response details and send the mail when the task is complete. If so, you need to save the Response Id to the created Planner Task.

     

    Flow 1:

    I saved the Response Id to the Task's Title and used "-" as the delimiter.

    vyujincuimsft_0-1658216133320.png

    vyujincuimsft_3-1658216729672.png

    Flow 2:

    Extract Response Id from Title using expression.

    last(split(triggerOutputs()?['body/title'],'-'))

    vyujincuimsft_2-1658216627165.png

    Result Screenshot:

    vyujincuimsft_1-1658216560606.png

     

     

     

    Best Regards,
    Charlie Choi

     

  • Barking_Mad1 Profile Picture
    on at
    Re: Send email with pre-submitted Form Details when Planner Task is completed

    Unfortunately, that's the problem it doesn't appear anywhere in the dynamic list when I go to type it in. 😞 I've tried over a couple of days in case it was a PA issue, but no luck. 

     

  • MarconettiMarco Profile Picture
    3,812 Super User 2024 Season 1 on at
    Re: Send email with pre-submitted Form Details when Planner Task is completed

    ok @Barking_Mad1 ,

    in your “Get response details” action you have to put the Reaponse Id” instead of the task Id.

     

    BR,

    Marco

  • Barking_Mad1 Profile Picture
    on at
    Re: Send email with pre-submitted Form Details when Planner Task is completed

    Hi Marco,

     

    Yes, because in the main flow where I handle it being received I can select it from the dynamic content.

     

    Barking_Mad1_1-1658139821699.png

     

     

     

     

  • MarconettiMarco Profile Picture
    3,812 Super User 2024 Season 1 on at
    Re: Send email with pre-submitted Form Details when Planner Task is completed

    Hello @Barking_Mad1 ,

    when you create the Planner task, are you storing also the Forms response Id?

     

    BR,

    Marco

  • Barking_Mad1 Profile Picture
    on at
    Re: Send email with pre-submitted Form Details when Planner Task is completed

    Hi,

     

    I know it's wrong, ( the get response details wont allow me to pick the Form, ID) but this is what I have. I cant work out how to get the correct form ID details. Maybe I should get them from the Excel document? Any help appreciated....

     

    Barking_Mad1_0-1658137893471.png

     

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May 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 >