Skip to main content

Notifications

Power Automate - Building Flows
Suggested answer

Incorrect formatting of MS Form response

Posted on by 8
We are trying to use Power Automate to raise a ticket in JIRA using the values in MS Forms response. We are using the HTTP Connector and utilizing JIRA REST API to do the same.
 
One of the fields in the MS Form is a "Multi-select" and we tried to map this to a custom field in JIRA (also multi-select), and the payload structure is as expected by JIRA. However, the response from the MS Form has some characters which are not accepted by JIRA. I have tried split, replace functions as well but the issue is still there.
This is the raw output body of the response from the form.
"body": {
        "responder": "abc@abc.com",
        "submitDate": "11/4/2024 3:09:59 PM",
        "r411ed29bec5b4f6e962b2ece0a14d6ac": "",
        "r5af2a2d9d4c94dddb4cff8ce09c1f171": "test",
        "r29c673c0223340659c93089e699c203b": "test",
        "r9eb31da20fa5487dbd01410d8524f5d2": "[\"value1\",\"value2\"]",
        "r367f2f7858264d689c0da1447ebb515a": "ABC",
        "r297efb80d36d4dd3a6db1f2ae74fa647": "Test CoA Field"
    }
 
 
 
This is the payload created dynamically.
"customfield_xxxxxx": [
      {
        "value": "\"value1\""
      },
	  {
        "value": "\"value2\""
      }
    ]
 
However, JIRA expects this in the below format.
"customfield_xxxxxx": [
      {
        "value": "value1"
      },
	  {
        "value": "value2"
      }
    ]
 
Any guidance from the community would be appreciated.
 
  • AM-04111848-0 Profile Picture
    AM-04111848-0 8 on at
    Incorrect formatting of MS Form response
    I managed to get the response in the right format. 
     
    Thanks for the help.
  • AM-04111848-0 Profile Picture
    AM-04111848-0 8 on at
    Incorrect formatting of MS Form response
    Hi Expiscornovus, thanks for the response.
    However, I see the below response after implementing the function as suggested. Could you please advise.
     
  • Suggested answer
    Expiscornovus Profile Picture
    Expiscornovus 30,623 on at
    Incorrect formatting of MS Form response
    You can use a Select action to convert it to the correct format. In the from you can use a json function to convert the string array value to an array. In the Map you can add the value key.
     
    Below is an example
     
    From field
    json(outputs('Get_response_details')?['body/r9eb31da20fa5487dbd01410d8524f5d2'])
    In the key column of the Map field use value. 
     
    In the value column of the Map field use
    item()
     
     
    The test result
     

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,246

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,884

Leaderboard