Skip to main content
Best answer

How to automatically Delete files uploaded via Conversation with ChatGPT Assistants?

  • December 31, 2023
  • 1 reply
  • 1415 views

  • Beginner
  • 4 replies

Hi,

 

I have Open AI Assistants that I call via the Conversation with Assistants action in Zapier. In these workflows, users upload files. Obviously, after a while, the files section of my Open AI developer account gets really cluttered with an endless list of files.

As I understand it, these files do not get removed automatically and incur charges if they sit there taking up storage.

I believe there is API documentation for removing the files, but I don’t quite have the technical know-how to add it into my Zap. I’d ideally like to have it so after the workflow is finished, right at the end, maybe after a delay step, have the files deleted automatically.

  1. Is there a default ChatGPT step for deleting files that I can add to my zap? This would be ideal.
  2. If not, how can I add this step myself using the documentation? Here is it, taken from here:


file_deletion_status = client.beta.assistants.files.delete(
  assistant_id=assistant.id,
  file_id=file.id
)

 

Thanks in advance.

Best answer by SamBBest answer by SamB

Hi @J_M, happy new year! 🎉

There isn’t a “delete file” action currently for the ChatGPT app on Zapier so I’d suggest contacting our Support team to request that a new feature request be created on your behalf for that. You can get in touch with them here: https://zapier.com/app/get-help

In the meantime, since OpenAI’s API has the ability to delete a file you could try using the ChatGPT API Request (Beta) action for this. It’s a bit more advanced to set up since you’d need to reference OpenAI’s API documentation to create the request, but we have a Set up an API Request action guide that you may find helpful in getting you started.

If you run into any errors when setting that up just let us know! 

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7764 replies
  • Answer
  • January 2, 2024

Hi @J_M, happy new year! 🎉

There isn’t a “delete file” action currently for the ChatGPT app on Zapier so I’d suggest contacting our Support team to request that a new feature request be created on your behalf for that. You can get in touch with them here: https://zapier.com/app/get-help

In the meantime, since OpenAI’s API has the ability to delete a file you could try using the ChatGPT API Request (Beta) action for this. It’s a bit more advanced to set up since you’d need to reference OpenAI’s API documentation to create the request, but we have a Set up an API Request action guide that you may find helpful in getting you started.

If you run into any errors when setting that up just let us know!