Email Attachement IMAP

Hello,

Describe the problem/error/question

I try to automate a process triggered by incoming email. (Gmail).
I successfully create the IMAP trigger, It returns correctly the email and send the content of the email and the attachements as binary data
There area couple of issues with being able to manage the attachements.

  1. They are returned as binary data and if there are multiple attachement the node returns only one item. Thus it’s impossible to loop on the various attachements.
  2. I don’t find any ways to filter the output according to the attachement type( i.e. pdf, xlsx…)
    Any clews?
    Thanks a lot

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

{
“meta”: {
“instanceId”: “046c1d4ca3d052b8d3d0ed53a37b202b656c418dd06870efdc5158e29140ac97”
},
“nodes”: [
{
“parameters”: {
“postProcessAction”: “nothing”,
“format”: “resolved”,
“options”: {}
},
“id”: “5fbd7a38-ee77-46e5-8141-0d9f39074815”,
“name”: “Email Trigger (IMAP)”,
“type”: “n8n-nodes-base.emailReadImap”,
“typeVersion”: 2,
“position”: [
120,
500
],
“credentials”: {
“imap”: {
“id”: “B9AVebltCObCQ6Zz”,
“name”: “IMAP account”
}
}
}
],
“connections”: {},
“pinData”: {}
}

Operating system is MAC OS Ventura 13
N8n is working on Docker

Hi @Mauerhofer_Philip ,

Welcome to the community! :dizzy:

I tried to replicate this but was not able to replicate the error. The workflow outputted the 2 attachments without issues.

Can you share your workflow using this option maybe?


I wasn’t able to use the Json you shared to replicate so there may be some differences in the application.

Thanks a lot for your help

After a good night of sleep, I found the answer… in my next node I found way to import the data binary.

Thanks again

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.