creating approver flow using MS flow in sharepoint online

%3CLINGO-SUB%20id%3D%22lingo-sub-1562810%22%20slang%3D%22en-US%22%3Ecreating%20approver%20flow%20using%20MS%20flow%20in%20sharepoint%20online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1562810%22%20slang%3D%22en-US%22%3E%3CP%3EI%20want%20to%20create%20approver%20flow%20for%20my%20library%20using%20MS%20flow-power%20automate.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethis%20approver%20flow%20I%20want%20to%20trigger%20manually.%3C%2FP%3E%3CP%3Ethis%20is%20same%20as%20sharepoint%202010%20flow%20where%20user%20can%20trigger%20approver%20workflow%20manually.%3C%2FP%3E%3CP%3Ehow%20I%20can%20do%20this%20with%20MS%20FLow.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eactually%20I%20have%20migrated%20site%20from%20sharepoint%202010%20to%20sharepoint%20online%20and%20sharepoint%202010%20approver%20workflow%20is%20migrated%2C%20but%20Microsoft%20going%20to%20stop%20sharepoint%202010%20support%20from%20November%202020%2C%20that's%20why%20I%20want%20to%20re-write%20this%20approver%20flow%20with%20MS%20flow.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1562810%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDocument%20Library%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1566985%22%20slang%3D%22en-US%22%3ERe%3A%20creating%20approver%20flow%20using%20MS%20flow%20in%20sharepoint%20online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1566985%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F670519%22%20target%3D%22_blank%22%3E%40rautchetan27%3C%2FA%3E%26nbsp%3B%20Here%20You%20will%20hopefully%20find%20the%20answer%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpower-automate%2Fmodern-approvals%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpower-automate%2Fmodern-approvals%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOtherwise%20You%20might%20be%20interested%20in%20the%20%22Request%20Sign-off%22%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fflow.microsoft.com%2Fen-us%2Fblog%2Frequest-sign-off-four-connectors%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fflow.microsoft.com%2Fen-us%2Fblog%2Frequest-sign-off-four-connectors%2F%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERegards%2C%20Magnus%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1567205%22%20slang%3D%22en-US%22%3ERe%3A%20creating%20approver%20flow%20using%20MS%20flow%20in%20sharepoint%20online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1567205%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F670519%22%20target%3D%22_blank%22%3E%40rautchetan27%3C%2FA%3E%26nbsp%3Bas%20you%20want%20to%20trigger%20the%20approval%20manually%20you%20can%20put%20a%20JSON-formatted%20button%20on%20the%20item%20in%20your%20list%20or%20library.%20For%20the%20button%20you'll%20need%20a%20single%20line%20of%20text%20column.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22approvalButton.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F210379i2009E54F590DD5A0%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22approvalButton.png%22%20alt%3D%22approvalButton.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20JSON%20code%20in%20my%20example%20is%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3E%7B%0A%20%20%22%24schema%22%3A%20%22https%3A%2F%2Fdeveloper.microsoft.com%2Fjson-schemas%2Fsp%2Fv2%2Fcolumn-formatting.schema.json%22%2C%0A%20%20%22elmType%22%3A%20%22button%22%2C%0A%20%20%22txtContent%22%3A%20%22Request%20approval%22%2C%0A%20%20%22customRowAction%22%3A%20%7B%0A%20%20%20%20%22action%22%3A%20%22executeFlow%22%2C%0A%20%20%20%20%22actionParams%22%3A%20%22%7B%5C%22id%5C%22%3A%20%5C%22355cfb96-ddc5-4911-956c-9705f7557ee5%5C%22%7D%22%0A%20%20%7D%2C%0A%20%20%22style%22%3A%20%7B%0A%20%20%20%20%22background-color%22%3A%20%22%23468259%22%2C%0A%20%20%20%20%22color%22%3A%20%22white%22%2C%0A%20%20%20%20%22visibility%22%3A%20%22%3Dif((%5B%24Status%5D%20%3D%3D%20'Completed')%2C'hidden'%2C'visible')%22%0A%20%20%7D%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3CBR%20%2F%3EYou'll%20need%20to%20change%20ID%20of%20the%20flow%20to%20your%20flow's%20ID.%20IN%20the%20flow%20the%20trigger%20is%20a%20SharePoint%3CEM%3E%20For%20a%20selected%20item%3C%2FEM%3E.%20And%20you%20might%20not%20need%20the%20conditional%20visibility%20so%20could%20remove%20that%20line%20and%20the%20comma%20on%20the%20previous%20line.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20you%20click%20the%20button%20you'll%20see%20a%20panel%20on%20the%20right%20of%20the%20screen%20asking%20you%20(the%20first%20time)%20to%20confirm%20the%20connections%20and%20(every%20time)%20to%20run%20the%20flow.%20The%20flow%20will%20then%20trigger%20and%20do%20whatever%20approval%20actions%20you%20have%20put%20in%20the%20flow.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERob%3CBR%20%2F%3ELos%20Gallardos%3CBR%20%2F%3E%3CFONT%20size%3D%222%22%20color%3D%22%23006400%22%3EMicrosoft%20Power%20Automate%20Community%20Super%20User.%3CBR%20%2F%3EIf%20I've%20answered%20your%20question%20or%20solved%20your%20problem%2C%20please%20mark%20this%20question%20as%20answered.%20This%20helps%20others%20who%20have%20the%20same%20question%20find%20a%20solution%20quickly%20via%20the%20forum%20search.%20If%20you%20liked%20my%20response%2C%20please%20consider%20giving%20it%20a%20thumbs%20up.%20Thanks.%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1570868%22%20slang%3D%22en-US%22%3ERe%3A%20creating%20approver%20flow%20using%20MS%20flow%20in%20sharepoint%20online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1570868%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F174092%22%20target%3D%22_blank%22%3E%40Rob%20Elliott%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20new%20in%20MS%20flow%2C%20PowerApps%2C%20can%20you%20help%20me%20where%20to%20find%20option%20to%20write%20that%20JSON%20Code%2C%3C%2FP%3E%3CP%3Ewhere%20I%20need%20to%20click%20so%20I%20can%20get%20window%20to%20write%20JSON%20Code.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1571082%22%20slang%3D%22en-US%22%3ERe%3A%20creating%20approver%20flow%20using%20MS%20flow%20in%20sharepoint%20online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1571082%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F670519%22%20target%3D%22_blank%22%3E%40rautchetan27%3C%2FA%3E%26nbsp%3Bclick%20the%20column%20header%20then%20select%20%3CSTRONG%3EColumn%20settings%3C%2FSTRONG%3E%2C%20then%20click%20%3CSTRONG%3EFormat%20this%20column%3C%2FSTRONG%3E%20and%20in%20the%20panel%20that%20appears%20select%20%3CSTRONG%3EAdvanced%20mode%3C%2FSTRONG%3E%20and%20paste%20the%20JSON%20code%20there.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERob%3CBR%20%2F%3ELos%20Gallardos%3CBR%20%2F%3E%3CFONT%20size%3D%222%22%20color%3D%22%23333399%22%3EMicrosoft%20Power%20Automate%20Community%20Super%20User%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

I want to create approver flow for my library using MS flow-power automate.

 

this approver flow I want to trigger manually.

this is same as sharepoint 2010 flow where user can trigger approver workflow manually.

how I can do this with MS FLow.

 

actually I have migrated site from sharepoint 2010 to sharepoint online and sharepoint 2010 approver workflow is migrated, but Microsoft going to stop sharepoint 2010 support from November 2020, that's why I want to re-write this approver flow with MS flow.

 

4 Replies

@rautchetan27  Here You will hopefully find the answer: https://docs.microsoft.com/en-us/power-automate/modern-approvals

 

Otherwise You might be interested in the "Request Sign-off": https://flow.microsoft.com/en-us/blog/request-sign-off-four-connectors/

 

Regards, Magnus

@rautchetan27 as you want to trigger the approval manually you can put a JSON-formatted button on the item in your list or library. For the button you'll need a single line of text column.

approvalButton.png

 

The JSON code in my example is:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "button",
  "txtContent": "Request approval",
  "customRowAction": {
    "action": "executeFlow",
    "actionParams": "{\"id\": \"355cfb96-ddc5-4911-956c-9705f7557ee5\"}"
  },
  "style": {
    "background-color": "#468259",
    "color": "white",
    "visibility": "=if(([$Status] == 'Completed'),'hidden','visible')"
  }
}


You'll need to change ID of the flow to your flow's ID. IN the flow the trigger is a SharePoint For a selected item. And you might not need the conditional visibility so could remove that line and the comma on the previous line.

 

When you click the button you'll see a panel on the right of the screen asking you (the first time) to confirm the connections and (every time) to run the flow. The flow will then trigger and do whatever approval actions you have put in the flow.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User.
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

 

@RobElliott 

 

I am new in MS flow, PowerApps, can you help me where to find option to write that JSON Code,

where I need to click so I can get window to write JSON Code.

@rautchetan27 click the column header then select Column settings, then click Format this column and in the panel that appears select Advanced mode and paste the JSON code there.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User