Stop Limiting Yourself

This past weekend I spoke at an event in Raleigh, North Carolina. I’m pretty new to public speaking — at least, on a stage, with lighting, and music blasting as you head out on stage. It was also my…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




A better way to work with form data in Microsoft Flow triggers

Unfortunately, one of the first things I discovered was that in order to apply the handy schema templates for data binding, the Flow HTTP Request Trigger requires a content-type: application/json header to be sent with the request. Ninja Forms Web Hook requests always come bundled with a content-type: x-www-form-urlencoded header. Browsing around a bit in Google it looks like there are a few other tools or situations where this is the case as well. I won’t name names here.

Applying a schema to an HTTP Request Trigger requires a Content-Type: application/json header
Ninja Forms allows us to encode args as a JSON string, but that doesn’t change the content-type header of the webhook request.

So here’s where the magic happens. Instead of applying a content template/JSON schema in the HTTP Request trigger:

I renamed my Compose Action to “Convert Form Data to JSON” so I knew what it was doing.
This expression transforms the formData argument from Ninja Forms into a handy JSON object.
Output from the Compose Action should be a valid JSON object.
Apply your Schema/Data Binding Template to the JSON

This is my first Medium post ever, so let me know what you think or if you know of any shortcomings to this approach. So far, it has worked out really well for me!

Add a comment

Related posts:

Inclusive Education and Mental Health

In the last few months, Paraguayan and Colombian governments have announced their highest education budgets in years. With the 2030 Agenda for Sustainable Development in mind, both countries have…

How to Send a Broadcast in Manychat to 1 or Thousands of Facebook Subscribers

A broadcast is an automated message sent to your subscriber list. You can send content to your entire list, or to a segment of your subscribers. Here are some short steps for how you can do this if…

Friendship and its benefits

Friendship is defined as a personal relationship that is rooted in the concern, care, and wellness of another individual. There are plenty of people out there who tell you to go and make friend…