# Send Email through automation does not work templates in the body of the email

**URL:** <https://community.fibery.io/t/send-email-through-automation-does-not-work-templates-in-the-body-of-the-email/5119>\
**Category:** Bugs & Issues\
**Created:** [September 11, 2023, 1:11pm UTC](https://community.fibery.io/t/send-email-through-automation-does-not-work-templates-in-the-body-of-the-email/5119 "2023-09-11T13:11:06Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mikhail](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/mikhail/32/7493_2.png) [@Mikhail](https://community.fibery.io/u/Mikhail)\
**Post date:** [September 11, 2023, 1:11pm UTC](https://community.fibery.io/t/send-email-through-automation-does-not-work-templates-in-the-body-of-the-email/5119/1 "2023-09-11T13:11:06Z")

</div>

Hi! I have database “Emails”. When a record is added to the database, I need automatically send a “Link1” link in the body of the email. I’ve tried writing the template in different ways but nothing works.  
“Link1” link does not come, i.e. the body of the message is empty.

![10158chrome](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/2/253e99da3401a72c2c6c0b780ef6e6e9d2d9fb2b.png)

Is this a bug or am I not recording the template correctly?

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [September 11, 2023, 1:56pm UTC](https://community.fibery.io/t/send-email-through-automation-does-not-work-templates-in-the-body-of-the-email/5119/2 "2023-09-11T13:56:59Z")

</div>

You should be able to just use `{{Link1}}`

The rest are probably causing the automation to break/abort

---

<div class="post-metadata">

**Author:** ![Mikhail](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/mikhail/32/7493_2.png) [@Mikhail](https://community.fibery.io/u/Mikhail)\
**Post date:** [September 11, 2023, 3:04pm UTC](https://community.fibery.io/t/send-email-through-automation-does-not-work-templates-in-the-body-of-the-email/5119/3 "2023-09-11T15:04:39Z")

</div>

> [@Chr1sG](#):
>
> to just use `{{Link1}}`

I tried it - it doesn’t work.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [September 11, 2023, 3:09pm UTC](https://community.fibery.io/t/send-email-through-automation-does-not-work-templates-in-the-body-of-the-email/5119/4 "2023-09-11T15:09:24Z")

</div>

Can you show us the whole automation (including activity log), a peek at an entity which you’ve tried running it on, and what the resultant email looks like.  
We can debug for you.

---

<div class="post-metadata">

**Author:** ![Mikhail](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/mikhail/32/7493_2.png) [@Mikhail](https://community.fibery.io/u/Mikhail)\
**Post date:** [September 11, 2023, 3:30pm UTC](https://community.fibery.io/t/send-email-through-automation-does-not-work-templates-in-the-body-of-the-email/5119/5 "2023-09-11T15:30:37Z")

</div>

> [@Chr1sG](#):
>
> We can debug for you.

I figured it out. The problem was that the “Link1” field was still empty when the automation was triggered. It sends away an empty field.

**Can you suggest Javascript code that will wait until the “Link1” field is filled?**  
I’ll insert it before triggering the automation to send the email.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [September 11, 2023, 3:32pm UTC](https://community.fibery.io/t/send-email-through-automation-does-not-work-templates-in-the-body-of-the-email/5119/6 "2023-09-11T15:32:33Z")

</div>

Can’t you trigger the automation to run when Link1 field is updated and use a filter of ‘is not empty’?

---

<div class="post-metadata">

**Author:** ![Mikhail](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/mikhail/32/7493_2.png) [@Mikhail](https://community.fibery.io/u/Mikhail)\
**Post date:** [September 11, 2023, 3:38pm UTC](https://community.fibery.io/t/send-email-through-automation-does-not-work-templates-in-the-body-of-the-email/5119/7 "2023-09-11T15:38:23Z")

</div>

If I set it this way:  
 ![10168chrome](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/9/9ae83cd2f0d56040db98e042011fc0f77bb84c89.png)

it doesn’t work at all, most likely because “Link1” takes time to fill out (it’s lookup field).

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [September 11, 2023, 3:40pm UTC](https://community.fibery.io/t/send-email-through-automation-does-not-work-templates-in-the-body-of-the-email/5119/8 "2023-09-11T15:40:01Z")

</div>

You can use the ‘Emails updated’ trigger (as well or instead of) and choose the Link1 field as the field to monitor.

---

<div class="post-metadata">

**Author:** ![Mikhail](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/mikhail/32/7493_2.png) [@Mikhail](https://community.fibery.io/u/Mikhail)\
**Post date:** [September 11, 2023, 3:43pm UTC](https://community.fibery.io/t/send-email-through-automation-does-not-work-templates-in-the-body-of-the-email/5119/9 "2023-09-11T15:43:18Z")

</div>

![10169chrome](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/0/034507c1043a1c5868fc834053c38a3eabe4989c.png)

It helped. It worked.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [September 11, 2023, 4:03pm UTC](https://community.fibery.io/t/send-email-through-automation-does-not-work-templates-in-the-body-of-the-email/5119/10 "2023-09-11T16:03:34Z")

</div>

A post was split to a new topic: [Timer in automation](https://community.fibery.io/t/timer-in-automation/5125)
