Published on

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

Authors
  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:

    https://make.powerautomate.com/

  2. Press Create

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

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

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

Image
  1. Create a new connector - SharePoint Get List items
Image

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

Image
  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
Image