Delete a file or folder with Graph API

Ever needed to programmatically delete files or folders from SharePoint? Whether you’re enforcing data retention policies, cleaning up processed files, or simply keeping your document libraries tidy, the Microsoft Graph API combined with Power Automate makes it straightforward. In this post, I’ll walk you through every step — from obtaining the right IDs to making the DELETE call. Why Automate File Deletion? There are several reasons why one might want to delete a SharePoint file or folder via the Graph API using Power Automate. Firstly, automating deletion can help maintain the organization and cleanliness of a SharePoint site, especially when dealing with temporary or obsolete files. Secondly, it allows for the enforcement of data retention policies by programmatically removing files that are past their retention period. Thirdly, it can be used to streamline workflows by deleting files that have been processed, reducing clutter and potential confusion. ...

4 June 2024 · 5 min · DamoBird365

Export Power BI to Excel with Power Automate

If you’ve been using Apply to Each loops to export Power BI data into Excel, you know how painfully slow that can be. In this post, I’ll show you two much faster and more reliable methods — Graph API and Office Scripts — that will transform how you bulk-load data into Excel with Power Automate. Method 1: Using Graph API The first method involves using Graph API. It’s a premium licensed method that invokes an HTTP request to the Graph API. The Graph API requires the site ID, the file ID, and the dynamic range of the data. ...

17 January 2024 · 5 min · DamoBird365

How to setup an Azure Function to zip files

Ever needed to bundle multiple files into a single zip from Power Automate or Logic Apps? Creating zip files programmatically in the cloud can be tricky — there’s no built-in action for it. In this post, I’ll show you how to set up an Azure Function that accepts base64 file content for an array of files and returns a compressed zip file. You can then store it in Blob Storage, send it to SFTP, attach it to an email — wherever you need it. ...

4 January 2024 · 6 min · DamoBird365

Azure App Expiry Monitoring with Power Automate & Graph API

Have you ever had a service go down because an Azure App Registration secret expired without anyone noticing? Client secrets and key certificates come with expiration dates, and failing to renew them in time can lead to service disruptions and security vulnerabilities. In this post, I’ll walk you through a super efficient Power Automate flow that monitors your Azure App Registrations for expiring keys using the Graph API and XPath — without the nested loops and API overhead that most solutions rely on. ...

31 August 2023 · 9 min · DamoBird365

Encryption in Power Automate

Can you encrypt and decrypt a string using Power Automate? My son challenged me with this question after covering the Vigenère Cipher in school, and I couldn’t resist building it. In this post, I’ll show you how to implement a full Vigenère Cipher in Power Automate — without a single Apply to Each — and there’s even a live version you can try yourself. What is the Vigenere Cipher? The Vigenere cipher was invented by Blaise de Vigenere in the 16th century. It is a method of encrypting alphabetic text by using a series of interwoven Caesar ciphers, with each letter of the plaintext being shifted based on a keyword. ...

21 March 2023 · 7 min · DamoBird365

Service Health and Message Centre via Power Automate

Want to keep your organisation informed about Microsoft 365 service health without constantly checking the admin centre? In this post, I’ll show you how I used Power Automate with an Azure App Registration and the Graph API to pull service health and message centre data into a SharePoint List, Teams alerts, and more. We’ll start by creating an Azure app registration and using the Graph API to bring data into Power Automate. From there, you can save this information to a SharePoint List, publish it to your organisation, build a Power App, or set alerts for degraded service health via Teams or email. ...

31 January 2023 · 7 min · DamoBird365

Add user to Distribution List

Ever since Microsoft removed the ability to add users to Exchange Distribution Lists via the Graph API, Power Automate users have been stuck. In this post, I’ll walk you through a workaround using PowerShell and Azure Runbooks to get distribution list management back into your flows. It’s been over 12 months since I wrote my blog post Add members to a distribution list – Power Automate where initially it was possible to add members directly. That functionality was removed by design and has never made a comeback. Fortunately, I came across PowerShell commands to both add and remove users from a distribution group — and we can bring this to an Azure Runbook. For more details on the Graph API limitation, see Working with groups in Microsoft Graph. ...

9 January 2023 · 5 min · DamoBird365

Bulk Import Tasks into Planner

Need to load a bunch of tasks into Microsoft Planner without clicking through the UI one by one? Using Power Automate and Excel (or any other available data source 😉), you can bulk import tasks into Planner in a single flow run. I have previously recorded a video on this process and use both a tasks table and a config table to support this cloud flow. This will enable you to dynamically choose the group and plan name, as well as import planner tasks involving a title, bucket id / name, start and due date, assigned user ids, a category, priority, check list and file attachment(s)! This flow is not for the faint hearted but should support you with your goal to build a Planner Power Automate integration. ...

30 December 2022 · 7 min · DamoBird365

Export Power BI Report or Visual to File

Power Automate has an action “Export to File for Power BI Reports” which enables you to export a Power BI Visual or Page as a PDF, Power Point (PPTX) or Image (PNG) file. Below you will learn about the Workspace requirements, how to identify the report page and visual names and how to implement a report level filter. We will explore common errors, how to setup your Power Automate Cloud flow, some of the limitations, the Power BI Playground and finally saving the exported file to SharePoint and sending via Teams or Email. ...

3 October 2022 · 6 min · DamoBird365

Disable Microsoft Forms via Power Automate

Have you ever needed to automatically disable a Microsoft Form — say, when an event reaches capacity? In this post, I’ll show you how to programmatically close a form using Power Automate with a single HTTP action, and we’ll explore some practical use cases for this technique. Why Disable a Form Automatically? It is technically possible to disable a Microsoft Form from Power Automate. Why would you want to do this? Maybe it’s time limited - ok sure you can specify an end date via the existing UI. But what if that date or time was to be dynamic? ...

17 September 2022 · 3 min · DamoBird365