Comments (8)
Andreas, Could you comment on this issue? Thx, regards, Paul,
from gmail-processor.
@soetheman, can you give me some more information to analyze the issue (e.g. processing logs)?
I've updated the respective section in the README file with information about how to acquire the logs.
from gmail-processor.
Andreas,
We created a config file for this test containing the following three processing rules:
- Store all .jpg attachments from [email protected] to the folder "Graphics"
- Store all.JPG attachments from [email protected] to the folder "Graphics"
- Store all .png attachments from [email protected] to the folder "Graphics"
Scenario1, receiving the file 'scenario1.jpg' (lower case filetype), works ok as it matches the first rule.
Scenario2 fails with the following msg: "Rejecting file ‘scenario2.JPG not matching.*.jpg$"
Scenario3 fails with the following msg: "Rejecting file ‘scenario3.png not matching.*.jpg$"
We notice that only the first rule is being processed. See the logbook.pdf attached here.
Thanks and regards, Paul,
P.S., We are using the code version you committed on 26 May 2018
Gmail2Gdrive issue#24 test results.pdf
from gmail-processor.
Hi Paul,
the processing of Gmai2GDrive is based on the assumption that a message can only be processed by a single rule since it must mark the message (really the whole thread) as processed to prevent processing it over and over again.
But I am currently working on a refactoring in #28 to provide a more flexible way to specify the storage location which may also solve your problem too.
Can you have a look at it and give me feedback if this would work for you too?
Regards,
Andreas
from gmail-processor.
Hi Andreas,
I do not understand how #28 will change this behaviour where only 1 rule is executed after which the thread is marked as processed, preventing selection of the same thread for execution of other rules.
In order to solve the issue, I think we need to rethink the workflow.
I see 2 possible solutions:
-
Use a 'per rule' processedLabel: A specific label that is set after execution of a specific rule will prevent selection of this thread for the next execution of the same rule; but will not prevent selection of this thread for other rules. This has the smallest impact on the current code, but does not seem to be a very elegant solution.
-
Refactor the selection process: first select the threads involved in ALL rules, next run through these threads and execute all the relevant rules. Only after all rules for a specific thread are executed indicate the thread as processed.
What do you think ?
In case you agree on this solution (my preference would be no 2) I could write the code needed, for review.
from gmail-processor.
Hi Paul,
the proposal in #28 introduces tree levels of matching compared to just one like before:
- Search filter for threads (as it is now): Defines the level of processing (which is atomic by the possibilities the Gmail API provides)
- Regular expression matching on message attributes: Allows to further filter the messages within threads
- Regular expression matching on attachment attributes: Allows to define multiple storage rules to store individual attachments to different locations within a thread or message
Especially number 3 should give you the flexibility you need.
But you will have to put both attachment storage rules within the same search rule since the thread still can be processed only once.
This overcomes the problems you sketched in your solution 1 while keeping the simple iterative processing (that can be interrupted at any time) that would have to be changed for your solution 2.
I'm already pretty far at implementing the proposal in #28 and will push the changes to a branch for tests and review soon.
Please let me know, what you think.
Regards,
Andreas
from gmail-processor.
Ok, great Andreas,
Looking forward to your code, and ready to test it.
Kind regards,
Jo
from gmail-processor.
I'm closing this issue since GMail2GDrive is discontinued and has been superseded by the much improved Gmail Processor.
It provides all the possibilities mentioned above.
See the Getting Started Guide as well as the Reference Docs for more information
from gmail-processor.
Related Issues (20)
- Action attachment.store with conflict strategy 'update' caused an error HOT 4
- Missing error message on failed actions
- TypeError: Cannot read properties of null (reading 'match') on messages with empty subject
- Shared GDrive parent folder in location argument being ignored when automatically converted from v1 HOT 9
- EnvContext (ctx) in the timer-driven event triggers is not as the library expected HOT 1
- fixed filename date offset for attachments HOT 5
- saving files from URLs in emails HOT 5
- Error when switching from MARK_MESSAGE_READ to ADD_THREAD_LABEL in GmailProcessorLib HOT 5
- Getting started | Syntax error: SyntaxError: Unexpected token HOT 2
- Trouble finding Lambda (parrent folder Id) HOT 1
- Script confused when consecutive emails have the same subject line HOT 1
- specifying storage location based on domain of sender HOT 1
- Scan to shared folder HOT 1
- ---
- issues with filenameFromRegexp HOT 1
- Examples page throws 404 HOT 1
- Trying to setup a simple rule to store all PDF's that match a label HOT 6
- Stable release is not found when adding library. HOT 2
- Attachments not actually being copied into g drive HOT 8
- message.storePDF and thread.storePDF fail HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gmail-processor.