Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Jun 21, 2021 05:52 PM
I feel this is super simple and I’m just not seeing something. If someone could put me out of my misery, it would be much appreciated. I want to send slack notifications when someone fills out a form. One of the fields is long text and asks for detailed description. I wanted to only show a preview of that field in the message. I see the “trim” option there but I don’t know how to actually use it! It’s not doing what I assume it should do.
I am selecting + > the field (Description) > Continue > trim (insert) and it doesn’t do anything. When I do the exact same with any of the other properties (length, upper case, lower case, etc) it does react the way I would expect.
Does anyone know how to do this? :thinking:
See it not working here:
Solved! Go to Solution.
Jun 21, 2021 07:48 PM
trim
removes leading and trailing space characters. It does not shorten long text that does not have leading or trailing spaces. Instead you can use a formula field that shortens the text.
Jun 21, 2021 07:48 PM
trim
removes leading and trailing space characters. It does not shorten long text that does not have leading or trailing spaces. Instead you can use a formula field that shortens the text.
Jun 22, 2021 02:54 PM
Thank you @kuovonne ! Nothing came up when I searched for that “trim”, that makes complete sense. I can make a new field with Formula and LEFT() to have 200 characters of message. Is that what you meant? Or can I use formulas in the automation message, I didn’t figure out how.
Jun 22, 2021 03:14 PM
Yes, that’s it. If you want to get fancy, you can have the formula add ellipsis if there are more than 200 characters, and you can get even fancier and try to get the formula to break between words, but these formulas can get complex.
Here is a simplified version of one of the formulas that I use to get an excerpt from a long text field. It assumes that words a separated by spaces and that no word is longer than 20 characters. It won’t always be the maximum length, but it will break between words.
IF(
LEN({Content}) > 200,
LEFT(
{Content},
FIND(" ", {Content}, 180)
) & "...",
{Content}
)
Jun 22, 2021 03:29 PM
Perfect! Thank you so much! That’s definitely fancier than what I need, I just did a Formula “short description” with LEFT(*Description*,200)
and then in the automation message I added that field followed by …
But your fancier IF will make someone searching for this very happy I’m sure. Thank you for that.
Hate to be that scope creeper person but would you happen to know if there’s a function or formula (be it in field or in the automation message configuration) so I can put a link in hyperlink (want to make the record link hyperlinked into a word so the long, ugly url isn’t part of the slack notification).
Jun 22, 2021 05:34 PM
If you are sending out your notification as an automated email, you can include a link in markdown format.
[text you see](https://example.com)
You may need to experiment with escaping the url if it contains underscores or other special characters. Different methods of composing the message have different effects.
Jun 23, 2021 07:28 AM
No, it’s as a slack message. Seems markdown doesn’t work for the slack message automation. I think this is Slack’s limitation though since it won’t recognize that same markdown if I write it as a message directly on slack. Airtable would have to add the hyperlinking feature I guess so the message is sent to slack already hyperlinked. Anyway, THANK YOU @kuovonne !