
Note: It is possible to set this up in PowerApps so that it has to be entered when a user adds a datasource. You need to paste it as the default value in your file like so… The sig parameter is like an API key or a password. Note: For more detail on these parameters go and read the OpenAPI 2.0 standard and Microsoft’s documentation.
It tells PowerApps that the parameter is a string. So in effect, the above “required” condition is met, but PowerApps will not ask the user to enter it.
x-ms-visibility: this basically says “use the default value and don’t show the user”. PowerApps will not allow you to call this Flow without specifying this parameter required: States that this parameter MUST be passed. Please do not come to me for support if you have not checked this! default: This is the value to check!! If Flow is updated in future it is very likely this parameter will reflect it. All of the default flow parameters are in the query string. in: specifies whether this parameter is in the query string, header or body. name: The name of the parameter as it appears on the URL. Now for reference, each parameter section has: You will see it in the “parameters” subsection of the “post” section…eg
Note 3: Double check the sv, api-version and sp parameter sections.Īll of the parameters expected by the Flow are specified in the OpenAPI file. This is where the workflow ID goes… so from this: Note: The image below shows the port number shown (443), this no longer works so omit it altogether as shown in my 2 examples above.
Open the Swagger file and look for the section called “host”… Replace the section labelled with the URL from the flow Trigger I mentioned above. So let’s look at the Swagger File… Note 2: Host, basePath and Path Why? because this file is what PowerApps uses to construct a HTTP call to your flow. The bits in bold you will need to know, because they need to be added to the OpenAPI file. :443/workflows/ /triggers/manual/paths/invoke?api-version=&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig= In combination, the URL looks as follows with the important bits in bold… eg sig= PeZc-ljtjmJhsz00SD78YrwEohTqlUxpQuc95BQQuwU
A parameter called sig with a random string value. A parameter called sv with a value of 1.0 – eg &sv=1.0. A parameter called sp with an encoded value of “/triggers/manual/run” = eg sp=%2Ftriggers%2Fmanual%2Frun. A parameter called api-version with a (at the time of writing) value of “” – eg api-version=. A URL path of “/workflows/ /triggers/manual/paths/invoke” which that identifies your specific workflow ID. If we break the URL it down, you will see: Once you have done so, it will look like this: Note that the trigger states clearly “URL will be generated after save”, so the first thing to do is generate that URL… To do so, you have to use the following trigger. Note 1: This only works for a HTTP request trigger in Flowįlow is capable of being called like any other web service. Here I will simply annotate the file with some notes that will help you customise and extend it for your own purposes. In this post I am going to assume you have watched the video and understand the intent. To save you all much pain and suffering, here is a sample file that you can use to get started. #SWAGGER EDITOR WHAT IS A DATE HOW TO#
Ever since I posted a video on how to use Flow to upload photos to SharePoint from PowerApps, I get a lot of requests for help with the most mysterious bit – the swagger/openAPI file…