Re: URL default to non-encoded version when using an automation

1832 6
Showing results for 
Search instead for 
Did you mean: 
6 - Interface Innovator
6 - Interface Innovator

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 :
Capture d’écran, le 2022-08-03 à 17.56.19

The formula field encore the URL as follow, this is correct :
Capture d’écran, le 2022-08-03 à 17.54.29

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 :
Capture d’écran, le 2022-08-03 à 17.53.46

This produce the wrong result. In the markdown, the URL is not encoded anymore :
Capture d’écran, le 2022-08-03 à 17.55.11

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.

7 Replies 7

But the link works when you click on it?

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.

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.

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.

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.

The leading space thing drive me mad in Alphabetically sorted lists but we disgress :slightly_smiling_face:

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.

  1. Any template texts you build for use in an email should ideally be the complete template (just one in a single rich text field).
  2. Inside the template should be placeholders for all merged fields, including any links.
  3. At email-time, merge all fields into the message.

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.