cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Content Type x-www-url-formencoded - Webhook

Hello,

 

I am trying to create a flow that will receive a webhook trigger from Wufoo forms and then create a sharepoint list entry from the form data. In wufoo I have enabled a webhook. In Flow I have added a Http Request trigger and have copied the url into the webhook section of Wufoo.

 

The data that is sent to Flow is of a content type x-www-url-formencoded and is given in a "body" object. I am lost on how to extract the data in the body into individual fields. Any ideas or suggestions?

 

Nick

5 REPLIES 5
v-xida-msft
Community Support
Community Support

Hi @Anonymous,

 

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

Do you want to extract the data from the "body" into a SharePoint list item?

 

If you want to extract the data from the "body" object, please and see if the following article would help in your scenario:

Other content type in Handle content types

 

I have made a test on my side and my flow's configuration as below:2.JPG

Note: Type the above WDL expression within Expression tab.

 

More details about the Workflow Definition Language (WDL) in Microsoft Flow, please check the following article:

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language

 

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.
Anonymous
Not applicable

Kris,

 

Thanks so much for your reply!

 

Here is a little bit of the background -

Goal: When a new Wufoo survey entry is submitted, create a Sharepoint List entry.

So far: I tried two routes.

  1. I created a custom connector in Flow to connect to the Wufoo api which can use json or xml. I constructed the url requests to use json. I have been able to use the api piece with the custom connector. Using this method I believe I would need to use a timer to trigger regular calls to check for new entries.
  2. Wufoo has a webhook piece which you can enter the URL in Wufoo of where to send the request to. My thought was that using this as the trigger for the flow would be better than using a timer. I was also thinking that in using this, I would then not even need to use the custom connector (although I'm proud of myself for successfully making the custom connector as a novice user). The webhook from Wufoo is sending the data as a content type of x-www-url-formencoded rather than json. I'm struggling to understand how to pull the data out of the body result that is being sent.

Here is the setup I have been using to test the flow until I figure out how to separate the fields.

  1. When HTTP Request is Received
  2. Compose
  3. Email

I found that if I put the whole body result from HTTP Request in the email it includes the whole package along with Key, Value pairs. This made me think that if I could extract it as some sort of array then I could identify the fields. I then found that I could use triggerFormDataValue('Name of Key here') to grab the value associate with the that particular key. There are about 20 key/value pairs so I was hoping to have some sort of function that could automatically grab the entire set of key/value pairs without needing to specify each individual one as I was also hoping to use this flow for other surveys which would use different key/value pairs.

 

Another option I was thinking is I could extract the ID of the survey entry using the FormDataValue piece from above and then use the custom connector to grab the entry for that survey. It seems like this would be a waste though since the data is already there, I just am struggling to format it correctly.

 

Nick

 

Hi Nick,

 

Did you ever resolve this?  I'm running against the same issue!

 

Thanks,

Dave

Anonymous
Not applicable

Hi Dave!

 

Yes. I did... sort of.

 

I ended up pulling the survey form id from the form encoded data and then submitted a new HTTP request to Wufoo to retrieve all the data I needed.

The issue was that the webhooks being sent from Wufoo are form encoded whereas the Wufoo API itself actually provides multiple methods of grabbing data.

Are you using Wufoo as well?

 

I'm happy to paste what I ended up doing. I'm just not at a spot currently where I can do so but am happy to either later today or tomorrow.

 

Nick

Thanks Nick.  In my case, the webhooks are being received from MailChimp, which also sends the data as x-www-url-formencoded rather than in JSON.  Your "triggerFormDataValue" idea is working for me though, and in my case it might be enough as I don't have so many individual items of data to parse out as you did.  I just wondered if there was a way of decoding the whole shebang in one go!

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,639)