cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JohnC525
Regular Visitor

Prevent Flow from adding a Double Quote before and after a Object

I'm really struggling with a custom connection for Flow I've created due to the "object" type required by a customer.  I validated their swagger file.

 

Below is the particular "object" type in question:

"customFields": {
   "type": "object",
       "additionalProperties": {
          "type": "object"
}

 

 

If I send in the PUT the following:  customFields: { "22570" : "TEST"}

 

Then Flow adds double quotes before and after my brackets like so: customFields: "{ "22570" : "TEST"}"

 

Anyone have any thoughts on how I can get Flow to stop adding the double quotes?

 

Thanks in advance for any help someone can give me.

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @JohnC525,

 

Could you please share a screenshot of your flow's configuration?

Do you want to send in the PUT as an object ({ "22570" : "TEST"}) rather than a string ("{ "22570" : "TEST"}")?

 

If you want to send in the PUT as an object rather than a string, I think the Variables-> "Initialize variable" action could achieve your needs. You could consider take a try to Initialize an Object variable within your flow to store your input value.

 

I have made a test on my side and please take a try with the following workaround:

  • Add a proper trigger, here I use Flow Button trigger.
  • Add a Variables-> "Initialize variable" action, Name set to CustomFields, Type set to Object and Value set to following formula:
{
  "22570": "TEST"
}
  • Add a Compose action, Inputs set to following formula:
variables('CustomFields')

 

On your side, type the following formula to reference the Object variable value that you initialized within above step:

variables('VariableName')

Image reference:11.JPG

The flow works successfully as below:12.JPG

 

 

More details about using expressions within flow actions, please check the following article:

Use expressions in flow actions

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-xida-msft
Community Support
Community Support

Hi @JohnC525,

 

Could you please share a screenshot of your flow's configuration?

Do you want to send in the PUT as an object ({ "22570" : "TEST"}) rather than a string ("{ "22570" : "TEST"}")?

 

If you want to send in the PUT as an object rather than a string, I think the Variables-> "Initialize variable" action could achieve your needs. You could consider take a try to Initialize an Object variable within your flow to store your input value.

 

I have made a test on my side and please take a try with the following workaround:

  • Add a proper trigger, here I use Flow Button trigger.
  • Add a Variables-> "Initialize variable" action, Name set to CustomFields, Type set to Object and Value set to following formula:
{
  "22570": "TEST"
}
  • Add a Compose action, Inputs set to following formula:
variables('CustomFields')

 

On your side, type the following formula to reference the Object variable value that you initialized within above step:

variables('VariableName')

Image reference:11.JPG

The flow works successfully as below:12.JPG

 

 

More details about using expressions within flow actions, please check the following article:

Use expressions in flow actions

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Kris, to answer this question:  "Do you want to send in the PUT as an object ({ "22570" : "TEST"}) rather than a string ("{ "22570" : "TEST"}")?"

 

My answer is Yes.  That is what I am trying to do.  I'm scheduled to work no this tomorow (4/4/18) so I will try out what you described and see if it will work for me.

 

Thanks,

 

John.

Kris, Your solution worked perfectly.  Many Thanks!!!

This was very helpful, thanks.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,016)