Listing and Deleting Persona Uploaded Files Using API

I want to use an API to list and delete files uploaded to a persona on the Discourse AI plugin.

I am planning to use this API technique to upload files - Uploading a new file to a discourse AI persona


I am using a combination of low-cost human labor and web scrapers to build text files. I am using human labor to build Google Sheet data and then manually export to CSV, which I then manually upload to the Persona.

The Discourse AI is already running wonderfully, but to scale this workflow, I am looking to reduce human labor time units to reduce cost. Will switch to using Google API for the spreadsheet in the future, but would need to be able to list and delete old files using an API to make it slightly more efficient due to security roles in editing the Persona.

Is there a better workflow recommendation?


I want to augment my persona with data from Discourse User Notes.

I am currently using this technique: Discourse-user-notes API - #4 by codetricity

Is there an easier way to prepare the user_notes plugin data for the AI persona? I would like to query the SQL database directly, but could not figure out the SQL commands.

It would be ideal if I could give the Discourse AI plugin access to the user_notes fields directly for admins and staff. That way, I could query for all people that had problems in certain areas. For example, the area could be geographic or it could be in an industry. Human staff are updating the notes field, but it is difficult to produce reports from the user_note field.

1 Like

I can think of a rube goldberg solution that would work fine.

  1. Create a parameterized data explorer query that finds it
  2. Create an API key with the ability to run said query
  3. Create a custom tool to query it using discourse API

I guess the big question here is … do you want to unconditionally add this information to the context or is this context lookup a result of a user action?

1 Like