Email attachment to NextCloud

First of all, thanks for this great applicaation. It’s really useful and I have already created a couple of workflows.

I can’t get one of my workflows to work though. This is the scenario:
Get a pdf attachment from an email (IMAP Email)
Get data (invoice date) from the pdf (Read PDF)
Write the attachment to NextCloud (ownCloud actually) (NextCloud)

Whatever I try though, I can’t get the last step to work. I tried attachment_0 as the Binary property on the NextCloud module. I tried to insert a Move Binary Data to JSON step just after the IMAP step. But it seems the attachment data gets lost after any step that I add.

What does work is a simple WF: IMAP Email → NextCloud, using attachment_0 as binary property. But as soon as I put something in between those 2 steps, I lose my attachment.

Any suggestions on how to get this to work?

Welcome to the community @vco1 and great to hear that you enjoy n8n!

Yes, you are right. The “Read PDF” node really seems to lose the binary data (it is to be honest a horrible node anyway and I hope we can improve it soon). That is a bug and will be fixed in the next version.

One workaround would be to simply merge the data back again with a Merge-Node set to “Merge By Index” as in this example:

Thanks for your prompt reply. The workaround did the trick!

The Read PDF node might not be flawless, it’s definitely very useful.

Great to hear that it works!

“Not flawless” is for sure a very very nice way to describe the node.

Fix got released with [email protected]

1 Like

Wow, that’s fast! Thank you.

Was good timing with us wanting to release a new version anyway today :wink: