Telegram tag users

[
    {
        "id": "3daf0122193d41f8",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "de4f42c19b4b53d1",
        "type": "debug",
        "z": "3daf0122193d41f8",
        "name": "6",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 630,
        "y": 180,
        "wires": []
    },
    {
        "id": "eb67e89bdae895b3",
        "type": "telegram sender",
        "z": "3daf0122193d41f8",
        "name": "",
        "bot": "",
        "haserroroutput": false,
        "outputs": 1,
        "x": 650,
        "y": 220,
        "wires": [
            []
        ]
    },
    {
        "id": "25d9c1e59d1a82a3",
        "type": "function",
        "z": "3daf0122193d41f8",
        "name": "",
        "func": "var idutente = msg.payload.chatId\nvar chatId = global.get ('gruppo')\nmention = \"[test](tg://user?id=\"+idutente+\")\"\nmsg.payload = {chatId , type : 'message' , content : mention}\n\nreturn msg\n\n\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 400,
        "y": 220,
        "wires": [
            [
                "eb67e89bdae895b3",
                "de4f42c19b4b53d1"
            ]
        ]
    },
    {
        "id": "795e044d.1e8ae4",
        "type": "inject",
        "z": "3daf0122193d41f8",
        "name": "",
        "props": [
            {
                "p": "payload.chatId",
                "v": "696295660",
                "vt": "json"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 210,
        "y": 220,
        "wires": [
            [
                "25d9c1e59d1a82a3"
            ]
        ]
    },
    {
        "id": "e2dff19553555bbd",
        "type": "change",
        "z": "3daf0122193d41f8",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "gruppo",
                "pt": "global",
                "to": "payload.chatId",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 355,
        "y": 133.03704833984375,
        "wires": [
            []
        ]
    },
    {
        "id": "a2053e6bb7cd6fc4",
        "type": "telegram receiver",
        "z": "3daf0122193d41f8",
        "name": "",
        "bot": "",
        "saveDataDir": "",
        "filterCommands": false,
        "x": 95,
        "y": 133.03704833984375,
        "wires": [
            [
                "e2dff19553555bbd"
            ],
            [
                "e2dff19553555bbd"
            ]
        ]
    }
]

I would like through an id to generate a tag to call the user in the chat.
reading a command through api I get an array of IDs that I divide into single messages that I send to a function block.
i tried using markdown to mention but to no avail.

You need to add a options property and the in ther put the parse_mode property "markdown"

var idutente = msg.payload.chatId
var chatId = global.get ('gruppo')
mention = `[tst](tg://user?id=${idutente})`;
msg.payload = {chatId , type : 'message' , content : mention, options:{parse_mode:"markdown"}}

return msg

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.