# Insert database queries in to email template

**URL:** <https://forum.manager.io/t/insert-database-queries-in-to-email-template/6001>\
**Category:** Uncategorized\
**Created:** [June 9, 2016, 10:12am UTC](https://forum.manager.io/t/insert-database-queries-in-to-email-template/6001 "2016-06-09T10:12:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![PCRaamsdonksveer](https://avatars.discourse-cdn.com/v4/letter/p/4da419/32.png) [@PCRaamsdonksveer](https://forum.manager.io/u/PCRaamsdonksveer)\
**Post date:** [June 9, 2016, 10:12am UTC](https://forum.manager.io/t/insert-database-queries-in-to-email-template/6001/1 "2016-06-09T10:12:00Z")

</div>

Is there a way to insert database code into email templates? the way it is done in the general templates for invoice etc.

e.g:

```
Subject : invoice #{{ strings.invoice_number }}

Dear {{ customer.name }}, 

Thank you for using our service. 

Please find invoice #{{ strings.invoice_number }} attached.

```

---

<div class="post-metadata">

**Author:** ![Jon](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/jon/32/1915_2.png) [@Jon](https://forum.manager.io/u/Jon)\
**Post date:** [June 9, 2016, 8:59pm UTC](https://forum.manager.io/t/insert-database-queries-in-to-email-template/6001/2 "2016-06-09T20:59:46Z")

</div>

See this thread:

> [@Custom generated PDF filename in sales quote](https://forum.manager.io/t/custom-generated-pdf-filename/1659/4):
>
> At the moment, only one variable is supported on email templates and that is {{reference}} in subject line. So, under email templates, use subject QUOTE {{reference}}

---

<div class="post-metadata">

**Author:** ![lubos](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/lubos/32/62798_2.png) [@lubos](https://forum.manager.io/u/lubos)\
**Post date:** [June 10, 2016, 12:39pm UTC](https://forum.manager.io/t/insert-database-queries-in-to-email-template/6001/3 "2016-06-10T12:39:04Z")

</div>

Variables like that can’t be used in email templates yet. It will be definitely implemented sometime this year.

---

<div class="post-metadata">

**Author:** ![PCRaamsdonksveer](https://avatars.discourse-cdn.com/v4/letter/p/4da419/32.png) [@PCRaamsdonksveer](https://forum.manager.io/u/PCRaamsdonksveer)\
**Post date:** [June 10, 2016, 1:37pm UTC](https://forum.manager.io/t/insert-database-queries-in-to-email-template/6001/4 "2016-06-10T13:37:23Z")

</div>

Thank you for your reply. That would make manager a step closer to beeing, the single tool I need for my daily (routine) operations.

If possible also, the possibilty to insert the logo. e.g.

`<img src="{{ business.logo }}" style="max-width: 300px; max-height: 150px">`

Thank you in advance, it’s an awseome product, keep up the good work!

---

<div class="post-metadata">

**Author:** ![Mian\_Waqas\_Azfar](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/mian_waqas_azfar/32/13707_2.png) [@Mian\_Waqas\_Azfar](https://forum.manager.io/u/Mian_Waqas_Azfar)\
**Post date:** [May 9, 2018, 8:33am UTC](https://forum.manager.io/t/insert-database-queries-in-to-email-template/6001/5 "2018-05-09T08:33:18Z")

</div>

> [@PCRaamsdonksveer](#):
>
> k you for using our service.
> 
> Please find invoice #{{ strings.invoice\_number }} attached.

Dear Lubos,  
any update about it ?  
It is really important to add Client name Invoice numbers in emails.  
If possible please let me know.  
i checked user guides but i was unable to find anything related to that.

---

<div class="post-metadata">

**Author:** ![sharpdrivetek](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/sharpdrivetek/32/34244_2.png) [@sharpdrivetek](https://forum.manager.io/u/sharpdrivetek)\
**Post date:** [May 9, 2018, 8:35am UTC](https://forum.manager.io/t/insert-database-queries-in-to-email-template/6001/6 "2018-05-09T08:35:24Z")

</div>

search the forum. solutions were already provided.

---

<div class="post-metadata">

**Author:** ![Mian\_Waqas\_Azfar](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/mian_waqas_azfar/32/13707_2.png) [@Mian\_Waqas\_Azfar](https://forum.manager.io/u/Mian_Waqas_Azfar)\
**Post date:** [May 9, 2018, 8:38am UTC](https://forum.manager.io/t/insert-database-queries-in-to-email-template/6001/7 "2018-05-09T08:38:11Z")

</div>

Dear @sharpdrivetek

Can you provide me any link which have list of supported variables. ?  
i have seen this

> [@Legend of liquid array for Developing Email Template](https://forum.manager.io/t/legend-of-liquid-array-for-developing-email-template/11595/2):
>
> I don’t have a list of other variables. The Guide about email templates was adapted from one written by the developer, which only mentioned the one variable. But they will be the same ones visible in code for themes. Other users have posted some lists they developed in the past. Search the forum.

I want all workable variable so i can create my own email templates.

---

<div class="post-metadata">

**Author:** ![sharpdrivetek](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/sharpdrivetek/32/34244_2.png) [@sharpdrivetek](https://forum.manager.io/u/sharpdrivetek)\
**Post date:** [May 9, 2018, 8:40am UTC](https://forum.manager.io/t/insert-database-queries-in-to-email-template/6001/8 "2018-05-09T08:40:45Z")

</div>

there is no such list.  
all variables available can be found in the default theme.  
also on the forum where users have shared the same.

---

<div class="post-metadata">

**Author:** ![Ealfardan](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/ealfardan/32/63166_2.png) [@Ealfardan](https://forum.manager.io/u/Ealfardan)\
**Post date:** [January 18, 2023, 3:11pm UTC](https://forum.manager.io/t/insert-database-queries-in-to-email-template/6001/9 "2023-01-18T15:11:40Z")

</div>


