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 does automata process incoming threads? Unprocessed messages only? Unread messages only? #44

Open
unrstuart opened this issue Jan 1, 2021 · 1 comment
Labels
question Further information is requested

Comments

@unrstuart
Copy link

I'm trying to figure out a good way to set up some rules because I'm having issues where I miss code review emails because bot spam causes threads to be archived. I think it comes down to a misunderstanding of the way in which automata works.

Does automata process an entire thread, even if it processed some messages in a thread before? Does it only process unread messages? Is it configurable? Is it possible to build a rule that only looks at as-of-yet unprocessed messages in a thread? Is it possible to have a rule/stage that says "once this is matched, skip all further processing of any new messages in the thread"? Is it possible to have a rule/stage that tells automata to move to the next stage in the same message in the same thread, even though the default action is to stop processing because a stage matched?

I'll probably have follow up questions based on the answers, but I figured it'd be good to start with learning more about how the whole process works to see if I can figure out how to get my desired behavior on my own.

@ranmocy ranmocy added the question Further information is requested label Jun 5, 2021
@ranmocy
Copy link
Owner

ranmocy commented Jun 5, 2021

Yes, it process the entire thread. See Processor.ts.
The script itself doesn't have any storage, so it rely on email data to keep tracing. So it uses processed/unprocessed label to track with thread needs to be processed.

When processing a thread, it will look for all messages no older than two times of the processing windows (could be changed in your config in the spreadsheet). The default window is 5 minutes, so the script will check all messages no older than 10 minutes (but at least one, the latest), if the thread is mark as needs to be processed. The related code is here). Messages read/unread doesn't matter since it's part of the automated actions, we can't rely on that to determine if it needs processing.

"once this is matched, skip all further processing of any new messages in the thread". It will be really hard if you all future messages. Through I'm not sure, maybe you could try to add a rule to add Gmail's Muted label. So that Gmail itself may mute it automatically in the future.

For stage model, if you want to keep matching more stages, try to use the action_after_match column for your rules. See the spreadsheet note

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

No branches or pull requests

2 participants