web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / SharePoint List Versio...
Power Automate
Unanswered

SharePoint List Version History Log using Power Automate

(0) ShareShare
ReportReport
Posted on by 94

Hi Everyone,

 

I'm trying to create an audit log for a list, similar to the Version History feature. However, the audit log of changes would be a completely seperate list to the list that I want to monitor.

 

The seperate "audit log" list will have the following columns:

 

Date/time of changeName (user that made change)Name of fieldPrevious field valueLatest field value
     

 

I'd like the flow to do the following:

  • Trigger when an item is created or modified on the list that is being monitored
  • Determine which fields have changed
  • For each field that has changed, write the required info (see table above) to the "audit log".

 

So far, my flow does the this:

  • Determines which fields have changed and outputs a list of those field names
  • Gets previous version values for the complete item.

 

I'm struggling to do the following:

  • I need to take the list of field headings that I have and use them to get the current value of the field and the previous version of the field.

auditlogflow.png

Any nudges in the right direction would be much appreciated!

Categories:
I have the same question (0)
  • grantjenkins Profile Picture
    11,063 Moderator on at

    Quick question. What field types will you have in your SharePoint list? Single line of text, Choice (single/multiple), Person, Lookup, etc.

     

    If you have different types, then it will make it a bit more interesting to get what you're looking for.

  • EdwardHodson Profile Picture
    94 on at

    Hi @grantjenkins  - Ideally, I'd like to build the flow to be able handle any field types, but they'll typically be Single line of text, Choice (single), Multiple lines of text and Date.

     

    Ideally, I could point this flow to any SharePoint list and it would then do audit logging on it.

     

    I'm wanting to avoid going down the route of having to have a condition for every field in the SharePoint list. Each condition would check if the field has had a change or not, if there was a change, record it on the log. I could build a flow like that, but it would be a lot of work for where I have lists with a large number of fields. It is also a lot of work to re-build the flow for other lists in the future.

  • Tim_Opie-SWRB Profile Picture
    14 on at

    Hi,

     

    Was wondering if you managed to finish this? Was just about to attempt the same but with less experience than you it seems haha.

     

    Thanks

  • EdwardHodson Profile Picture
    94 on at

    Hi @Tim_Opie-SWRB - I'm afraid that I gave up as I think it's a bit beyond me at the moment.

     

    I'm glad to see that I'm not the only one looking for functionality like this!

  • JibblyGibbly Profile Picture
    44 on at

    I am in a similar situation. I watched Reza's video (https://www.youtube.com/watch?v=Ek4oYWPWfT0) and felt confident, I can follow along. I was able to achieve the basic email after an item change. 

     

    However, I am after the complex changes he showed in the end of the video and I can't seem to replicate it. 

  • Tim_Opie-SWRB Profile Picture
    14 on at

    I did end up sorting something similar. What I would do to stop the loop is use a specific account to write the changes and then use a condition that the last change wasnt by said account.

    This is what I have done. In my case checks for changes in only 3 columns, but then has a condition that the change was not made by my automation account, and that in your case, the 'Change Log' column wasnt updated. Hopefully this helps!

    Tim_OpieSWRB_0-1701215584646.png

     

  • JibblyGibbly Profile Picture
    44 on at

    Thanks. I did try something similar. However, the trigger "item is modified" doesn't know what change is. So, if you are updating the change log on what the difference is from the current version to the previous version, it ends up creating an infinite loop to keep checking for the change and not doing anything. 

    Please correct me. I am literally losing my mind over this. 

    Emailing the change is going to bombard the mailbox everytime there is a change. In my case, it is approval process and thousands of expense entries across the organisation. 
    Storing the change in the change log column creates an infinite loop. 

    Creating a new list ends up creating new entries and is hard to track. 

  • Tim_Opie-SWRB Profile Picture
    14 on at

    Mine doesnt seem to do that. The most I get is one extra triggered flow, which ends when the condition returns false for the conditions I listed above. In your case the email should only be triggered once the condition has been fulfilled. ie put it in the 'If Yes' section.

    Tim_OpieSWRB_1-1701218563241.png

     

     

  • EdwardHodson Profile Picture
    94 on at

    See this video from Reza about avoiding infinite loops. The most important parts of the video for me are between the 5 minute and 9 minute marks.

  • JibblyGibbly Profile Picture
    44 on at

    Thanks. I ended up moving the automations to a dedicated account and updated the trigger condition if it's not from that account and if the created time is not equal to modified time. 

     

    Seems to do the trick for now.

     

    However, I still would like to do the trac fields option that Reza showed towards the very end of his video. He has shared the zip files on his Github but I can't seem to import it to see how he has done it. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard