Upload a Mail Attachment into nextcloud

How can I upload the full data of an email attachment into my nextcloud

ERROR: No binary data property “data” does not exists on item!

Please share the workflow

(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)

Hi @dpit2all, welcome to the community!

I am sorry to hear you’re having trouble. I can see two problems here:

  1. On your IMAP node, you’re giving a name of attchment_0, attachment_1 etc. to your binary items:
  2. In your Nextcloud node you’re then reading a nameless binary item, which doesn’t exist:

So what you want to do here is making sure both nodes use the same binary properties. Changing the Binary Property value in your Nextcloud node to attachment_0 should cause the first attachment coming in from your IMAP node to be uploaded by the Nextcloud node as expected. No need for an expression here.

1 Like

Thank you very much! Now everythings works like it is expected to do. Just another Question, is it possible to filter the mail via subject in n8n? I’ve tried [“UNSEEN”, [“subject”, “example”]], but it didn’t worked like expected…

1 Like