The “Clean metadata” automation is an operation or automation in Athento designed to clean (empty) the values of one or more metadata fields in a document, in a simple and configurable way from the user interface.
What is this automation used for?
This operation is particularly useful in scenarios where sensitive information needs to be deleted, fields need to be reset for a new processing cycle, or metadata values that are no longer relevant to the document simply need to be cleaned. For example:
- Deleting personal data before archiving a document.
- Cleaning control fields after a review process.
- Preparing documents for reuse in another workflow.
How does it work?
The automation allows you to select the metadata you want to clean from the operation settings. Once the operation has been performed on a document, the values of the selected metadata are deleted (left blank).
Configuration parameters
- Metadata to clean: Allows you to select one or more metadata fields from the form. It is a multiple-choice field, which makes it easy to select several fields at once from the operation configuration interface.
Internal logic
- Document retrieval: The operation receives the UUID of the document on which it is executed.
- Metadata selection: Retrieves the metadata selected in the configuration.
- Cleaning values: For each selected metadata:
- If the metadata has a value, it leaves it empty (
''). - If the metadata has an associated file value (
file_value), it deletes it (None). - Saves the changes to the metadata.
- If the metadata has a value, it leaves it empty (
- Result: Returns a success message indicating that the operation was executed correctly.
Example of use
Suppose you have a form with the fields “ID,” “Phone,” and “Comments.” You can configure the operation to clear only ‘ID’ and “Phone” after completing a process, leaving the rest of the information intact.
Configuration from the interface
Thanks to the definition of type and subtype parameters, the operation can be easily configured from the Athento interface by selecting the fields to be wiped without having to modify the code.
Comments
0 comments
Please sign in to leave a comment.