Hello guys,
I am currently trying to remove duplicate emails from the system.
I was originally using:
record\exists('Email', 'name=', name, 'body=', body, 'status=', 'Sent')
But the problem is that if the email has an attachment, then the duplicate email with the status Archived has different attachment ID and because of that the body is little bit different (there is a different attachment ID mentioned in the body - "<img src="?entryPoint=attachment&id=644b8f556f0c38c 4e>"
Is there any other possibility how to compare the Body of the emails instead of "body="? for example "bodyContains" or something like that to be able to for example compare only part of the body without the last row where the attachment ID is mentioned? The rest of the body is exactly the same.
I was not able to find anything in the documentation.
For some reason "bodyPlain" is different in both emails so I cannot use this. I just need something those emails have in common to be able to recognize that the email is duplicate and there is exactly the same email only with status "Sent"
Original post with email duplicates https://forum.espocrm.com/forum/gene...ated-by-system
In the attachment, I am sending a screenshot of the workflow that is deleting archived emails. It is working if the email has no attachment, but with the attachment it does not recognize duplicate because of the attachment ID mentioned in the "body" as I mentioned above.
Thanks a lot for the help!
I am currently trying to remove duplicate emails from the system.
I was originally using:
record\exists('Email', 'name=', name, 'body=', body, 'status=', 'Sent')
But the problem is that if the email has an attachment, then the duplicate email with the status Archived has different attachment ID and because of that the body is little bit different (there is a different attachment ID mentioned in the body - "<img src="?entryPoint=attachment&id=644b8f556f0c38c 4e>"
Is there any other possibility how to compare the Body of the emails instead of "body="? for example "bodyContains" or something like that to be able to for example compare only part of the body without the last row where the attachment ID is mentioned? The rest of the body is exactly the same.
I was not able to find anything in the documentation.
For some reason "bodyPlain" is different in both emails so I cannot use this. I just need something those emails have in common to be able to recognize that the email is duplicate and there is exactly the same email only with status "Sent"
Original post with email duplicates https://forum.espocrm.com/forum/gene...ated-by-system
In the attachment, I am sending a screenshot of the workflow that is deleting archived emails. It is working if the email has no attachment, but with the attachment it does not recognize duplicate because of the attachment ID mentioned in the "body" as I mentioned above.
Thanks a lot for the help!
Comment