Before
An operator would search the user's mailbox for messages with the specified subject, review whether results were present, and delete the identified emails manually. They would then add the cleanup details to a Jira issue and close the issue after completing the work.
How it works
- Search the user's mailbox for messages whose subject matches "SPAM" and determine whether any results were found.
- Delete the identified messages when matches exist; otherwise continue without a deletion step.
- Record the activity and deletion results in Jira, then close the related issue.
Workflow details
- Mailbox search: The workflow searches the specified user's mailbox for messages matching the subject filter "SPAM," replacing the need to locate potentially unwanted messages manually.
- Result decision: It evaluates whether matching messages were found and follows the appropriate branch based on the search result.
- Message deletion: When matching messages exist, the workflow deletes the identified emails from the mailbox.
- Operational tracking: The workflow adds Jira comments to document the activity, including the results of the deletion when messages are removed.
- Issue completion: After the mailbox action and tracking updates are complete, it closes the related Jira issue, providing a finished record of the cleanup.
What changed
Mailbox searching, result evaluation, message deletion, Jira status updates, and issue closure now occur in one workflow. The human handoff changes from performing and documenting the cleanup manually to reviewing the completed Jira record when needed.
Work removed
Searching the mailbox for matching subjects, checking whether results exist, deleting each identified message, copying the cleanup results into Jira, adding status comments, and manually closing the issue.
Expected outcome
Each run is expected to remove one manual mailbox search-and-check sequence and one Jira documentation-and-closure sequence, while leaving a completed record of the cleanup.

