AutomationFlowsEmail & Gmail › Email Attachments to S3

Email Attachments to S3

Email Attachments to S3. Uses microsoftOutlook, awsS3. Event-driven trigger; 6 nodes.

Event trigger★★★★☆ complexity6 nodesMicrosoft OutlookAWS S3
Email & Gmail Trigger: Event Nodes: 6 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Email Attachments to S3",
  "nodes": [
    {
      "parameters": {},
      "id": "04cc22cc-d77e-44d1-b110-f2ee49a92cd4",
      "name": "Start",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        240,
        304
      ]
    },
    {
      "parameters": {
        "operation": "get",
        "messageId": {
          "__rl": true,
          "value": "AAMkADA4ZGY1MGQ1LWFlMzYtNGNmMy05MzIwLTE3MjIyYjY1MDU5NQBGAAAAAAB83YfVwBYtRJ72dwi_Xjx-BwCxLY7wO36PQoHPQ-Ey4o7NAABIUDIBAACxLY7wO36PQoHPQ-Ey4o7NAABsH0hcAAA=",
          "mode": "list",
          "cachedResultName": "Buy2Sell stocklist ",
          "cachedResultUrl": "https://outlook.office365.com/owa/?ItemID=AAMkADA4ZGY1MGQ1LWFlMzYtNGNmMy05MzIwLTE3MjIyYjY1MDU5NQBGAAAAAAB83YfVwBYtRJ72dwi%2BXjx%2FBwCxLY7wO36PQoHPQ%2FEy4o7NAABIUDIBAACxLY7wO36PQoHPQ%2FEy4o7NAABsH0hcAAA%3D&exvsurl=1&viewmodel=ReadMessageItem"
        },
        "output": "raw",
        "options": {}
      },
      "id": "af57943d-4a31-40ce-add6-5bff9aea93b7",
      "name": "Get Emails with Attachments",
      "type": "n8n-nodes-base.microsoftOutlook",
      "typeVersion": 2,
      "position": [
        464,
        304
      ],
      "credentials": {
        "microsoftOutlookOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "fieldToSplitOut": "$binary",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        1136,
        304
      ],
      "id": "897b9212-2168-4afd-9ec1-37bf086300f2",
      "name": "Split Out"
    },
    {
      "parameters": {
        "resource": "messageAttachment",
        "operation": "getAll",
        "messageId": {
          "__rl": true,
          "value": "={{ $json.id }}",
          "mode": "id"
        },
        "returnAll": true,
        "options": {}
      },
      "id": "0e0d2eac-9201-435e-a108-1f9d311360b1",
      "name": "Get All Attachments",
      "type": "n8n-nodes-base.microsoftOutlook",
      "typeVersion": 2,
      "position": [
        688,
        304
      ],
      "credentials": {
        "microsoftOutlookOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "messageAttachment",
        "operation": "download",
        "messageId": {
          "__rl": true,
          "value": "={{ $(\"Get Emails with Attachments\").item.json.id }}",
          "mode": "id"
        },
        "attachmentId": {
          "__rl": true,
          "value": "={{ $json.id }}",
          "mode": "id"
        }
      },
      "id": "556e3b44-70f9-41de-88d8-7fea36a423bc",
      "name": "Download Attachment",
      "type": "n8n-nodes-base.microsoftOutlook",
      "typeVersion": 2,
      "position": [
        912,
        304
      ],
      "credentials": {
        "microsoftOutlookOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "upload",
        "bucketName": "terraform-eb-immense-shrew",
        "fileName": "buy2sell/Stocklist.csv",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.awsS3",
      "typeVersion": 2,
      "position": [
        1344,
        304
      ],
      "id": "77971c24-246e-4b13-9bee-3b8385b6c8c0",
      "name": "Upload a file",
      "credentials": {
        "aws": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Get Emails with Attachments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Emails with Attachments": {
      "main": [
        [
          {
            "node": "Get All Attachments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get All Attachments": {
      "main": [
        [
          {
            "node": "Download Attachment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Attachment": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Upload a file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "versionId": "fb047cb7-c397-449a-9954-d67766c51e64",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "z9nFAt7pixYhkZra",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Email Attachments to S3. Uses microsoftOutlook, awsS3. Event-driven trigger; 6 nodes.

Source: https://github.com/elecboard/terraform-infra/blob/31974fe2063af9c5f3744471ada943d21a62f7ae/n8n/Buy2Sell.json — original creator credit. Request a take-down →

More Email & Gmail workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Email & Gmail

This workflow takes new Outlook emails with attachments and helps archive the relevant files in DATEV DMS.

Microsoft Outlook Trigger, @Klardaten/N8N Nodes Datevconnect, Slack +1
Email & Gmail

This workflow automates the process of saving binary attachments from Outlook emails into newly created folders in OneDrive. It's ideal for users who regularly receive files and need them organized in

Microsoft Outlook Trigger, Microsoft One Drive, Microsoft Outlook
Email & Gmail

Create Add An Attachment And Send A Draft Using Microsoft Outlook. Uses manualTrigger, microsoftOutlook, httpRequest. Event-driven trigger; 5 nodes.

Microsoft Outlook, HTTP Request
Email & Gmail

This workflow allows you to create, add an attachment, and send a draft using the Microsoft Outlook node.

Microsoft Outlook, HTTP Request
Email & Gmail

Stop letting email attachments pile up in your inbox. Let automation file every document the moment it arrives.

Microsoft Outlook, Microsoft One Drive, Microsoft SharePoint +1