You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to have both threads and attachments saved in the same folder, grouped by subject, nested within date-based sub-folders.
I attempted to follow the methodology employed in #36 however I'm getting unexpected results.
I am sure I am getting something wrong with the naming convention for the folder value in config.gs, but I've tried many combinations without success. Sometimes I can get the attachments saving with correctly labelled folders, but the threads get saved in erroneous folder names.
Example:
Payslip.msg (with attachment "PayslipJuly.pdf"),
Sent July 2022
With label 'finance-related-payslips'
Expected outputs (2 files in same path):
Payslips > 2022 > July > Payslip > Payslip.pdf (formerly .msg)
Payslips > 2022 > July > Payslip > PayslipJuly.pdf
Actual output
Payslips > YYYY > MM > Payslip.pdf (formerly .msg)
No attachments.
Artefacts:
Global filter (just to confirm I'm not leaving out anything relevant):
// Global filter
"globalFilter": "-in:trash -in:drafts -in:spam",
Offending rule:
// Processing rules:
"rules": [
{
// Store threads marked with label "Finance Related/Payslips" in the folder "Payslips" as PDF document.
"filter": "label:finance-related-payslips",
"saveThreadPDF": true,
"folder": "Payslips'/yyyy/MM/%s",
},
Relevant execution log snippet:
11:16:06 PM
Info
INFO: Processing thread: FW: Payslip for January 2022 (runtime: 4.757s/280s)
11:16:06 PM
Info
INFO: Message in trash:false
11:16:06 PM
Info
INFO: Processing message: FW: Payslip for January 2022 (1820a633ca8c45e0)
11:16:06 PM
Info
INFO: Processing attachment: PaySlip.pdf
11:16:06 PM
Info
Exception: Invalid argument: Payslips/yyyy/MM/%s
11:16:06 PM
Info
INFO: Saving PDF copy of thread 'FW: Payslip for January 2022'
11:16:07 PM
Info
INFO: Generating HTML code of thread 'FW: Payslip for January 2022'
11:16:07 PM
Info
INFO: Message in trash:false
11:16:07 PM
Info
INFO: Message not in trash: processing.
11:16:09 PM
Info
INFO: Processing thread: FW: Payslip for December 2021 (runtime: 8.065s/280s)
11:16:09 PM
Info
INFO: Message in trash:false
11:16:09 PM
Info
INFO: Processing message: FW: Payslip for December 2021 (1820a6339251c695)
11:16:09 PM
Info
INFO: Processing attachment: PaySlip.pdf
11:16:09 PM
Info
Exception: Invalid argument: Payslips/yyyy/MM/%s
Appreciate any assistance as I am sure I am getting a lot wrong - I am sure this is a very powerful tool once I get the hang of it!
The text was updated successfully, but these errors were encountered:
ahsee
changed the title
Error when attempting to set yyyy-mm regex for foldername
Error when attempting to save threads and PDFs to yyyy/MM folder structures
Jul 18, 2022
ahsee
changed the title
Error when attempting to save threads and PDFs to yyyy/MM folder structures
Error when attempting to save threads and attachments to yyyy/MM folder structures
Jul 18, 2022
I encountered this error as well, I believe the processThreadToPdf() function does not create the folder name as expected so this occurs in any email that uses "saveThreadPDF": true.
I'm attempting to have both threads and attachments saved in the same folder, grouped by subject, nested within date-based sub-folders.
I attempted to follow the methodology employed in #36 however I'm getting unexpected results.
I am sure I am getting something wrong with the naming convention for the folder value in config.gs, but I've tried many combinations without success. Sometimes I can get the attachments saving with correctly labelled folders, but the threads get saved in erroneous folder names.
Example:
Payslip.msg (with attachment "PayslipJuly.pdf"),
Sent July 2022
With label 'finance-related-payslips'
Expected outputs (2 files in same path):
Payslips > 2022 > July > Payslip > Payslip.pdf (formerly .msg)
Payslips > 2022 > July > Payslip > PayslipJuly.pdf
Actual output
Payslips > YYYY > MM > Payslip.pdf (formerly .msg)
No attachments.
Artefacts:
Global filter (just to confirm I'm not leaving out anything relevant):
Offending rule:
Relevant execution log snippet:
Appreciate any assistance as I am sure I am getting a lot wrong - I am sure this is a very powerful tool once I get the hang of it!
The text was updated successfully, but these errors were encountered: