cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
whatupe
Advocate II
Advocate II

Calling Instant Flow from SharePoint formatted column

I am trying to make a call to a Power Automate Instant Flow from a formatted column. I'm taking my inspiration from this article - https://www.inspiribytes.com/power-automate/deploying-a-single-flow-to-multiple-sharepoint-libraries...

I set up the SharePoint column with the json:

 

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"customRowAction": {
"action": "executeFlow",
"actionParams": "{\"id\": \"0aa2105b-755e-4017-aac8-b1b823ea96d1\"}"
},
"attributes": {
"class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover"
},
"style": {
"border": "none",
"background-color": "transparent",
"cursor": "pointer"
},
"children": [
{
"elmType": "span",
"attributes": {
"iconName": "Flow"
},
"style": {
"padding-right": "6px"
}
},
{
"elmType": "span",
"txtContent": "Start Approval"
}
]
}

 

 

 

I created my Instant Flow, and noted the ID in the URL and changed the JSON in the formatted column to match.

 

When I click the button, I see a message that says "Setting Up" - clicking it, it just says "Waiting"

 

When I review the Developer Console, I see the following message:

 

POST https://prod-176.westus.logic.azure.com/workflows/b294beca8451414787bae052f8be6181/triggers/manual/p... 400

 

So I'm getting a Bad Request, but I cannot figure out why. There doesn't appear to be any other parameters that I should be setting other than the ID of the workflow.

 

6 REPLIES 6
DamoBird365
Microsoft
Microsoft

Hi @whatupe 

 

What trigger are you using?  Is it for a selected file?

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

@DamoBird365 It is not - it is "Manually Trigger a Flow" button.  The reason I do not want to use "for a selected file", as described in the article that I referenced, is that I want this to be a generic process that can be consumed by multiple libraries.  The "for a selected file" trigger can only be used for a single library, and therefore requires duplication of the workflow.

Hi @whatupe 

 

I believe that is why it is failing as it requires the for a select file or item.

 

However, you might want to explore this article 

 

https://www.powernimbus.com/2021/03/reuse-flows-connected-to-sharepoint-lists-working-again/

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

 

 

whatupe
Advocate II
Advocate II

Interesting - let me try this tonight, and I'll let you know if it works.

whatupe
Advocate II
Advocate II

@DamoBird365 - this looks like it's going to work, although not quite in the way the article describes.  But "for a selected document" actually triggers, which is progress.  Much appreciated!

For future viewers - the "for a selected document" can be made generic, it really will accept any call from a button described in the article I posted.  Then it looks like you can just use itemUrl and get your document properties using the Site and Document ID.  In my case, the library will always be "Documents", but the itemURL also has a "ListId" query string parameter that can be leveraged.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,677)