I have been trying to prevent an attachment of type pdf while sending emails within Cases. I create an email, attach a pdf document. The process builder fires on Email creation which in turn calls a flow. The HasAttachment on email returns true. However when i check for attachement ids, it returns null. The reason being, during the process of sending the email. the attachment is temporarily created with the following prefix 0F0 which stands for EmailTempAttachmentMap, but i cannot access this object in a flow. So cannot prevent this type of attachment. Once the email is sent, the attachment object changes prefix to 00P which is the standard prefix for attachments and I can go and delete these using a flow. But i want to prevent attachement of a certain type being added during the send and not after.
Has anybody faced this issue. Salesforce support has not been able to solve it either.