SOLVED

Flow to notify external users at set time periods of changes to items in a SP library view

%3CLINGO-SUB%20id%3D%22lingo-sub-1230672%22%20slang%3D%22en-US%22%3EFlow%20to%20notify%20external%20users%20at%20set%20time%20periods%20of%20changes%20to%20items%20in%20a%20SP%20library%20view%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1230672%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20lot%20of%20external%20customers%20who%20need%20to%20be%20notified%20when%20a%20technical%20spec%20changes.%26nbsp%3B%20I%20am%20looking%20to%20store%20the%20documents%20in%20a%20SharePoint%20library%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERather%20then%20emailing%20every%20time%20a%20spec%20changes%2C%20it%20is%20possible%20to%3C%2FP%3E%3CUL%3E%3CLI%3EEmail%20customers%20listing%20all%20the%20documents%20(with%20a%20link)%20that%20have%20had%20changes%20made%20in%20the%20last%20fortnight%20(or%20whatever%20time%20period%20is%20specified%3F%3C%2FLI%3E%3C%2FUL%3E%3CP%3EMany%20thanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1230672%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Flow%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1231925%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20notify%20external%20users%20at%20set%20time%20periods%20of%20changes%20to%20items%20in%20a%20SP%20library%20view%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1231925%22%20slang%3D%22en-US%22%3EHi%2C%3CBR%20%2F%3EThere%20are%202%20ways%20you%20can%20get%20the%20information%20about%20the%20changes%20made%20to%20the%20list%20or%20library.%3CBR%20%2F%3E1.%20Using%20Graph%20API%3CBR%20%2F%3EUse%20the%20below%20URL%20on%20the%20details%20of%20the%20Graph%20API%20method%20that%20you%20can%20leverage%20to%20get%20the%20item%20analytics%20and%20based%20on%20that%20you%20can%20trigger%20the%20email%2C%20but%20this%20method%20has%20to%20be%20executed%20on%20all%20the%20documents%20and%20that%20is%20very%20complicated.%3CBR%20%2F%3E2.%20Try%20to%20create%20a%20separate%20list%20to%20store%20the%20high%20level%20info%20when%20a%20document%20is%20modified%20or%20created%20new.%20You%20can%20trigger%20the%20flow%20scheduled%20at%20night%20by%20retrieving%20the%20information%20from%20the%20changes%20list%20and%20send%20it%20to%20the%20external%20user.%3CBR%20%2F%3E%3CBR%20%2F%3EHope%20it%20helps%2C%20please%20like%20it%20or%20mark%20it%20as%20a%20solution%20if%20it%20resolves%20ur%20clarification%20or%20issue%3CBR%20%2F%3E-Sudharsan%20K...%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1232227%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20notify%20external%20users%20at%20set%20time%20periods%20of%20changes%20to%20items%20in%20a%20SP%20library%20view%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1232227%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F474080%22%20target%3D%22_blank%22%3E%40marionkd%3C%2FA%3E%26nbsp%3BNeither%20of%20those%20methods%20is%20necessary%2C%20it%20can%20all%20be%20done%20within%20a%20single%20simple%20flow%20that%20looks%20at%20the%20existing%20library.%20I%20will%20post%20the%20method%20shortly.%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%233366FF%22%3EMicrosoft%20Power%20Automate%20Community%20Super%20User%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1232309%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20notify%20external%20users%20at%20set%20time%20periods%20of%20changes%20to%20items%20in%20a%20SP%20library%20view%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1232309%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F474080%22%20target%3D%22_blank%22%3E%40marionkd%3C%2FA%3E%26nbsp%3B%20the%20flow%20to%20achieve%20what%20you're%20trying%20to%20do%20is%20shown%20below.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20trigger%20is%20a%20%3CEM%3ERecurrence%20schedule%3C%2FEM%3E%20set%20to%20run%20every%202%20weeks%20on%20a%20Friday%20at%201500%20hours.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20first%20action%20is%20a%20%3CEM%3EGet%20past%20time%3C%2FEM%3E%20and%20I've%20set%20that%20to%2014%20days.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%220-trigger-past.png%22%20style%3D%22width%3A%20579px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F177366i65C551A11E856767%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%220-trigger-past.png%22%20alt%3D%220-trigger-past.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENext%2C%20add%20a%20SharePoint%20%3CEM%3EGet%20files%20(properties%20only)%3C%2FEM%3E%20action%20and%20add%20a%20filter%20query%20of%20%3CSTRONG%3EModified%20ge%20'%7BPast%20time%7D'%3C%2FSTRONG%3E.%20ge%20means%20greater%20than%20or%20equal%20to%2C%20so%20it's%20only%20going%20to%20bring%20back%20items%20from%20the%20library%20modified%20within%20the%20last%2014%20days.%20Make%20sure%20you%20wrap%20the%20%3CEM%3EPast%20time%3C%2FEM%3E%20expression%20in%20single%20quotes.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%221-getFiles.png%22%20style%3D%22width%3A%20593px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F177374iD35872C6FB5716B2%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%221-getFiles.png%22%20alt%3D%221-getFiles.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENext%20we%20create%20the%20table.%20Start%20with%20a%20%3CEM%3ESelect%3C%2FEM%3E%20control%2C%20select%20value%20from%20the%20dynamic%20content%20and%20then%20add%20in%20the%20columns%20you%20want%20in%20your%20table.%20Then%20add%20a%20%3CEM%3ECreate%20HTML%20table%3C%2FEM%3E%20using%20the%20output%20of%20the%20Select.%20Finally%20we%20apply%20a%20bit%20of%20styling%20to%20the%20table%20using%20a%20%3CEM%3ECompose%3C%2FEM%3E%20control%20and%20adding%20in%20a%20%3CSTRONG%3Ereplace%3C%2FSTRONG%3E%20expression%3A%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSTRONG%3Ereplace(body('Create_HTML_table')%2C'%3C%2FSTRONG%3E%3CTABLE%3E'%2C'%3CTABLE%20border%3D%22%26quot%3B1%26quot%3B%22%20bgcolor%3D%22%26quot%3BFDFFBE%26quot%3B%22%3E')%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%222-table.png%22%20style%3D%22width%3A%20579px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F177368iFA407FE7848E0F6F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%222-table.png%22%20alt%3D%222-table.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFinally%20add%20a%20%3CEM%3ESend%20an%20Email%20(v2)%3C%2FEM%3E%20action%20and%20in%20the%20body%20of%20the%20email%20just%20select%20from%20the%20dynamic%20content%20the%20output%20of%20the%20Compose%20where%20you%20applied%20the%20formatting.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%223-sendEmail.png%22%20style%3D%22width%3A%20580px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F177369i618D5AFDB874FB3F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%223-sendEmail.png%22%20alt%3D%223-sendEmail.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20result%20of%20the%20email%20looks%20like%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%224-emailResult.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%2F177375i826AFA112BC06631%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%224-emailResult.png%22%20alt%3D%224-emailResult.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps%20but%20come%20back%20with%20any%20questions.%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%233366FF%22%3EMicrosoft%20Power%20Automate%20Community%20Super%20User%3C%2FFONT%3E%3C%2FP%3E%3C%2FTABLE%3E%3C%2FTABLE%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1233600%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20notify%20external%20users%20at%20set%20time%20periods%20of%20changes%20to%20items%20in%20a%20SP%20library%20view%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1233600%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%3BThank%20you%20so%20much%20for%20this.%26nbsp%3B%20Cannot%20wait%20to%20test%20it%20out.%26nbsp%3B%20Your%20help%20is%20much%20appreciated%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

I have a lot of external customers who need to be notified when a technical spec changes.  I am looking to store the documents in a SharePoint library 

 

Rather then emailing every time a spec changes, it is possible to

  • Email customers listing all the documents (with a link) that have had changes made in the last fortnight (or whatever time period is specified?

Many thanks

 

4 Replies
Hi,
There are 2 ways you can get the information about the changes made to the list or library.
1. Using Graph API
Use the below URL on the details of the Graph API method that you can leverage to get the item analytics and based on that you can trigger the email, but this method has to be executed on all the documents and that is very complicated.
2. Try to create a separate list to store the high level info when a document is modified or created new. You can trigger the flow scheduled at night by retrieving the information from the changes list and send it to the external user.

Hope it helps, please like it or mark it as a solution if it resolves ur clarification or issue
-Sudharsan K...

@marionkd Neither of those methods is necessary, it can all be done within a single simple flow that looks at the existing library. I will post the method shortly.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

best response confirmed by marionkd (Occasional Contributor)
Solution

@marionkd  the flow to achieve what you're trying to do is shown below.

 

The trigger is a Recurrence schedule set to run every 2 weeks on a Friday at 1500 hours.

 

The first action is a Get past time and I've set that to 14 days.

0-trigger-past.png

 

Next, add a SharePoint Get files (properties only) action and add a filter query of Modified ge '{Past time}'. ge means greater than or equal to, so it's only going to bring back items from the library modified within the last 14 days. Make sure you wrap the Past time expression in single quotes.

 

1-getFiles.png

 

Next we create the table. Start with a Select control, select value from the dynamic content and then add in the columns you want in your table. Then add a Create HTML table using the output of the Select. Finally we apply a bit of styling to the table using a Compose control and adding in a replace expression:

replace(body('Create_HTML_table'),'<table>','<table border="1" bgcolor="FDFFBE">')

 

2-table.png

 

Finally add a Send an Email (v2) action and in the body of the email just select from the dynamic content the output of the Compose where you applied the formatting.

 

3-sendEmail.png

 

The result of the email looks like this:

 

4-emailResult.png

 

Hope that helps but come back with any questions.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

@RobElliott Thank you so much for this.  Cannot wait to test it out.  Your help is much appreciated