Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to delete old deleted conversations forever via workflow/automatically? #3218

Open
githubuser-112 opened this issue Jul 26, 2023 · 8 comments

Comments

@githubuser-112
Copy link

Hi,

we´d like to delete old already deleted conversations forever via workflow, so the trash bin does not get bigger and bigger.

We created the following workflow to delete conversations with the state deleted that have been created more than 30 days ago forever. Tested workflow with "apply to previous" and did nothing.

Any idea what we are doing wrong?

Conditions

Actions

Freescout: 1.8.86
PHP: PHP 8.2.8

@freescout-helpdesk
Copy link
Contributor

We've just checked it - it works fine on our end.
Are you using Docker or Cloudron?

@githubuser-112
Copy link
Author

We´re neither using Docker not Cloudron. We tested various workflow conditions and never got it to work, even if we just put "if email = x" => "delete forever" with a mail that existed in the trash. So we found out the following:

The "delete forever" action is never called on already deleted emails. If we restored the mail before saving & executing the workflow, the "delete forever" worked fine.

@freescout-helpdesk
Copy link
Contributor

The only way to find out the reason of the issue is to investigate it on your server.

@githubuser-112
Copy link
Author

Any indication on how to go about that?

We did more testing and results that deleted conversations never get touched by workflows (on our instance apparently).

@freescout-helpdesk
Copy link
Contributor

The only way to find out the reason of the issue is to investigate it on your server.

@raramuridesign
Copy link

raramuridesign commented Feb 19, 2025

@freescout-helpdesk I have been revewing the setup of workflows to delete conversations in the Deleted folder.

We have workflows which do the following

  1. Change status to pending after 24 hours (Works)
  2. Move the pending status after 7 days to deleted and mark as closed. (Works)
  3. After 7 days of being in the deleted folder remove the items (Not working)

The issue is that if the conversation is marked as Closed & is in the Deleted Folder, the Workflow does not work.

So we have updated our workflow to ensure that conversations are marked as Pending, then points 2 & 3 will work, ie remove the items.

So the Workflow with conversation in Deleted folder & Marked as Closed Will not remove the item.
We only came across this recently, after checking why our box was so full, and had 1000's of conversations which should have been removed and were not removed.

Could you look into this.
Thanks
M

updated

@freescout-help
Copy link
Collaborator

freescout-help commented Feb 20, 2025

Can you please attach screenshots of your Conditions and Actions. We can't reproduce the issue.

@raramuridesign
Copy link

@freescout-help
here are the screenshots

This workflow action is to MOVE the items to Deleted folder.

Image

This workflow, has never run.
The action is to delete forever.

Image

Now the issue is
The items in the deleted folder, they are

  • status: closed
  • state: deleted

I have tested by moving items to deleted folder with status as pending
And can then change the rule to delete the items, and this works.

But not with the workflow as above.

M

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants