cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
nickjgill
Level: Powered On

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
Community Support Team
Community Support Team

Re: Content Type x-www-url-formencoded - Webhook

Hi @nickjgill,

 

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.
nickjgill
Level: Powered On

Re: Content Type x-www-url-formencoded - Webhook

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

 

Interlock
Level: Powered On

Re: Content Type x-www-url-formencoded - Webhook

Hi Nick,

 

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

 

Thanks,

Dave

nickjgill
Level: Powered On

Re: Content Type x-www-url-formencoded - Webhook

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

Interlock
Level: Powered On

Re: Content Type x-www-url-formencoded - Webhook

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,540)