cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Fredd
New Member

Parse x-www-form-urlencoded from HTTP POST

Hey

I am not the most advanced user but I want to receive an SMS via a HTTP request.
The problem I encounter is that the payload I get from the SMS provider is in x-www-form-urlencoded and not json. So how can I parse the payload to get it in dynamic content to handle into teams?

The flow I have started with:

Fredd_0-1643011964535.png

 

Payload example I get from provider. 
direction=incoming& id=sf8425555e5d8db61dda7a7b3f1b91bdb& from=%2B46706861004&to=%2B46706861020& created=2018-07-13T13%3A57%3A23.741000& message=Hello%20how%20are%20you%3F

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @Fredd ,

 

I did a sample for you.

vxiaochenmsft_0-1643177096601.png

vxiaochenmsft_1-1643177104520.png

split(decodeUriComponent(variables('var')),'&')
vxiaochenmsft_2-1643177128454.png
split(items('Apply_to_each'),'=')
{"@{trim(outputs('Compose_2')[0])}":"@{trim(outputs('Compose_2')[1])}"}
 
vxiaochenmsft_3-1643177166158.png
 

 

 

[
  {
    "direction": "incoming"
  },
  {
    "id": "sf8425555e5d8db61dda7a7b3f1b91bdb"
  },
  {
    "from": "+46706861004"
  },
  {
    "to": "+46706861020"
  },
  {
    "created": "2018-07-13T13:57:23.741000"
  },
  {
    "message": "Hello how are you?"
  }
]

 

 

// Besides, If you want to parse the Json, you could use 'Parse JSON' action.

 

Best Regards,

Wearsky

 

View solution in original post

2 REPLIES 2
v-xiaochen-msft
Community Support
Community Support

Hi @Fredd ,

 

I did a sample for you.

vxiaochenmsft_0-1643177096601.png

vxiaochenmsft_1-1643177104520.png

split(decodeUriComponent(variables('var')),'&')
vxiaochenmsft_2-1643177128454.png
split(items('Apply_to_each'),'=')
{"@{trim(outputs('Compose_2')[0])}":"@{trim(outputs('Compose_2')[1])}"}
 
vxiaochenmsft_3-1643177166158.png
 

 

 

[
  {
    "direction": "incoming"
  },
  {
    "id": "sf8425555e5d8db61dda7a7b3f1b91bdb"
  },
  {
    "from": "+46706861004"
  },
  {
    "to": "+46706861020"
  },
  {
    "created": "2018-07-13T13:57:23.741000"
  },
  {
    "message": "Hello how are you?"
  }
]

 

 

// Besides, If you want to parse the Json, you could use 'Parse JSON' action.

 

Best Regards,

Wearsky

 

Thanks a lot!

Helpful resources

Announcements
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,162)