-
Notifications
You must be signed in to change notification settings - Fork 137
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
Shared GDrive parent folder in location argument being ignored when automatically converted from v1 #111
Comments
@John-Balla-Omnium there's a leading Backslash in the location configuration you should remove. |
Sorry for misleading, the leading backslash was just another thing I tested, but it produces the same results either way, even when storing on My Drive. To add some detail, the result in the execution log looks like this: Creating file 'Daily_Report_2023-07-05_08-00.pdf' in folder 'My Drive' ... Whereas when I leave the ID off and set it to actually store on My Drive, the 'My Drive' output is replaced with 'Reports-2023-07-05', as expected. For what it's worth, I'm having other problems too, like the global match query not working (in:inbox newer_than:1d is:unread), but these are likely due to the older emails being in threads and they are getting picked up in the thread with the new email that is new/unread/in inbox. |
@John-Balla-Omnium, can you please update to the latest version (release 2.1.0, version 9 in Google Apps Script) and try it again? |
I tested in version 7 yesterday, updated to 9 today, tested with the new config details. Still just the same Info logs, no error: 3:27:19 PM Info [2023-09-14T05:27:19.782Z] INFO: Processing of attachment hash 'df27d177_6d28effb_41d1058f_af8a012e_721345f0' (name:'Report_2023-09-14_08-00.pdf', type:application/pdf, size:496604) started ... If you notice that 'My Drive' is still being defaulted to for the location whenever I put in the parent folder id. If I state the name of the folder instead of the parent folder id, I can get it to save to that folder, as long as it is in My Drive, but obviously the same doesn't work for Shared Drives. I kept testing a bit and found if I put just the parent folder id and no sub-directory folder, like so: 3:42:34 PM Info [2023-09-14T05:42:34.469Z] INFO: Storing attachment 'Report_2023-09-14_08-00.pdf' to '' ... |
Also, the latest update fixed my issue with the match query (things like is:unread now work), and the config conversion also works now. |
@John-Balla-Omnium thanks for your analysis, so far. |
I've tested both a shared folder id which is owned by another user and a My Drive folder id, but it was working on v1 up until the v2 release. Also I've checked permissions haven't changed but I can't rule out some unknown change yet. I'll try testing on a separate account later and let you know if it works. |
Tested over the weekend, it had nothing to do with the permissions, turns out that the template literal format of the id parameter was unnecessary / bugged. Here's the version of the location arg that finally worked: |
@John-Balla-Omnium thanks four finding the root-cause, indeed there was a bug in the converter for v1 that caused to put a |
## [2.1.2](2.1.1...2.1.2) (2023-09-18) ### Bug Fixes * wrong conversion of location with folder IDs ([0993562](0993562)), closes [#111](#111)
Describe the bug
While trying to use a shared drive as a parent folder in the location argument of an attachment action, the shared folder ID is being ignored and the files are being saved to my personal 'My Drive' instead.
To Reproduce
Steps to reproduce the behavior:
Use the following thread:
Expected behavior
I would expect a folder called Reports-2023-09-11 to be created inside the shared folder with the attachment name from the file itself to be created inside that folder. Instead the folder appears in 'My Drive' (albiet formatted correctly and the attachment inside). Keep in mind when I use the following format, it works to save it to my 'My Drive', but this is expected:
'\Reports-${message.date:format:yyyy-MM-dd}/${attachment.name}'
Additional context
Affected version of gmail-processor: 6
Add any other context about the problem here.
I was having issues with the V1 to V2 config converter so I have been playing with the config ever since to try to get this to work like it did on V1.
The text was updated successfully, but these errors were encountered: