Best answer

Getting an error on attaching files to Infinity: Object of type LazyFile is not JSON serializable


Userlevel 1

I have tried several ways to creat a zap, which takes an email and puts that into Infinity.

This all works beautifully as long as I do not try to integrate the attachments into this zap.

As soon as I try to use the attachment field for the Infinity action and test the workflow, I always get the following error:

Object of type LazyFile is not JSON serializable

I have tried this with the Email by Zapier app as well as the generic IMAP app as trigger.

In the Email by Zapier app I can see that the attachment is dehydrated in some S3 bucket. I thougt that maybe that specific detail is a problem for the Infinity action.
But the same error comes up with the IMAP app, where the attachment shouldn’t be dehydrated, then rehydrated as far as I know.

Can somebody pin down on which side the reason for this error is?
Do I need to do something to not get a LazyFile-type before the Infinity action part or should the Infinity action part be able to deal with a LazyFile-type (probably by dehydrating and getting the file).

icon

Best answer by Danvers 9 June 2022, 16:32

View original

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

13 replies

Userlevel 7
Badge +14

Hi @bravo270 

Good question.

Please post screenshots with how your Zap step is configured in order for us to have more context, thanks.

Are you using the Infinity File Upload Zap action?

 

Userlevel 1

@Troy Tessalone I am using the Create a New Item in Infinity Zap action

 

I didn’t realize that there is a dedicated action to upload a file, since this generic action exposes an attachment field.

I redacted any information concerning my person.
If needed, I can recreate the whole thing without revealing information.

First, the trigger:

this mailbox is only for this specific zap, so no worries about it being exposed to the internet

Next, the action:

In my Infinity board exists a field of type attachments, which has the name “Anhang” (since I am german).

What I want to achieve is:

Put every new mail into a specific Infinity board. If that mail has attachments, then put these attachments into the new entry in the Infinity board.

That way I could capture anything (thoughts, reminders, offers, etc.) in one board. This is a variation of a GTD inbox.

Do I understand correctly that even with the IMAP trigger the attachments on that mail are first saved by Zapier and dehydrated before the action is started?
In that case the error is actually 100% the same as with the Email by Zapier trigger.

Userlevel 7
Badge +14

@bravo270

Try using the Infinity File Upload Zap action to see if the same error exists.

 

Userlevel 1

OK, so this action works from Zapiers side - but where exactly does that file go inside Infinity?

 

The action only lets me choose the workspace where that file should go.

But there is seemingly no way to specify a board or a folder inside a board.
So if I want to create an Item from an Email, I can successfully create that item in a specific flder in a specific board, but I cannot attach a file to that item - or any item in that folder.

What am I missing?
Right now this action is technically successful, but absolutely useless to me.

Userlevel 3
Badge +4

Hey @bravo270! So with the File Upload to Infinity action, am I correct in understanding your Zap is only giving you the option to upload to a workspace and not to a specific folder/board? 🤔 

Userlevel 1

@TamRazzleDazzle 

Yes, that is correct.

Userlevel 7
Badge +12

Hi @bravo270!

I haven’t used Infinity and we don’t have any notes on using attachments, but I suspect that you need to use something from the upload item step, like the path or link. In other words, if we imagine Infinity like a bookshelf, the Attach file puts a book on the shelf and the in the Create Item step, you tell Infinity where on the shelf to find the book. When you look at the output of the Upload file action, are there any fields that stand out as something you would expect to see in Infinity? 

Userlevel 1

@Danvers 

Sorry for taking so long to answer, life got in the way.

I am not seeing anything in the output besides a link to an S3 bucket belonging to Infinity and a path.

The path suggests that the file actually made it to Infinity, but the filename seems to be emtpy.

Regardless, I cannot spot any way to access this path either via another step in the zap or directly in Infinity.

This is what I see when creating another step after Uploading a file to Infinity:

Here’s the Workspace in Infinity:

 

So all in all this doesn’t seem to work like I would want it to.

I’ll probably will go another route and script my own forwarding of mails to Infinity via their API, since I can then run that on my cloud server directly against the local mailbox.

Userlevel 7
Badge +12

Hi @bravo270! No worries, life has a habit of doing that for all of us.

 

Have you tried using the Path field as in the Attachments field in the Create Item step? 

That would be my best guess as to which field you need. If that doesn’t work then I hope you have better luck with your other option!

Userlevel 1

@Danvers 

I tried that, as well as the link attribute and a few of the name attributes.

So far all created items in Infinity still do not have an attachment.

 

The link and the path attributes seem like the most promising out of all available attributes.
If those do not yield a positive result, I am out of ideas for this one.

Thanks again for the help and maybe someone else can use this information for their workflow.

Userlevel 7
Badge +12

I’m sorry that we weren’t able to get to the bottom of this, @bravo270

The Infinity team developed the integration so perhaps you could try reaching out to them? If you explain that you know how to use Zapier, but you’re not sure which bit of data should go in the attachment field they might be able to help you.

Userlevel 1

@Danvers You are right, I should not pull a denvercoder9.

I just wrote a Mail to the Infinity team with the link to this thread.

We’ll see if they will answer here or me directly.

Should I get new information, I will post it here.

Userlevel 1

I got an answer from the Infinity team:

We have gone through our Zapier tickets and known issues that we have, unfortunately - this specific one did pop up as a ticket which I have tested back in April. 
This specific issue will require us to redesign this specific action (both of them, upload file and create an item) and refactor a part of the zapier - which will take a bit more resources.

Currently this specific issue is in our backlog, however - once our team picks it up and resolves the issue we'll make sure to come back here and update you on it.

 

Right now, this is not possible with the current Zapier actions.
They are aware of the problem and have a plan to address it.
@Danvers thanks again for your help in this.