Jump to content
samwoo

Webhooks and Microsoft Flow

Recommended Posts

Hello,

Has anyone managed to get the Webhooks working with Microsoft Flow in Office 365?

In Hornbill, as a test I am using the Event source Entity : Asset : Updated with the URL pointing to HTTP request in a custom flow on Office 365.

In Microsoft Flow, I have an Action Trigger  set up, which auto generates a HTTP POST URL after creation (which is what I copied to the Webhook event in Hornbill)

I am assuming this is the correct Request Body JSON Schema to start with (in Microsoft Flow):

{
    "type": "object",
    "properties": {
        "record": {
            "type": "object",
            "properties": {
                "h_pk_asset_id": {
                    "type": "string"
                },
                "h_last_updated": {
                    "type": "string"
                },
                "h_owned_by": {
                    "type": "string"
                },
                "h_owned_by_name": {
                    "type": "string"
                }
            }
        }
    }
}

Following this Action Trigger, i have an action afterwards which should send an email to me with the above strings.

Whenever I update an asset in Hornbill, i keep getting the Webhook's 401 error in the Hornbill event log which I am assuming is because I don't have Authentication to connect to the flow in Microsoft Flow from Hornbill.

So I attempted to set up a Key to connect to the Office 365 and Microsoft Flow... but it wont let me connect to the Service (presumably because we have Multi-Factor Authentication set up, as well as Single-Sign on).

Can someone advise on how I might be able to go about doing this? I might be getting the wrong end of the stick here.

Many thanks,

Samuel

Share this post


Link to post
Share on other sites

Oh i forgot to mention that if I put a Hookbin URL (which is like Requestbin which seems to be down at the moment) in the Webhook URL, it works by showing me the details of the Asset that was updated.

(https://hookbin.com/bin/)

Share this post


Link to post
Share on other sites

@samwoo

HTTP Response 401 Unauthorised makes sense here, do you have any option to allow basic auth for office 365 and Microsoft Flow? The only authentication we support from an outgoing webhook is basic.

If not you are likely going to need some glue code to sit in the middle somewhere and accept the webhook even and then pass it off with some authentication over to Microsoft Flow. 

Kind Regards

Trevor Killick 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×