When working with Text Templates in Salesforce Flow Builder, users may observe that merge fields used within hyperlinks become malformed after copying and pasting content.
This issue is specific to the "View as Rich Text" mode. If a user copies a hyperlink containing a merge field variable (e.g., {!$Record.Id}) while in Rich Text mode and pastes it into another resource, the browser alters the link structure:
{ }) are converted into their URL-encoded equivalents (%7B, %7D).https://), the browser treats it as a relative path and resolves it against the current page's Base URL (the Flow Builder context).The Flow fails to interpret the merge field correctly at runtime because the URL has been altered from a dynamic variable to a literal, resolved absolute string.
{!$Record.Id}Value After Pasting (Rich Text Mode): https://[my-domain].lightning.force.com/builder_platform_interaction/%7B!$Record.Id%7D{!$Record.Id}.Observation: The URL now includes the resolved domain path and encoded characters.
This behavior is working as designed by web browsers (e.g., Chrome, Edge) and is not a defect in Salesforce.
When copying text from the Rich Text editor, the browser processes the underlying HTML.
{!$Record.Id}. Since it does not start with a schema (like http:), the browser interprets it as a relative path.%7B and %7D to comply with URI syntax standards.To avoid this issue, use one of the following methods:
https://.../builder_platform_interaction/) and the encoded characters (%7B, %7D).{!$Record.Id}.Instead of copying the link, type the text in the new template and re-select the variable using the Resource Picker.
005232647

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.