Hi @dima and @Bruce.
let me try to reply inline with your various questions.
"So when the user selects the Archive action in a Project we look at the versions and if the client status has Final Approved then it stays all other files will be archived in that project. We dont remove anything else only the media files."
This is a custom event listener on the ftrack.update topic, checking if the project status change to Archived.
If the event is detected then it shall be fetching all the components attached to asset versions where the status is not "Approved" or state "Done".
When these components are found, these should be be then uploaded to an amazon S3 bucket thorugh the S3Accessor, using a custom Location.
In order to do that you need the following moving parts.
1) an event listener similar to https://github.com/ftrackhq/ftrack-recipes/tree/main/python/events/cascade-status-changes-0.0.0, just listening to the project changes rather than the task.
2) a custom locatino similar to the https://github.com/ftrackhq/ftrack-user-location as it make use of the s3Accessor.
@Lorenzo Angeli Where can we find Ftrack_s3_accessor ready-made plugin for cloud?
The plugin is available through pip to install as by repo instructions which boils down to : pip install ftrack-s3-accessor
Once the module is available you will be able to make use of it in a custom location as the user-location example does
2. Then we need to delete files from ftrack.server and this should presumably be done by searching for "orphaned" files of this project, right?
Yes that's correct, careful only on how you define orphaned components, not being attached to a version is not enough sometimes as notes could be having attachments.
3. How to deploy this action if we use Ftrack Cloud by creating a plugin and placing it through Ftrack Connect in the plugins folder?
4. Or do we need to place the action on our own Python or NodeJS server with a connection through an Ftrack API session?
Both way works,
I usually prefer using Connect deployment while testing adn using a separate machine (headless) to serve actions when depoying in production.
Between python and node, I'd sugges python as we have more examples on the recipes.
Hope it helps.
L.