JSON Code - Add the name of the "Attendees" into the email

Martin, Heidi (SE GP T SP PS) 551 Reputation points
2023-09-19T08:10:46.6+00:00

Hello,

Is it possible to include the name of the “participants” in the email as a salutation? Thank you very much!User's image

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,715 questions
0 comments No comments
{count} votes

Accepted answer
  1. Emily Du-MSFT 46,186 Reputation points Microsoft Vendor
    2023-09-20T02:22:51.2966667+00:00

    Here are example codes. You need to add the line "=join([$Attendees.title], ';')", behinds the line "&body=Dear,", .

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
      "elmType": "a",
      "style": {
        "display": "=if(length([$Attendees]) > 0, 'flex', 'none')",
        "text-decoration": "none"
      },
      "attributes": {
        "href": {
          "operator": "+",
          "operands": [
            "mailto:",
            "=join([$Attendees.email], ';')",
            "?subject=",
            "Event name:",
            "[$Title]",
            "&body=Dear,",
            "=join([$Attendees.title], ';')",
            "\r\n \r\n",
            "As you probably know, we have created the GT-wide overview for the handling the relevant external events, conferences, and trade shows:",
            "https://www.google.com/",
            "\r\n",
            "The target is to have the single tool for all relevant events for SE GT to reach transparency, coordinate performance, use the synergies, and evaluate the efforts for the future.",
            "\r\n",
            "\r\n",
            "Furthermore, we want to learn from events where we have participated to evaluate our performance, and to learn for the participation in further events. For this purpose we have created the event feedback sheet: ",
            "https://www.google.com/",
            ", which you also can find in the above tool bar as per screenshot below.",
            "\r\n",
            "I kindly ask you to take approx. 9 Min. time and fill in this event to support us. As per our notes, you’ve participated in: ",
            "\r\n",
            "Furthermore, we store all conference proceedings (papers, publications, presentations, etc.) in: ",
            "https://www.google.com/",
            " to allow access for all GT staff.",
            "\r\n",
            "In case you as participant have got access to these documentation, please provide it to me for the uploading.",
            "\r\n \r\n",
            "Appreciating your support with kind regards,",
            "\r\n \r\n"
          ]
        }
      },
      "children": [
        {
          "elmType": "span",
          "style": {
            "display": "inline-block",
            "padding": "0 4px"
          },
          "attributes": {
            "iconName": "Mail"
          }
        },
        {
          "elmType": "span",
          "txtContent": {
            "operator": "+",
            "operands": [
              "Send email to ",
              {
                "operator": "?",
                "operands": [
                  "=length([$Attendees]) == 1",
                  "[$Attendees.title]",
                  "='all ' + length([$Attendees]) + ' members'"
                ]
              }
            ]
          }
        }
      ]
    }
    

    Result:

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.