Aug 03, 2022 03:00 PM
I have a problem with using an encoded URL in an automation, specifically to put the URL in a Markdown field.
I made a new table to illustrate the problem :
The formula field encore the URL as follow, this is correct :
I have an automation that fills the third field, configured as a long text with rich text enabled, this is how the automation is set up :
This produce the wrong result. In the markdown, the URL is not encoded anymore :
Any idea how to get around this ? I can disable rich text in the field and it will work correctly, but it isn’t ideal.
Aug 03, 2022 05:55 PM
But the link works when you click on it?
Aug 03, 2022 07:11 PM
The link works because my browser will auto-encode. But if I try to send an email with the field filled by the automation as body, the link breaks.
Aug 03, 2022 07:29 PM
I don’t understand why you are storing your email body in an RTF field first. Just set the email body exactly like you showed in your screenshot.
Otherwise, you will need to turn off the RTF formatting.
Aug 03, 2022 07:49 PM
The body of the email is in a RTF field because only part of it is automation-generated, the rest vary email by email and is entered by end-user modifying the field.
Of course I have a number of workarounds. I could store in a long text non-rtf field and teach my users how to use Markdown for bold / lists /etc, but they would have no way of previewing what the sent email would look like, or automate replacing the link URL from the RTF to another non-rtf field when hitting send, but I don’t really care to do that for the multiple links I have.
The point of this post was more to check if that was expected behaviour or if I was missing some kind of configuration point somehwre.
Aug 03, 2022 07:56 PM
Unfortunately, none of this behavior is changeable by us Airtable users, so you will have to work within Airtable’s way of doing things. Airtable often tries to help by doing unexpected things which people might not actually want. For example: hiding leading spaces, turning line breaks into carriage returns in emails, and much more.
Aug 03, 2022 08:19 PM
The leading space thing drive me mad in Alphabetically sorted lists but we disgress :slightly_smiling_face:
Aug 04, 2022 05:21 PM
Lots of people do this - it’s a template, not an email body.
You understand the depth and the issues just fine. But I would say this issue is one of early vs late binding. The email merge process is probably URL decoding when it sees an encoding, and you don’t want that. So, to avoid this, merge the URL into the template when the message is sent and no sooner. I don’t have much time to demonstrate, but I would try this.
I think this will work, and I believe I actually guided a friend for this exact purpose, and it worked for her. I’m still a little fuzzy on this, so I may be in the weeds.