I'm writing a flow to take a series of values and pass them to our ticketing API to create a new ticket in our system. The flow works except for one thing. Here is a sample JSON body that I'm passing:
{
"Ticket": {
"Name": "Test Ticket",
"TicketTypeName": "My Type",
"Severity": "My Severity",
"Status": "My Status",
"GroupName": "My Group",
"ProductName": "My Product",
"SupportCategory": "My Category",
"supportFunctionalArea": "My Area",
"AppliestoVersion": "My Version",
"Description": "This is a test",
"Tags": {
"Tag": {
"Value": "Tag1"
},
"Tag": {
"Value": "Tag2"
}
}
}
}
Notice how there are two tags within the main Tags section? This is the proper formatting of the request for our ticketing system's API. If I enter this body and save the flow, it saves fine, but, if I go back into it, the Tags section now looks like this:
{
"Ticket": {
"Name": "Test Ticket",
"TicketTypeName": "My Type",
"Severity": "My Severity",
"Status": "My Status",
"GroupName": "My Group",
"ProductName": "My Product",
"SupportCategory": "My Category",
"supportFunctionalArea": "My Area",
"AppliestoVersion": "My Version",
"Description": "This is a test",
"Tags": {
"Tag": {
"Value": "Tag2"
}
}
}
}
It lops off the first tag reference and only keeps the last. The flow runs fine, but indeed I end up with only one tag in my resulting ticket. I've tried working around this several ways. I tried creating the body as an object variable - it does the same thing in that in the object variable definition, it wipes out all but the last tag reference. I've also tried creating the body as a string variable and then passing that to the HTTP action (using the JSON function on the variable). In that case, the variable value indeed still retains my two tags even after saving the flow, but when the flow runs, it still results with only the last tag in the sequence being on the ticket.
I can confirm that the JSON body as I've written it is absolutely correct and works in other applications when making an API call. I can't think of any reason why it should excise everything but the last element in a nested object like that other than being a bug. Any advice is appreciated.