Skip to main content

Notifications

Community site session details

Community site session details

Session Id : rzPLTaOugTSqR8QVKGM9dj
Copilot Studio - General
Answered

Bulk Delete of Files uploaded for generative answers

Like (1) ShareShare
ReportReport
Posted on 25 Jan 2024 07:55:03 by 34

Hi all,

I am using the upload files feature for creating generative answers. Anyway, I am uploading about 100 files, which are changing sometimes. It is possible to upload all files at once, but I have not found any possibility to delete all or selected files that are not relevant anymore. It is quite odd to delete each file https://learn.microsoft.com/en-us/microsoft-copilot-studio/nlu-documents

I have searched in Dataverse tables but I have not found the storage location - my idea was to create Bulk Delete Job. 

Any hints on how to find and delete the files in bulk? 

Categories:
  • Suggested answer
    Turbolego Profile Picture
    7 on 17 Jun 2024 at 09:54:17
    Bulk Delete of Files uploaded for generative answers
    @remidyon Your solution does not work well in large organizations where the table "Chatbot subcomponents" have stuff from multiple chatbots and you need to delete all .txt files added to a custom copilot made with copilot studio. Microsoft should make the table in "knowledge" in copilot studio "multiple select" so that we can delete more than 1 file at a time.

    I solved this with a stupid script in AutoHotkey where "680, 395" is the position of the button to open the "kebab menu" for each file in "knowledge" and the keypresses is for deleting and closing the "are you sure" -dialog.
    I removed like 100 files in a few minutes.

    WARNING: When all "files" have been deleted, it will start deleting SharePoint etc. since the filter for "Files" is removed when there are no files. So perhaps just use this script if you just want to delete everything. 

    ​​​​​​​

    #NoEnv
    SendMode Input
    SetWorkingDir %A_ScriptDir%
    Escape::
    ExitApp
    Return
    F1::
    Loop
    {
        Click 680, 395
        Sleep, 20
        Send {Down}
        Sleep, 20
        Send {Down}
        Sleep, 20
        Send {Enter}
        Sleep, 50
        Send {Tab}
        Sleep, 20
        Send {Enter}
        Sleep, 50
        Send {Enter}
    }
    return

  • Verified answer
    remidyon Profile Picture
    on 15 Mar 2024 at 13:29:54
    Re: Bulk Delete of Files uploaded for generative answers

    Hi @ryjan 

    I finally found a workaround using Power Automate: you can list the rows that are type "Bot File Attachement" and then perform an "unbound action" with the "DeleteFile" action.

     

    Here is a test where I go list a particular file I want to delete from my Copilot: 

    remidyon_0-1710508720968.png

     

    Once I have listed the files, I can access them with their fileID and unbound them from the table (it will keep the record but remove the actual file data - which will make the file disappear from the UI in Copilot Studio as well)

    remidyon_1-1710508801994.png

    In the meantime I have opened a feature request for our product group to add the ability to delete in bulk from the UI.


    Hope this help.

    Remi

     

  • remidyon Profile Picture
    on 15 Mar 2024 at 12:38:50
    Re: Bulk Delete of Files uploaded for generative answers

    I am still looking for a workaround - in the meantime could you please open a support ticket? this looks like a bug to me. thank you

  • IntrepidIbex Profile Picture
    9 on 15 Mar 2024 at 07:45:32
    Re: Bulk Delete of Files uploaded for generative answers

    Hi @remidyon ,

     

    any news on this? Are there any plans to make it available in UI in Copilot Studio?

  • remidyon Profile Picture
    on 23 Feb 2024 at 21:22:54
    Re: Bulk Delete of Files uploaded for generative answers

    You are right - I have the same issue. Let me see what I can find about this!

  • ryjan Profile Picture
    34 on 23 Feb 2024 at 10:47:52
    Re: Bulk Delete of Files uploaded for generative answers

    Hi @remidyon, thanks for suggestion. Unfortunately the table is read-only, even if I am System Administrator in that environment

    ryjan_1-1708685264397.png

     

     

     

    When trying to delete them from the default solution, I get an error message: 

    ryjan_0-1708685201216.png

     

  • remidyon Profile Picture
    on 22 Feb 2024 at 13:58:42
    Re: Bulk Delete of Files uploaded for generative answers

    Hi @ryjan 

    Only solution I can see is to delete the files from the Dataverse table (documents are in the table chatbot subcomponent, type Bot File Attachment)

     

    remidyon_0-1708610288345.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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,658 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard
Loading started