# Trying to optimize a "Slack message" template field

**URL:** <https://community.glideapps.com/t/trying-to-optimize-a-slack-message-template-field/63447>\
**Category:** Ask for Help\
**Created:** [July 3, 2023, 5:45pm UTC](https://community.glideapps.com/t/trying-to-optimize-a-slack-message-template-field/63447 "2023-07-03T17:45:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fabien\_Monnier](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/fabien_monnier/32/58996_2.png) [@Fabien\_Monnier](https://community.glideapps.com/u/Fabien_Monnier)\
**Post date:** [July 3, 2023, 5:45pm UTC](https://community.glideapps.com/t/trying-to-optimize-a-slack-message-template-field/63447/1 "2023-07-03T17:45:13Z")

</div>

Hello there!

I’d like to know if there’s a way to optimise an operation linking a form submit to Slack notification, based on specific conditions.

**Context:**  
I have a table of ~1000 rows listing the issues raised with our product + the solution we provided.  
It is populated by the users filling the form on the Glide app, and is connected to Google Sheets.

**What I want:**  
When submitting the form, IF the type of issue = “Sales returns” AND IF the solution offered = “voucher” → notify us on our Slack channel.

**What I did:**

- I created a template field “A new report from [agent] has been reported, we need to create a voucher [amount] [currency] etc.”
- I edited the action from the “submit” button with a IF condition, connected Slack and selected the template field I created early on.

 ![CleanShot 2023-07-03 at 19.34.42@2x](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/5/852b22a872069b04dc955d551ebdb551b6dab1c4.jpeg)

The workflow runs properly. However now, all my 1000 rows are storing a long template text (the Slack notification message), even if only 1% of my cases will meet the conditions to activate the Slack scenario.

 ![CleanShot 2023-07-03 at 19.26.30@2x](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/d/7dd9ce5b3154fb19f147736ed98b00ea71faf87f.jpeg)

My questions:

1. Can a template field like this impact the performance of my app?
2. If yes, would there be a smarter approach in order for the Slack message notification not to be stored in every single row, but only when the conditions are met?

Thank you!

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [July 3, 2023, 6:01pm UTC](https://community.glideapps.com/t/trying-to-optimize-a-slack-message-template-field/63447/2 "2023-07-03T18:01:50Z")

</div>

> [@Fabien\_Monnier](#):
>
> Can a template field like this impact the performance of my app?

No.

> [@Fabien\_Monnier](#):
>
> If yes, would there be a smarter approach in order for the Slack message notification not to be stored in every single row, but only when the conditions are met?

What you’ve done is the correct approach.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [July 4, 2023, 6:02pm UTC](https://community.glideapps.com/t/trying-to-optimize-a-slack-message-template-field/63447/3 "2023-07-04T18:02:11Z")

</div>

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