# Creating emails in trigger using table data

**URL:** <https://community.tulip.co/t/creating-emails-in-trigger-using-table-data/2677>\
**Category:** Support, Troubleshooting, & Help\
**Created:** [May 7, 2021, 11:15am UTC](https://community.tulip.co/t/creating-emails-in-trigger-using-table-data/2677 "2021-05-07T11:15:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hwagner](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/hwagner/32/860_2.png) [@hwagner](https://community.tulip.co/u/hwagner)\
**Post date:** [May 7, 2021, 11:15am UTC](https://community.tulip.co/t/creating-emails-in-trigger-using-table-data/2677/1 "2021-05-07T11:15:04Z")

</div>

I know this can be done but I’m running into a brick wall. I am trying to set up an email to be sent to pull data from the table whether it be three data points or 6 data points. I set up the email to include all fields that I want to report on if there is data available however, if there is only one set of information I need to send (not all), the email is not sending. I spoke to Live Chat and they suggested using LINK in the expression but I’m still having issues getting the email to run properly. I miss the day of using the STATIC function.

---

<div class="post-metadata">

**Author:** ![gio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/gio/32/82_2.png) [@gio](https://community.tulip.co/u/gio)\
**Post date:** [May 7, 2021, 12:54pm UTC](https://community.tulip.co/t/creating-emails-in-trigger-using-table-data/2677/2 "2021-05-07T12:54:32Z")

</div>

hello @hwagner, we can certainly help out here!!

could you share a screenshot of the Trigger that sends the email??

in general, the `LINK()` function returns the first argument that isn’t Null. in this example, if @Variable.QR has a value, that will be sent. otherwise, “Hello World” would be emailed:

 ![Screen Shot 4](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/0/0edbd09194933625810d40f5086f8bdf938ba503.jpeg)

---

<div class="post-metadata">

**Author:** ![hwagner](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/hwagner/32/860_2.png) [@hwagner](https://community.tulip.co/u/hwagner)\
**Post date:** [May 7, 2021, 1:15pm UTC](https://community.tulip.co/t/creating-emails-in-trigger-using-table-data/2677/3 "2021-05-07T13:15:27Z")

</div>

Thanks Gio,

I think maybe I was not explaining it correctly to Live Chat because they told me to use this to send the message if I only had one part #/description/qty to send even though the message was built out to show all 5 should there be that many (if that makes sense).

This is a test that I created to make sure it worked. For example, if only one table record is in the table then I want this email to send even though it is mapped out for two.

![image](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/0/0293b8de303e4c663137ad932f2db40585bcb420.png)

---

<div class="post-metadata">

**Author:** ![gio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/gio/32/82_2.png) [@gio](https://community.tulip.co/u/gio)\
**Post date:** [May 7, 2021, 1:26pm UTC](https://community.tulip.co/t/creating-emails-in-trigger-using-table-data/2677/4 "2021-05-07T13:26:30Z")

</div>

OK, thanks for clarifying @hwagner!!

have you tried placing all the individual Table Record Fields in `LINK()` functions??

for example: `LINK(Table Record.Parts Assembly.Missing Parts 2, "")`. in this example, if there is a `Missing Parts 2` present, it’ll be included in the email. else, it’ll include an empty string.

let me know if this is helpful!!

---

<div class="post-metadata">

**Author:** ![hwagner](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/hwagner/32/860_2.png) [@hwagner](https://community.tulip.co/u/hwagner)\
**Post date:** [May 7, 2021, 1:29pm UTC](https://community.tulip.co/t/creating-emails-in-trigger-using-table-data/2677/5 "2021-05-07T13:29:40Z")

</div>

Ok. Let me try that as I did not put the two " " in the string.

---

<div class="post-metadata">

**Author:** ![hwagner](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/hwagner/32/860_2.png) [@hwagner](https://community.tulip.co/u/hwagner)\
**Post date:** [May 9, 2021, 1:09pm UTC](https://community.tulip.co/t/creating-emails-in-trigger-using-table-data/2677/6 "2021-05-09T13:09:50Z")

</div>

Hi Gio,

I tried doing this and it only partially worked. Hoping you can help.

![image](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/a/a844815269ec5987f36a8dc1da4d89ae3ecbc860.png)

![image](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/6/63aa66aaf8c6c92e2203cbdf0e5a7b4039c7cf05.png)

Thanks,  
Heather

---

<div class="post-metadata">

**Author:** ![gio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/gio/32/82_2.png) [@gio](https://community.tulip.co/u/gio)\
**Post date:** [May 9, 2021, 2:15pm UTC](https://community.tulip.co/t/creating-emails-in-trigger-using-table-data/2677/7 "2021-05-09T14:15:14Z")

</div>

hello @hwagner,

it looks like there are some unclosed parentheses in some of the `LINK()` functions, starting at the the `Table Record.Parts Assembly.Missing Parts 3`. could you try adjusting this and letting me know if it solves it??

furthermore, you could place the commas in the first arguments of the `LINK()` functions to avoid the trailing commas:

 ![Screen Shot 7](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/4/47af0fc4dec230dec31cbb942cb706791afa6176.jpeg)

let me know if this helps!!
