Multiple Attachments Mail via outlook

Describe the problem/error/question

I’m building a workflow to send emails via the Outlook node.
Each item in my workflow has a PDF file in the binary field named data, and I want to send a single email that includes all of these PDFs as attachments.

Right now, the Outlook node sends one email per item/attachment instead of one email with multiple attachments. I’d like to know how to correctly configure my workflow so that:

  • Only one email is sent

  • This email contains all PDF attachments

  • All attachments use the same binary property name (data)

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:

Hi @Benry_Hendix, welcome!

Use a Set node after the node that outputs a binary file to rename it, something like this:

Then, in the Outlook node you can add as many attachments as you want:

I don’t know what your workflow looks like, but this is a small example to show the idea:

1 Like

Thanks for the quick response @mohamed3nan! Really helpful! Your workflow works, but I’m running into an issue: since I only download all data once, it’s not working when there are multiple files.

My current workflow:

  • Download all data (PDFs) from a folder → attach to an email

The problem: The number of PDFs varies each time. When there’s only one PDF, it works perfectly, but when there are multiple PDFs, only one gets attached.

Where is the problem?!
Is it in the workflow design for aggregating all PDFs, or in the Outlook attachment node configuration itself?

There are many ideas to explore before thinking about a sub-workflow with a workflow json expressions,

For example, you could use a switch that routes based on the number of attachments (10 routes?), and for each case configure the outlook node accordingly..

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