Forum Discussion
Generating an email with Power Automate using data from MS Forms
I'm trying to generate an email based on responses to a Microsoft Form. To do that, we've been using Power Automate. But I don't know coding, so I'm struggling with the "if this, then do this or if this then do this."
I'm trying to add content based on the response to a form question. This is what I have & Power Automate doesn't like it. If possible, I want the No response to result in a blank.
if(equals(outputs('Get_response_details')?['body/r4dc7982d2d21447595928fe605d196a9'],'Yes','SNAP',' ')
It also doesn't like this:
if(equals(@{outputs('Get_response_details')?['body/rfa090ef4e8d14bf187d32d6ee29bce37']},Yes),'What is needed to complete the benefit request? @{outputs('Get_response_details')?['body/r6671aa148c974fbfb399bdf3c334f4a4']}',' ')
- Rob_ElliottBronze Contributor
SKelsoNeal you don't need to do it with any coding at all. After the get response details action add a condition and add the follow-on actions as appropriate into the green if yes or red if no channels.
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP UK (and classic 1967 Morris Traveller driver)- SKelsoNealCopper Contributor
I have send an email as the action to the form submission. Within the email, I need the conditional info. If the answer is YES, then this info needs to be included in the email, if NO then the info is skipped.
Can the condition be used within the body of the email? If not, will the email continue after the condition? If so, what action would it be under for the condition response?
- Rob_ElliottBronze Contributor
SKelsoNeal the easiest way is to have 2 versions of the email, one in the green if yes channel and 1 in the red if no channel.