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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Archiving cases on Sha...
Power Automate
Answered

Archiving cases on Sharepoint

(0) ShareShare
ReportReport
Posted on by 103

Hi Guys,

I'm new to Power automate and need your help with archiving cases on sharepoint site.

Only cases with certain criteria can be considered for archiving. The Modified date criteria should be older than 6 months . 

 

Any help will be much appreciated.

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @Amaya2013,

     

    Just to double check. Is a case a single file in a document library?

     

    If that is the case (pun intended 😁) you could use a Get files (properties only) type of action with a Filter Query to double check which case are eligible for archiving. https://learn.microsoft.com/en-us/connectors/sharepointonline/#get-files-(properties-only)

     

    After that you can use a Copy file action to move it to your local file system. However, you will need a gateway to be able to connect to your local file system though, https://learn.microsoft.com/en-us/connectors/filesystem/#copy-file

     

    Lastly, you would delete when it has been successfully copied over to the file system.

  • Amaya2013 Profile Picture
    103 on at

    @Expiscornovus - Thanks for your response. I've used Get Files (Properties only) action to get details about cases that need to be archived. 

     

    Now as you suggested I'm using Copy File action to move the cases from one folder to another before deleting them . I'm unsure what to select under "Files to copy" as below. Hope you can help me with this! Thanks

    Amaya2013_0-1711364417910.png

     

  • Amaya2013 Profile Picture
    103 on at

    @Expiscornovus - I'm using the below "Copy File" action but it's throwing an error:

    Amaya2013_0-1711365747466.pngAmaya2013_1-1711365850047.png

     

    Any help will be much appreciated.

  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @Amaya2013,

     

    Sorry, my bad. I made the wrong suggestion 😅.

     

    That is the Copy File action of the SharePoint connector. It should have been the Create File action of the File System connector, that is a different action.

     

    In order to use that Create File you will also need a Get File Content action. That action can use the Identifier field.

     

    Below is an example

     

    createfile_filesystem.png

  • Amaya2013 Profile Picture
    103 on at

    @Expiscornovus - Thanks, I've tried as you suggested but getting below error message :

    Amaya2013_0-1711367695512.png

     

  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @Amaya2013,

     

    What did you use in the Site Address and File Identifier fields of the Get file Content action?

     

    Btw, I also see you have used the Create file action from the OneDrive for Business connector. I was talking about a different action in my suggested approach.

     

    filesystemaction.png

  • Amaya2013 Profile Picture
    103 on at

    Sorry, In Create file (File System) , What should be the connection name? Thanks

    Amaya2013_0-1711370675566.png

     

  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @Amaya2013,

     

    That would be details of the local machine, which can access the local folder on that machine. 

     

    Like mentioned in one of my earlier replies, this does require a setup of a gateway:

    https://learn.microsoft.com/en-us/data-integration/gateway/service-gateway-install

     

    Apologies if that wasn't clear.

  • Amaya2013 Profile Picture
    103 on at

    Thanks @Expiscornovus - What I'm trying to do is copying the files from one folder on sharepoint to another folder (Archive) on sharepoint so basically Get file content and Create file both use sharepoint . Not sure why it's throwing an error message as below:

    Amaya2013_0-1711374788462.png

     

  • Verified answer
    Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @Amaya2013,

     

    In your opening post you mentioned you want to archive it on C:\Archived-Cases, which is a path of a folder on a local drive letter C. That made your question a bit confusing for me. 😅

     

    Thanks for clarifying your requirements. Moving a file from a SharePoint Online library to a folder in another SharePoint Online library is easier and doesn't require a gateway.

     

    Try something like the below

     

    1. Make sure you use the Identifier dynamic content field in the File to Move field of the Move File action

     

    movefile_sharepoint.png

     

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard