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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Send survey with power automate with dynamically selecting surveys and templates

(0) ShareShare
ReportReport
Posted on by 745

Hi Guys,

How can we set the survey and Templates in Power automate like setting any other lookup values 

What to give in the field "The fields to send to WebMergesurbey.PNG"

i tried to set surveys and templates dynamically like any other lookups but it is giving error 
"

Newtonsoft.Json.JsonSerializationException: Required property 'EmailTemplateId' not found in JSON. Path '', line 1, position 98.\r\n   at Microsoft.Forms.Pro.ApiFacade.RequestHandlers.SendEmailsForFlowRequestHandler.GetDataFromQuery(HttpRequestContext requestContext)\r\n   at Microsoft.Forms.Pro.ApiFacade.RequestHandlers.SendEmailsForFlowRequestHandler.<ParseRequestData>d__12.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Forms.Pro.ApiFacade.RequestHandlers.SendEmailsForFlowRequestHandler.<DoValidate>d__11.MoveNext()


Thanks 

I have the same question (0)
  • Verified answer
    Welly Lee Profile Picture
    Microsoft Employee on at

    MMK Please use the following table/field to dynamically select survey and email template:

    7838.Flow.png

    When using dynamics property for survey, you will need to use webmerge to specify survey variables in JSON format. For example: "{"locale":"<LOCALE>","orgName":"<NAME>"}" where <LOCALE> and <NAME> is the variable value. 

    Please send us an email at customervoice@microsoft.com if you still experiencing issue. 

    Welly

  • MMK Profile Picture
    745 on at

    Hi @welly lee

    Thanks a lot for quick response that really worked well.

  • deeprime Profile Picture
    30 on at

    I am getting this error.

    {"ErrorMessage":"System.Exception: Form name is null\r\n   at Microsoft.Forms.Pro.ApiFacade.RequestHandlers.SendEmailsForFlowRequestHandler.<ParseRequestData>d__12.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Forms.Pro.ApiFacade.RequestHandlers.SendEmailsForFlowRequestHandler.<DoValidate>d__11.MoveNext()"}

    My input is

    {

       "host": {

           "connectionReferenceName": "shared_microsoftformspro",

           "operationId": "sendSurvey"

       },

       "parameters": {

           "to": "drm@xyz.com",

           "ProjectId": "d486a68f-5c03-4955-9064-7596dc4565d0",

           "FormId": "mNYAevvD_U21UFiVhv5gIZABYwonNOVEoiUixOl-VVdUNERITjZGTUdZRkUySExNUjgzRzFDTkdDWS4u",

           "EmailTemplateId": "ea42b20b-7304-48be-bc51-94a749500f58",

           "Regarding": "contact,1b145225-22d9-40e5-9331-8393ca06fe94",

           "RecipientInfo": "contact,1b145225-22d9-40e5-9331-8393ca06fe94",

           "firstName": "Dee",

           "lastName": "Met"

       }

    }

  • SPART_ Profile Picture
    25 on at

    pastedimage1619814717553v1.png

    It doesn't seem like this works with the out of the box Customer Voice App that is attached to dynamics.  The default flow causes the same error but I can't find the additional tables you have noted above.

    {"ErrorMessage":"System.Exception: Form name is null\r\n   at Microsoft.Forms.Pro.ApiFacade.RequestHandlers.SendEmailsForFlowRequestHandler.<ParseRequestData>d__12.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at

  • Suggested answer
    Sanjay Kasat Profile Picture
    Microsoft Employee on at

    Please reach out to customervoice@microsoft.com with details. We should be able to resolve the issue.

  • nksse Profile Picture
    43 on at

    Hi

    I've tried this approach and am getting odd failed errors when sending the survey.

    My survey has these personalisation variables:

    pastedimage1671465614937v1.png

    And here is the send survey node:

    pastedimage1671465704333v2.png

    I get this error:

    {
      "ErrorMessage""Microsoft.FormsPro.Shared.Common.InvalidFormIdException: Source array was not long enough. Check srcIndex and length, and the array's lower bounds. ---> System.ArgumentException: Source array was not long enough. Check srcIndex and length, and the array's lower bounds.\r\n   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)\r\n   at Microsoft.FormsPro.Shared.Common.FormIdEncoder.ExtractOrgIdAndAccountCode(String id, Guid& orgId, Guid& accountCode, String& tableId, Dictionary`2& moreInfo)\r\n   --- End of inner exception stack trace ---\r\n   at Microsoft.FormsPro.Shared.Common.FormIdEncoder.ExtractOrgIdAndAccountCode(String id, Guid& orgId, Guid& accountCode, String& tableId, Dictionary`2& moreInfo)\r\n   at Microsoft.FormsPro.Shared.Common.FormIdEncoder.ExtractOrgIdAndAccountCode(String formId, Guid& orgId, Guid& accountCode, String& tableId, OwnerType& ownerType)\r\n   at Microsoft.FormsPro.Shared.Common.FormIdEncoder.GetFormProperties(String formId)\r\n   at Microsoft.FormsPro.Shared.SurveyOwnershipStore.SurveyOwnerStorageHelper.<GetLatestFormIdAsync>d__4.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Forms.Pro.ApiFacade.Helpers.FormsApiHelper.<GetUrl>d__7.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at Microsoft.Forms.Pro.ApiFacade.Helpers.FormsApiHelper.<FetchForms>d__12.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Forms.Pro.ApiFacade.RequestHandlers.SendEmailsForFlowRequestHandler.<ParseRequestData>d__13.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Forms.Pro.ApiFacade.RequestHandlers.SendEmailsForFlowRequestHandler.<DoValidate>d__12.MoveNext()"
    }
    I even get that error if I remove all the personalisation data from the WebMerge field.
    Any help would be greatly appreciated!

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 Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 128 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 119

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans