function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nico WrennNico Wrenn 

Entity is deleted error with flow that deletes email-to-case cases that are auto-replies

Hi everyone!

I have set up a Process and Flow that looks for cases created by Email-to-Case that have subjects like "Automatic reply:" My process is simple, and its only immediate action is to launch a Flow that has a single delete element. The element looks like this:
Delete Element
I pass the text variable CaseID from the Process into the flow. When a case meets my process builder's criteria, it does launch the flow and the case gets deletes, as expected. However, I always get a flow error email with an error message. The ID mentioned in the error is the id of the now deleted case, but neither my flow nor my process try to do anything to the case after deleting it, so I do not understand why I get these error messages. Please help.
The error message looks like this:

ENTITY_IS_DELETED : Cannot save already-deleted object: id = 5000f00001EdGjM