Hi @Menzel, Heather,
To resolve the issue where new items added via PowerAutomate include unwanted HTML tags in the URL, modify your JSON column formatting to strip out the <p>
tags using string replacement. Here's the corrected JSON:
{
"$schema": "https://developer.microsoft.com/json-schemas/sharepoint/column-formatting.schema.json",
"elmType": "div",
"children": [
{
"elmType": "a",
"attributes": {
"href": "=replace(replace([$Agenda], '<p class=\"editor-paragraph\">', ''), '</p>', '')",
"target": "_blank"
},
"style": {
"color": "#0078d4",
"text-decoration": "underline"
},
"txtContent": "=replace(replace([$Agenda], '<p class=\"editor-paragraph\">', ''), '</p>', '')"
}
]
}
Key Changes:
HTML Tag Removal:
Use replace()
twice in both href
and txtContent
to remove <p class="editor-paragraph">
and </p>
from the URL string.
Dynamic URL Handling:
Ensures the URL is clean for both the hyperlink and display text, even when PowerAutomate adds extra HTML formatting.