Published on

How to automatically extract list items and add them to an Excel using Power Automate

  1. A simple Power Automate job I did for a client who wanted all the lists created wthin a month emailed to her as an Excel, So this is how I did it: First visit Power Automate:

  2. Press Create

  3. Image
  4. Choose when the script will run, I choose once a month.

  1. Create two variables: Name: FirstofPreviousMonth Type: String: addDays(startOfMonth(addDays(startOfMonth(utcNow()),-1)),1)

Name: LastofPreviousMonth Type: String: addDays(startOfMonth(utcNow()),-1)

  1. Create a new connector - SharePoint Get List items

Site: YourSite List: yourlist Filter query:
ParkingDate ge'@{variables('FirstOfLastMonth')}' and ParkingDate le '@{variables('LastOfLastMonth')}'

  1. Search after "Create HTML Table":

From: Value from SharePoint Get List items

Header: Header for excel Value: The value from the SharePoint list

  1. Search after the Sharepoint Connector and choose to Create file: Site Adress: Choose where you want to save your file Folder Path: What is the path for the file File Name: Filename + .xls File Output: Output from Create HTML Table