# E-mail IMAP Trigger - Error Trying Upload File to S3 from E-mail attachment

**URL:** <https://community.n8n.io/t/e-mail-imap-trigger-error-trying-upload-file-to-s3-from-e-mail-attachment/29580>\
**Category:** Questions\
**Tags:** send-email\
**Created:** [August 21, 2023, 12:41pm UTC](https://community.n8n.io/t/e-mail-imap-trigger-error-trying-upload-file-to-s3-from-e-mail-attachment/29580 "2023-08-21T12:41:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcelo\_Stevacci](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/marcelo_stevacci/32/25240_2.png) [@Marcelo\_Stevacci](https://community.n8n.io/u/Marcelo_Stevacci)\
**Post date:** [August 21, 2023, 12:41pm UTC](https://community.n8n.io/t/e-mail-imap-trigger-error-trying-upload-file-to-s3-from-e-mail-attachment/29580/1 "2023-08-21T12:41:20Z")

</div>

Hello Guys,

I’m with a problem here, i’m trying get a file from my e-mail by imap and if i try save on S3 folder, or i try to use write binary node i receive the message:

ERROR: Error finding file: /home/node/.n8n/binaryData/daa10def-a784-48bb-9e9d-e8237217b9b4

But this error occurs when I run the workflow via scheduling; if I run it manually, it works. Does anyone know what it could be?

## Information on your n8n setup

- \*\*n8n version: 0.236.3
- \*\*Database (default: SQLite): postgresql
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- \*\*Running n8n via helm chart
- \*\*Operating system: ubuntu

---

<div class="post-metadata">

**Author:** ![EmeraldHerald](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/emeraldherald/32/35355_2.png) [@EmeraldHerald](https://community.n8n.io/u/EmeraldHerald)\
**Post date:** [August 21, 2023, 4:06pm UTC](https://community.n8n.io/t/e-mail-imap-trigger-error-trying-upload-file-to-s3-from-e-mail-attachment/29580/3 "2023-08-21T16:06:50Z")

</div>

Hi @Marcelo_Stevacci 👋

That’s odd - do you have any logs from around when it fails that might shed some light as to why?

---

<div class="post-metadata">

**Author:** ![Marcelo\_Stevacci](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/marcelo_stevacci/32/25240_2.png) [@Marcelo\_Stevacci](https://community.n8n.io/u/Marcelo_Stevacci)\
**Post date:** [August 21, 2023, 4:57pm UTC](https://community.n8n.io/t/e-mail-imap-trigger-error-trying-upload-file-to-s3-from-e-mail-attachment/29580/4 "2023-08-21T16:57:44Z")

</div>

Hello @emeraldherald  
n8n | 2023-08-21T12:34:08.253Z | verbose | Workflow execution finished with error “{\n error: {\n message: ‘Error finding file: /home/node/.n8n/binaryData/daa10def-a784-48bb-9e9d-e8237217b9b4’,\n stack: ‘Error: Error finding file: /home/node/.n8n/binaryData/daa10def-a784-48bb-9e9d-e8237217b9b4\n’ +\n ’ at BinaryDataFileSystem.retrieveFromLocalStorage (/usr/local/lib/node\_modules/n8n/packages/core/dist/BinaryDataManager/FileSystem.js:177:19)\n’ +\n ’ at Object.execute (/usr/local/lib/node\_modules/n8n/packages/nodes-base/dist/nodes/S3/S3.node.js:510:36)\n’ +\n ’ at Workflow.runNode (/usr/local/lib/node\_modules/n8n/packages/workflow/dist/Workflow.js:652:28)\n’ +\n ’ at /usr/local/lib/node\_modules/n8n/packages/core/dist/WorkflowExecute.js:596:53’\n },\n workflowId: ‘7’,\n file: ‘WorkflowExecute.js’,\n function: ‘processSuccessExecution’\n}”

---

<div class="post-metadata">

**Author:** ![EmeraldHerald](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/emeraldherald/32/35355_2.png) [@EmeraldHerald](https://community.n8n.io/u/EmeraldHerald)\
**Post date:** [August 22, 2023, 9:50am UTC](https://community.n8n.io/t/e-mail-imap-trigger-error-trying-upload-file-to-s3-from-e-mail-attachment/29580/5 "2023-08-22T09:50:53Z")

</div>

Hi @Marcelo_Stevacci 👋 Thanks for that - I can’t replicate this behaviour myself. I know it might sound obvious, but when you have this cron job set up to automatically run, all servers etc. are still active and have correct permissions? 🤔

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [August 22, 2023, 9:55am UTC](https://community.n8n.io/t/e-mail-imap-trigger-error-trying-upload-file-to-s3-from-e-mail-attachment/29580/6 "2023-08-22T09:55:48Z")

</div>

Hey @Marcelo_Stevacci,

Out of interest are you running n8n in queue mode and can you share the config you are using?

---

<div class="post-metadata">

**Author:** ![Marcelo\_Stevacci](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/marcelo_stevacci/32/25240_2.png) [@Marcelo\_Stevacci](https://community.n8n.io/u/Marcelo_Stevacci)\
**Post date:** [August 23, 2023, 12:03pm UTC](https://community.n8n.io/t/e-mail-imap-trigger-error-trying-upload-file-to-s3-from-e-mail-attachment/29580/7 "2023-08-23T12:03:14Z")

</div>

Hello @emeraldherald, I believe so, because the way it operates during manual execution is the same, right? Or does it work differently when we set it up to run for the IMAP trigger?

---

<div class="post-metadata">

**Author:** ![Marcelo\_Stevacci](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/marcelo_stevacci/32/25240_2.png) [@Marcelo\_Stevacci](https://community.n8n.io/u/Marcelo_Stevacci)\
**Post date:** [August 23, 2023, 12:05pm UTC](https://community.n8n.io/t/e-mail-imap-trigger-error-trying-upload-file-to-s3-from-e-mail-attachment/29580/8 "2023-08-23T12:05:36Z")

</div>

> [@Jon](#):
>
> Out of interest are you running n8n in queue mode and can you share the config you are using?

Yes, I’m using queue mode:

I’m using this options:

“QUEUE\_BULL\_REDIS\_HOST”: “redis host”,  
“QUEUE\_BULL\_REDIS\_PORT”:“6379”,  
“EXECUTIONS\_MODE” : “queue”,  
“N8N\_HOST” : “n8n host”,  
“N8N\_EDITOR\_BASE\_URL” : "url ",  
“QUEUE\_HEALTH\_CHECK\_ACTIVE” : “true”,  
“N8N\_DIAGNOSTICS\_ENABLED”: “false”,  
“N8N\_LOG\_LEVEL”: “debug”,  
“DB\_POSTGRESDB\_HOST”: “host”,  
“DB\_POSTGRESDB\_DATABASE”: “database”,  
“DB\_POSTGRESDB\_PORT”:“5432”,  
“DB\_POSTGRESDB\_USER”: “user db”,  
“DB\_POSTGRESDB\_PASSWORD”: “”,  
“DB\_POSTGRESDB\_SSL\_REJECT\_UNAUTHORIZED” : “false”,  
“NODE\_OPTIONS”: “–max\_old\_space\_size=8000”,  
“N8N\_DEFAULT\_BINARY\_DATA\_MODE”: “filesystem”

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [August 23, 2023, 2:05pm UTC](https://community.n8n.io/t/e-mail-imap-trigger-error-trying-upload-file-to-s3-from-e-mail-attachment/29580/9 "2023-08-23T14:05:21Z")

</div>

Hey @Marcelo_Stevacci,

So I suspect the issue might be `N8N_DEFAULT_BINARY_DATA_MODE` I don’t think filesystem is fully supported when using queue mode so it might be worth changing that to default to see if it helps.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [November 21, 2023, 2:05pm UTC](https://community.n8n.io/t/e-mail-imap-trigger-error-trying-upload-file-to-s3-from-e-mail-attachment/29580/10 "2023-11-21T14:05:49Z")

</div>

Closed on November 21, 2023, 2:05pm UTC

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