Jump to content

Integration: Microsoft Flow


Recommended Posts

@DeadMeatGF

No current plans, but had a quick look shouldn't be too difficult to integrate with, it looks possible to use the integration node, Utilities -> Experimental -> HTTP Request to trigger a http Post to  Microsoft Flow endpoint and pass in the required data. 

https://flow.microsoft.com/en-us/blog/call-flow-restapi/

Kind Regards

Trevor Killick 

Link to comment
Share on other sites

@DeadMeatGF

Have you got Content Type set to application/json ?

You should only need to use HTTP Request as MS Flow doesn't support basic Auth they apparently attach and auth token to the URL that is exposed, also make sure the method is set to POST.

Screen Shot 2018-04-09 at 13.27.50.png

Kind Regards

Trevor Killick

Link to comment
Share on other sites

OK, so the Flow is working in Postman, but I'm still getting the same "unauthorised" return from Service Manager.5acb6b15d4224_Screenshot2018-04-0914_25_43.thumb.png.aca16bfde21c54fae06fe56260a64537.png

Any suggestions? I'm still assuming I'm doing something wrong somewhere :P

 

P.S. There's a typo in the node: Status Cose instead of Status Code.

Link to comment
Share on other sites

@DeadMeatGF

I am looking into this now the error thats returned is this:

"data": {
  "error": {
    "code": "DirectApiAuthorizationRequired",
    "message": "The request must be authenticated only by Shared Access scheme."
  }
}

I am still trying to work out the different between a request in PostMaster and one form the iBridge. 

Kind Regards

Trevor Killick

Link to comment
Share on other sites

@DeadMeatGF

Just to keep you updated i found the issue was the iBridge HTTP Request implementation is always trying to set HTTP Basic auth even if you do not want that, a fix is coming but i can't give any dates as yet. As soon as i know when the iBridge fix is going out i will let you know.

I will create a Integration method for Microsoft Flow to handle the error and success responses which should be more user friendly in the short term. 

In the long term it looks like we might want to directly integrate with MS Flow in the same way we have direct integration with MS Orchestrator, but thats not going to be in the next 90 days.

Kind Regards

Trevor Killick

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

@Keith

So @Steve Goldthorpe has done some investigation into this, the ability to integrate into Microsoft Flow and trigger still has not changed the custom HTTP action is the only way at the moment. Also at this point in time, it's not possible for us to publish a connector to MS Flow for easy to use integrations back into hornbill due to some technical constraints on what a connector can do, it might be possible to integrate into hornbill using custom HTTP actions in MS Flow not sure this is something Steve can provide an example of or not. 

Cleaner integration with MS Flow is still on the horizon but requires some pretty large changes our end so not something we are going to be able to solve in the short term.

Kind Regards

Trevor Killick

Link to comment
Share on other sites

  • 1 month later...

Hi @Keith,

Sorry, I must've missed this post. Getting Flow to fire API calls off to Hornbill is fairly trivial (albeit not very elegant) with the HTTP action. Following this up with a Parse JSON action containing the relevant schema means that you can read/use the API response too. It's not pretty, but it works...

Here's an example that will log an Incident in Service Manager, and how the HTTP and Parse JSON actions should be configured (with the instance name and API key hidden). This will make available the requestId, summary and warnings API output params available to the rest of your flow.

The XML for the XMLMC call needs to be manually added to the body of the POST action, with details (summary and description) being populated using inputs to the flow:

image.png

The JSON schema to parse the output of logIncident, as an example, is: 

{
    "type": "object",
    "properties": {
        "@@status": {
            "type": "boolean"
        },
        "params": {
            "type": "object",
            "properties": {
                "requestId": {
                    "type": "string"
                },
                "summary": {
                    "type": "string"
                },
                "warnings": {
                    "type": "string"
                }
            }
        },
        "flowCodeDebugState": {
            "type": "object",
            "properties": {
                "step": {
                    "type": "string"
                },
                "executionId": {
                    "type": "string"
                }
            }
        }
    }
}

Hope this helps,

Steve

Link to comment
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
 Share

×
×
  • Create New...