Problem when Managing Emails and Metadata

Hello everyone!

We are facing a challenge in trying to manage multiple email addresses and their metadata. Currently, we are extracting data from the emails and adding additional metadata to facilitate their management. However, we are having difficulty achieving the desired result and are hoping someone can provide guidance.

Our goal is to manage multiple emails that may come from multiple people. To achieve this, we are using OCR and tags. We want to apply tags to emails based on their OCR content, and we are using the following condition in our Jinja2 templates:

{% if "Microsoft" in workflow_instance.document.ocr_content|join:" " %}True{% endif %}

However, it seems that this condition is not working as expected. We want the condition to check if the OCR content of the email document contains the word “Microsoft” and, if so, apply corresponding tags.

Could someone give us a hand with this? We welcome any suggestions or guidance you can provide to help us resolve this issue. If more information or details about our configuration are needed, please don’t hesitate to ask.

Thanks in advance for your help!

Regards,