Lune Logo

© 2025 Lune Inc.
All rights reserved.

support@lune.dev

Want to use over 200+ MCP servers inside your coding tools like Cursor?

Asked 1 month ago by LunarEnvoy513

How can I pass binary email attachments from Outlook to a child workflow for DropBox upload in n8n?

The post content has been automatically edited by the Moderator Agent for consistency and clarity.

I am trying to configure an n8n workflow where an AI Agent handles email attachments from a Microsoft Outlook trigger and then passes the binary file to a child workflow for DropBox upload (using the DropBox node action).

I attempted various approaches including saving the file locally and later reloading it in the child workflow, but the binary attachment cannot be found (error: "This operation expects the node’s input data to contain a binary file 'data', but none was found [item 0]"). I suspect this could be related to using the n8n cloud version.

Below is the current workflow configuration in JSON format:

JSON
{ "nodes": [ { "parameters": { "pollTimes": { "item": [ { "mode": "everyX" } ] }, "filters": { "foldersToInclude": [ "" ] }, "options": { "attachmentsPrefix": "attachment_", "downloadAttachments": true } }, "type": "n8n-nodes-base.microsoftOutlookTrigger", "typeVersion": 1, "position": [ -1180, -500 ], "id": "c1ae5420-bade-4197-8ef9-c0d26720222a", "name": "Microsoft Outlook Trigger", "notesInFlow": true, "credentials": { "microsoftOutlookOAuth2Api": { "id": "", "name": "Microsoft Outlook account" } } }, { "parameters": { "promptType": "define", "text": "={{ $json.bodyPreview }}", "options": { "systemMessage": "=You are an assistant that needs to help me with reacting to various emails.\n\nIf a email comes in from a supplier, the invoice or order confirmation needs to be send towards DropBox using the Send to DropBox tool. The attachment was already saved in a previous step. Keep the original filename, {{ $json.fileName }}\n\ ", "returnIntermediateSteps": false, "passthroughBinaryImages": false } }, "type": "@n8n/n8n-nodes-langchain.agent", "typeVersion": 1.7, "position": [ -640, -500 ], "id": "da8d5b55-d86d-49f2-88ab-c43d9a8b8021", "name": "AI Agent", "alwaysOutputData": false }, { "parameters": { "resource": "draft", "subject": "= {{ $fromAI('subject','a clear and concise email subject') }}", "bodyContent": "= {{ $fromAI('body','the body of the reply itself') }}", "additionalFields": {} }, "type": "n8n-nodes-base.microsoftOutlookTool", "typeVersion": 2, "position": [ -460, -140 ], "id": "b09f5694-b840-41a0-a743-702a2412585a", "name": "Microsoft Outlook", "credentials": { "microsoftOutlookOAuth2Api": { "id": "", "name": "Microsoft Outlook account" } } }, { "parameters": { "model": "claude-3-5-sonnet-20241022", "options": {} }, "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic", "typeVersion": 1.2, "position": [ -800, -140 ], "id": "490e1bc1-2cac-4b08-b89c-b622ceffa8dc", "name": "Anthropic Chat Model", "credentials": { "anthropicApi": { "id": "", "name": "Anthropic account" } } }, { "parameters": { "operation": "write", "fileName": "= {{ $binary.attachment_0.fileName }}", "dataPropertyName": "attachment_0", "options": {} }, "type": "n8n-nodes-base.readWriteFile", "typeVersion": 1, "position": [ -920, -500 ], "id": "409284cf-4fc0-4e3f-900f-6027dd689f43", "name": "Read/Write Files from Disk" }, { "parameters": { "name": "save_to_dropbox", "description": "Call this tool to save files to DropBox. The files were saved in a previous step and only need to be referenced by the filename.", "workflowId": { "__rl": true, "value": "A8UCs7m87eNkTMQ9", "mode": "list", "cachedResultName": "Save to DropBox" }, "workflowInputs": { "mappingMode": "defineBelow", "value": { "invoice_filename": "= {{ $fromAI('invoice_filename','the filename of the invoice') }}" }, "matchingColumns": [ "invoice_filename" ], "schema": [ { "id": "invoice_filename", "displayName": "invoice_filename", "required": false, "defaultMatch": false, "display": true, "canBeUsedToMatch": true, "type": "string", "removed": false } ], "attemptToConvertTypes": false, "convertFieldsToString": false } }, "type": "@n8n/n8n-nodes-langchain.toolWorkflow", "typeVersion": 2, "position": [ -180, -240 ], "id": "4013b599-88f1-4bca-b67e-bd83394511b3", "name": "Save to DropBox" } ], "connections": { "Microsoft Outlook Trigger": { "main": [ [ { "node": "Read/Write Files from Disk", "type": "main", "index": 0 } ] ] }, "AI Agent": { "main": [ [] ] }, "Microsoft Outlook": { "ai_tool": [ [ { "node": "AI Agent", "type": "ai_tool", "index": 0 } ] ] }, "Anthropic Chat Model": { "ai_languageModel": [ [ { "node": "AI Agent", "type": "ai_languageModel", "index": 0 } ] ] }, "Read/Write Files from Disk": { "main": [ [ { "node": "AI Agent", "type": "main", "index": 0 } ] ] }, "Save to DropBox": { "ai_tool": [ [ { "node": "AI Agent", "type": "ai_tool", "index": 0 } ] ] } }, "pinData": {}, "meta": { "templateCredsSetupCompleted": true, "instanceId": "ba9da4ec35268a89fdffca52b0e3115a108b02239de2b2f8950cf65159355395" } }

If anyone has experience passing binary data between these workflow nodes on n8n cloud, your insights would be very much appreciated.

0

Comments 0

Answers 0

Views 105

0 Answers

Discussion

No comments yet.