Closed db82407 closed 6 months ago
@db82407 the issue you are facing is, that you want to execute an attachment
action within a thread
context where no attachment is defined yet.
You have to at least wrap it within an attachments
property that takes a list of attachment configs.
I recommend to use the Gmail Processor Playground that performs a schema check and shows you that attachment.store
is the reason of the problem.
Also have a look at the new examples section in the documentation.
Describe the bug
The
attachment.store
action fails withTypeError: Cannot read properties of undefined (reading 'object')
at store (GmailProcessorLib:300:84)\n at descriptor.value (GmailProcessorLib:4673:35)To Reproduce
Steps to reproduce the behavior:
Config: (note this expects email to have
dmarc
label):dry-run
works ok, butsafe-mode
fails attempting to store first attachment.Expected behavior
The attachment should be stored in GDrive, without causing a TypeError.
Logs / Screenshots
Here's the body of a failed email with attachment:
Additional context
Affected version of gmail-processor: 24
The code at
GmailProcessorLib:300:84
is:so it looks like
context.attachment
is undefined.Add any other context about the problem here.
I attempted to debug this myself, by copying the library code (advanced), but that failed to run with this reference error:
here's GmailProcesorLib.gs:132