Hello,
I have an individual in my organization needing a report every month of where their site collection's storage is at. If possible, I'd like to set this up in Power Automate but I am not well versed in the nitty-gritty side of flow building to be able to come up with the solution myself.
Would anyone be able to show me a flow that would pull the storage metrics number and then send that in an email every month? It doesn't need to be in-depth or broken down to where all the data is going, I would literally just need the number of GBs currently being used at the time of each report. Something like:
Site Collection Storage Report: 10 out of 25 GB used
Thanks all!
Hello,
Thank you for such a detailed response. However, I am unable to use the HTTP request you have shown as I do not have the proper licensing for it within my organization and it's not as simple as just asking for the licensing, unfortunately.
Is there an alternative way of doing this, or would this be the only/best option?
Thank you for your time.
Hi @Becca_Hayes,
In that case you can use the getSharePointSiteUsageDetail of the Graph API.
That method can output a csv with those details.
Below is an example
1. Add a recurrence action, in this case once a month
2. Use for example a HTTP action
This does require setting up an Azure AD app with the proper permissions, in this case Reports.Read.All
Use the URI
https://graph.microsoft.com/v1.0/reports/getSharePointSiteUsageDetail(period='D30')
3. Add another HTTP action. Make sure it only run on the has failed event (via the Configure run after setting of the action). This is because the first HTTP will respond with a Redirect error with the download location of the csv
Use the expression below to use that download location
actions('HTTP')['outputs']['headers']['Location']
4. Use the content of that CSV to create a file in for example SharePoint, via the Create File action. The Body is used for the file content and I used the below for the unique file name
StorageDetails_@{utcNow('yyyyMM')}.csv
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.