# HTTP File put as Attachment in SendMail

**URL:** <https://community.n8n.io/t/http-file-put-as-attachment-in-sendmail/4806>\
**Category:** Questions\
**Created:** [March 16, 2021, 11:34am UTC](https://community.n8n.io/t/http-file-put-as-attachment-in-sendmail/4806 "2021-03-16T11:34:38Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![UweG](https://avatars.discourse-cdn.com/v4/letter/u/e495f1/32.png) [@UweG](https://community.n8n.io/u/UweG)\
**Post date:** [March 16, 2021, 11:34am UTC](https://community.n8n.io/t/http-file-put-as-attachment-in-sendmail/4806/1 "2021-03-16T11:34:38Z")

</div>

Following Problem:  
I have a http-rechest which get an attachment from Ninox-Database.  
You can see in pict2 the result.  
How to put these data to SendMail as attachment?

 ![Bildschirmfoto 2021-03-16 um 12.31.05](https://europe1.discourse-cdn.com/n8n/original/2X/2/282ee6318b85dca151e4062b2de670ed2f0531da.png) ![Bildschirmfoto 2021-03-16 um 12.31.34](https://europe1.discourse-cdn.com/n8n/original/2X/f/facf25a2e8a2386cdd4092188fc37bf9d20c9f85.png) ![Bildschirmfoto 2021-03-16 um 12.32.32](https://europe1.discourse-cdn.com/n8n/original/2X/e/e4da1a97aeee9e37c87801151acf2599b629b5af.png)

Thanks in advice.  
UweG

---

<div class="post-metadata">

**Author:** ![harshil1712](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/harshil1712/32/1374_2.png) [@harshil1712](https://community.n8n.io/u/harshil1712)\
**Post date:** [March 16, 2021, 3:10pm UTC](https://community.n8n.io/t/http-file-put-as-attachment-in-sendmail/4806/2 "2021-03-16T15:10:29Z")

</div>

Hey @UweG!

Welcome to the community 🙂

After configuring the credentials, _ **From Email** _, _ **To Email** _ and other parameters, in the _ **Attachment** _ field enter `data`. We are referring the file as `data` in the _HTTP Request_ node. If it was something else, you would have to enter that in the _ **Attachement** _ field.

Hope this helps 🙂

---

<div class="post-metadata">

**Author:** ![UweG](https://avatars.discourse-cdn.com/v4/letter/u/e495f1/32.png) [@UweG](https://community.n8n.io/u/UweG)\
**Post date:** [March 16, 2021, 3:58pm UTC](https://community.n8n.io/t/http-file-put-as-attachment-in-sendmail/4806/3 "2021-03-16T15:58:56Z")

</div>

Thank’s for your answer.  
I tried to use data as attachment.  
Eher will be an error:  
ERROR: attachmentPropertyString.split is not a function

```auto
TypeError: attachmentPropertyString.split is not a function at Object.executeSingle (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/EmailSend.node.js:160:67)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/src/Workflow.js:474:60)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:395:62

```

---

<div class="post-metadata">

**Author:** ![RicardoE105](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ricardoe105/32/550_2.png) [@RicardoE105](https://community.n8n.io/u/RicardoE105)\
**Post date:** [March 16, 2021, 6:31pm UTC](https://community.n8n.io/t/http-file-put-as-attachment-in-sendmail/4806/4 "2021-03-16T18:31:14Z")

</div>

Weird, I just tested it, and it’s working fine for me. Can you share your workflow? Just select and copy the nodes, then paste them here.

---

<div class="post-metadata">

**Author:** ![UweG](https://avatars.discourse-cdn.com/v4/letter/u/e495f1/32.png) [@UweG](https://community.n8n.io/u/UweG)\
**Post date:** [March 18, 2021, 5:39am UTC](https://community.n8n.io/t/http-file-put-as-attachment-in-sendmail/4806/5 "2021-03-18T05:39:55Z")

</div>

Hello All.  
Thank you for your answers.  
I thought too complicated and entered the wrong GET request output in the attachment field of the SendMail node. Now it works fine with one attachment. However, the GET request returns sometimes several files. How can I combine them to send them in one mail? I am a beginner with N8N and English is not my mother tongue.

---

<div class="post-metadata">

**Author:** ![Pblfer](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/pblfer/32/9390_2.png) [@Pblfer](https://community.n8n.io/u/Pblfer)\
**Post date:** [December 26, 2021, 5:30am UTC](https://community.n8n.io/t/http-file-put-as-attachment-in-sendmail/4806/6 "2021-12-26T05:30:04Z")

</div>

Hello 🚀🧑🏼‍💻Thanks for these info I have the same issue but dont work for me: Just attach a file with sendgrid node.

Send works but error with attachment:

 ![Captura de Pantalla 2021-12-25 a la(s) 11.25.53 p. m.](https://europe1.discourse-cdn.com/n8n/original/2X/4/4500edca763d29c7c4fd153543d01ab628013d8d.png)

🚀The binary:

 ![Captura de Pantalla 2021-12-25 a la(s) 11.26.31 p. m.](https://europe1.discourse-cdn.com/n8n/original/2X/9/9c8a6671ddcaef6341e33a0ed1680c68ad19bd59.png)  
 ![Captura de Pantalla 2021-12-25 a la(s) 11.27.12 p. m.](https://europe1.discourse-cdn.com/n8n/original/2X/7/72d647f6e669bf82014734262e013c75a2b6fd85.png)

🤖The log:

 ![Captura de Pantalla 2021-12-25 a la(s) 11.27.35 p. m.](https://europe1.discourse-cdn.com/n8n/original/2X/d/d88a05b20fc5357f271ccecfc8b288372302a681.png)

Any idea? 🤔

---

<div class="post-metadata">

**Author:** ![RicardoE105](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ricardoe105/32/550_2.png) [@RicardoE105](https://community.n8n.io/u/RicardoE105)\
**Post date:** [December 26, 2021, 7:08pm UTC](https://community.n8n.io/t/http-file-put-as-attachment-in-sendmail/4806/7 "2021-12-26T19:08:32Z")

</div>

You do not need to set an expression in attachments, only the name of the binary property, which is’ data according to the images you shared.`

 ![image](https://europe1.discourse-cdn.com/n8n/original/2X/d/ddc7aee7ab1f2d09e5537d303c97695bd3e69cff.png)

---

<div class="post-metadata">

**Author:** ![Pblfer](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/pblfer/32/9390_2.png) [@Pblfer](https://community.n8n.io/u/Pblfer)\
**Post date:** [December 26, 2021, 10:56pm UTC](https://community.n8n.io/t/http-file-put-as-attachment-in-sendmail/4806/8 "2021-12-26T22:56:38Z")

</div>

Works!!! 🍻⚡🤟🏻😅. thanks @RicardoE105

---

<div class="post-metadata">

**Author:** ![Paddy\_Pohare](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/paddy_pohare/32/12185_2.png) [@Paddy\_Pohare](https://community.n8n.io/u/Paddy_Pohare)\
**Post date:** [April 25, 2022, 3:29pm UTC](https://community.n8n.io/t/http-file-put-as-attachment-in-sendmail/4806/9 "2022-04-25T15:29:16Z")

</div>

Hello @RicardoE105 , I have tried the same  
I have data which gets sent to spreadsheet and from there i’m using sendGrid node to send email  
I’m getting email but the attachment is empty with zero size

can you check this? also if you have any example with sendGrid node to send attachment with dummy data please share. thank you

 ![Screenshot 2022-04-25 at 8.51.11 PM](https://europe1.discourse-cdn.com/n8n/original/2X/3/380cbd33f8cdcafbf44e76e983e1d769b7f1e2dd.png)  
 ![Screenshot 2022-04-25 at 8.57.03 PM](https://europe1.discourse-cdn.com/n8n/original/2X/0/08fd7dce08eff8297c494c4948e3dd00637be920.png)  
 ![Screenshot 2022-04-25 at 8.57.40 PM](https://europe1.discourse-cdn.com/n8n/original/2X/f/f26179359db7a29acd674bbca254ba806ce11775.png)

---

<div class="post-metadata">

**Author:** ![RicardoE105](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ricardoe105/32/550_2.png) [@RicardoE105](https://community.n8n.io/u/RicardoE105)\
**Post date:** [April 25, 2022, 6:43pm UTC](https://community.n8n.io/t/http-file-put-as-attachment-in-sendmail/4806/10 "2022-04-25T18:43:54Z")

</div>

Welcome to the community @Paddy_Pohare

If you click on “Show Binary Data” can you see the file? Because if it’s empty then the issue might be creating the binary data.

---

<div class="post-metadata">

**Author:** ![Paddy\_Pohare](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/paddy_pohare/32/12185_2.png) [@Paddy\_Pohare](https://community.n8n.io/u/Paddy_Pohare)\
**Post date:** [April 25, 2022, 7:53pm UTC](https://community.n8n.io/t/http-file-put-as-attachment-in-sendmail/4806/11 "2022-04-25T19:53:22Z")

</div>

hi @RicardoE105 yes i’m able to see data in binary file,  
interesting thing we notice is if we use same workflow on local n8n app on mac its working fine  
but giving empty attachment on n8n cloud app on browser

here is example

---

<div class="post-metadata">

**Author:** ![RicardoE105](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ricardoe105/32/550_2.png) [@RicardoE105](https://community.n8n.io/u/RicardoE105)\
**Post date:** [April 26, 2022, 11:48pm UTC](https://community.n8n.io/t/http-file-put-as-attachment-in-sendmail/4806/12 "2022-04-26T23:48:41Z")

</div>

Just tested the workflow you shared and it worked fine for me. I even received the attachment in the email as expected.

---

<div class="post-metadata">

**Author:** ![Paddy\_Pohare](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/paddy_pohare/32/12185_2.png) [@Paddy\_Pohare](https://community.n8n.io/u/Paddy_Pohare)\
**Post date:** [April 27, 2022, 2:49pm UTC](https://community.n8n.io/t/http-file-put-as-attachment-in-sendmail/4806/13 "2022-04-27T14:49:22Z")

</div>

Thank you @RicardoE105 for response. We have shared our issue to support team and we got reply and It says that _this is know issue and has not been fixed yet._

So for now we are using sendEmail instead of sendGrid node.

---

<div class="post-metadata">

**Author:** ![RicardoE105](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ricardoe105/32/550_2.png) [@RicardoE105](https://community.n8n.io/u/RicardoE105)\
**Post date:** [April 27, 2022, 6:11pm UTC](https://community.n8n.io/t/http-file-put-as-attachment-in-sendmail/4806/14 "2022-04-27T18:11:12Z")

</div>

Got fixed and will be available in the next release.

> <https://github.com/n8n-io/n8n/pull/3213>
