Question

There was an error with Google Sheets: Object of type LazyFile is not JSON serializable

  • 23 February 2023
  • 1 reply
  • 88 views

Hi,

I’ve just created my first Zap!

What it does is create a new row in a Google Sheet every time an email matching a certain criteria is received. The criteria is that the email are in a specific folder and they are displayed in Google Sheet .

The columns in the Google Sheet are: Sender Name, CC includes, Title of the Mail, Date & Time, No. of Attachment, Attachment Details.

I have tested my zap by sending an email from that email address with a .jpg file but I have received an error that says: There was an error with Google Sheets: Object of type LazyFile is not JSON serializable.

I read on some of your form and found out that the proper way would be to send the attachment to Google Drive.

Now how do I link the mail and attachment to sheets such that it shows the attachment details(image/pdf/word..etc) in front of the sheet Sender Name, Title and other details.


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 7
Badge +11

Hi there @khuzi, welcome to the Community! 😁

Looking at this related topic in Community it’s not possible to add file to a Google Sheet:


As per the answer in that related topic, you’d want to get the Zap to upload the file to somewhere like Google Drive. Then add a link to view the file (on Google Drive) in the Google Sheet. You can find out more about how to work with files in your Zaps here: Send files in Zaps 

Depending on the trigger app you’re using it might be possible to see the a field that contains the file type for the attachment. Not sure what email app you’re using for the trigger but for example Gmail’s New Attachment trigger has an Attachment Details Mime Type field that contains details of the file type. 

Hope that helps. Please do report back here to let us know how you get on with this!