You can manage the fields on a Content Version (FILES) before PDF Butler saves your generated file. This is possible with an Autolaunched Flow automation that can update the fields, even Custom Fields, on the Content Version.
Follow the step below to set it up:
1) Validate that the “ON_CONTENT_VERSION” option is available on the Actionable:
Go to Object Manager => Actionable => Fields & Relationships => Choose field “When”

If the option ON_CONTENT_VERSION is not there, just simply add it manually. The API Name must be: ON_CONTENT_VERSION
2) Create an Autolaunched Flow

In the Flow, create Resources:
– info (1): Variable with
- Data Type “Apex-Defined”
- Apex Class “cadmus_core__AfterActionableFlow_Info”
- Available for input => make sure this checkbox is checked!

– contentVersion (3): Variable with:
- Data Type “Record”
- Apex Class “Content Version”
- Available for input => make sure this checkbox is checked!
- Available for output => make sure this checkbox is checked!

In the flow you can create your own logic and update the Content Version fields as you like. We cannot know your requirements but the Flow will allow all flow actions.
In the flow, you must update the fields on the contentVersion variable. In this example, here we update the Title (name of the file) before saving but you can also update custom fields.

3) PDF Butler configuration:
Create an Actionable on your DocConfig and/or Pack to run the flow when the PDF Butler generated file(s) are saved.

- RecordType: Run Lightning Flow
- Class: cadmus_core.Actionable_RunOnContentVersionFlow
- Flow API Name: Copy/Paste the API Name, not the label, of your Flow
- When: ON_CONTENT_VERSION
- Active: Check this otherwise it will not run
- Pack: Lookup to the PDF Butler Pack you want to link to (if you use a Pack)
- Doc Config: Lookup to the PDF Butler Doc Config you want to link to (if you want to save the file on Doc Config)
