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

Community site session details

Session Id : QwQeN+IksXByu2HOePLni/
Power Automate - Building Flows
Unanswered

SharePoint List Version History Log using Power Automate

Like (0) ShareShare
ReportReport
Posted on 27 Jan 2023 15:43:38 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!

I have the same question (0)
  • JibblyGibbly Profile Picture
    44 on 09 Jan 2024 at 05:41:05
    Re: SharePoint List Version History Log using Power Automate

    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. 

  • EdwardHodson Profile Picture
    94 on 29 Nov 2023 at 07:29:00
    Re: SharePoint List Version History Log using Power Automate

    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.

  • Tim_Opie-SWRB Profile Picture
    14 on 29 Nov 2023 at 00:43:03
    Re: SharePoint List Version History Log using Power Automate

    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

     

     

  • JibblyGibbly Profile Picture
    44 on 29 Nov 2023 at 00:10:06
    Re: SharePoint List Version History Log using Power Automate

    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 28 Nov 2023 at 23:56:40
    Re: SharePoint List Version History Log using Power Automate

    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 28 Nov 2023 at 03:18:36
    Re: SharePoint List Version History Log using Power Automate

    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. 

  • EdwardHodson Profile Picture
    94 on 04 May 2023 at 07:21:14
    Re: SharePoint List Version History Log using Power Automate

    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!

  • Tim_Opie-SWRB Profile Picture
    14 on 03 May 2023 at 20:51:20
    Re: SharePoint List Version History Log using Power Automate

    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 30 Jan 2023 at 16:57:45
    Re: SharePoint List Version History Log using Power Automate

    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.

  • grantjenkins Profile Picture
    11,059 Moderator on 28 Jan 2023 at 06:39:54
    Re: SharePoint List Version History Log using Power Automate

    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.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete