Is there any supported solution to create and attach tags dynamically to created documents?

As it was asked in the title I am in search for a solution to create tags for documents. Just to mention a specific case:

I managed to rename the documents sent to IMAP source, and I’d write some tags to the subject of the emails separated with special characters, and I would like to make new tags and attach them to the new documents.

The workflow system has an action to attach tags to documents. You can code any logic you need for this. Creating the tag itself in the workflow is not allowed as a preventive measure only attaching and removing them.

Refer to this Knowledge base tutorial for a similar example: Detecting and tagging documents that contain social security numbers in the OCR

1 Like

Thank you for the answer!

And is there any other way I can create new tags, such as calling a method that creates the tag at the end of the API call chain?

Upon further investigation into the source code, I discovered that the tags and other models might be getting created within the create function of the CreateModelMixin class. Is it possible for me to call a function at that level from the IMAP-source backend, resulting in the creation of new tags without going through an API call and handling it directly inside the backend?

Yes, you can self call the API using the batch API system or by using the HTTP call workflow action.

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.