Workflow : change filename (file upload)

Hello,

I would like to change the file’s name in a record (filedtype : file upload). I checked the documentation and the forum but I didn’t find a way to do it (without editing directly the database).

I made some tests with the workflow “create a file and attach it to a ressource” but it didn’t work (I didn’t succeed to put the same file content). Link to another similar post.

Any idea how this might be done ?

Thank you very much.

Cheers,

If you just need to change the frontend screens that users see, can you add in a title for that field. I realize that might not be what you are looking to do though.

If the file you’re trying to change the name of is something that you create/upload, then you have to name it in that step when you create/upload the file.
image

Or you need to create a file via templates like the link you referenced(note the documentName argument)

If you experience problems with this, the i need some detailed steps of what you’re doing and what you’re trying to achieve

1 Like

Hello,

So here is an test example :


The onManuel automation will execute a workflow that will rename the file in our exemple :
DOC087 (3).pdf
(In real life, the trigger will beforeUpdate of afterUpdate)

The workflow is like the following :

The workflow gave an error as expected, because I put the attachement ID (record.values.file) in the reader.

The point was to make more friendly file names for the attachements in a module.

module and wf.zip (2.1 KB)

Thank you very much @jfortun

Any ideas how to resolve this problem ?

The way we handle this business objective is by using a dedicated Files module. A File record can be associated with one or more other module records using a record selector association.

In the related record (e.g. a Lead, a Contact or an Account), we have a Record List block on the record page, which is filtered to show the Files that have the record association.

When a new file record is created, using a workflow, you can create a schema to set a friendly name for the record, based on the file type, the source of the file, the date …, or whatever you like to give the file title some meaning.

I hope this helps :wink:

1 Like