I have a SharePoint online list and I want to include a column so users can click to send an email to follow up about a list item they're interested in, and would prefer not to use Power Automate if I can avoid it for this simple task.
I have the basic functionality working.
The column displays the email icon with a mailto link:
When I click on the link, an email opens up and populates the "to" field with a static value I've defined, and I can put text into the subject and body fields:
The problem is that I want to reference the item details in the subject line and body. Obviously, my attempts to include the Title field in the subject and the value of the category field in the body aren't working. What am I doing wrong?
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"children": [
{
"elmType": "span",
"style": {
"padding": "12px"
},
"txtContent": "email"
},
{
"elmType": "a",
"attributes": {
"iconName": "Mail",
"class": "sp-field-quickActions",
"href": {
"operator": "+",
"operands": [
"mailto:",
"[email protected]",
"?subject=Interest in donation [$Title]&body=text goes here<br>[$Category.value]"
]
}
}
}
]
}