How to identify the correct attachment

Hi there,

I have a question, I am receiving a lot of emails with different attachments at each time some times is attachment 0 or some time attachment 10. My issue I can not tell the extract node which file to extract as it variance a lot fo time

Here in this example i was using number 3 as it was the normal file but now the sender change and is number 0. How can I garantee that it looks only for the xlsx format and the current number of attachment.

Information on your n8n setup

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

I noticed you re-posted this question, so I"ll close this one.

Hey @Camilo_Vargas , use the below code to split your binaries into separate items as an example. This way you can easily determine which one you need. Besides, the variable holding the binary will always have the same name - data in my example.

Sorry, I posted the wrong link above; here’s the duplicate topic: