LinkedIn: Select dynamic button text [Solved]

I’m creating a macro to send customized invites to connect in LinkedIn.

Steps to be reproduced:
(1) Open a linkedin profile
(2) Click on the connect button
(3) A pop-up / modal appears
(4) Click on custom message
(5) Paste specific text
(6) Click on send button

JSON to do this:

{
  "Name": "Invitacion Individual",
  "CreationDate": "2020-4-19",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://www.linkedin.com/in/raul-higuero-personal-trainer/",
      "Value": ""
    },
    {
      "Command": "waitForPageToLoad",
      "Target": "2000",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "//*[text()[contains(.,'Conectar')]]",
      "Value": ""
    },
    {
      "Command": "pause",
      "Target": "4000",
      "Value": ""
    },
    {
      "Command": "type",
      "Target": "id=custom-message",
      "Value": "Me gustaría añadirte a mi red de contactos. Estoy trabajando en una herramienta de entrenamiento que creo que te podría interesar. Un saludo. Lucia"
    },
    {
      "Command": "pause",
      "Target": "4000",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "//*[text()[contains(.,'Enviar invitación')]]",
      "Value": ""
    },
    {
      "Command": "echo",
      "Target": "DemoAutofill macro completed (shown as notifcation because of #shownotification in the 3rd column)",
      "Value": "#shownotification"
    }
  ]
}

The screenshots you posted were helpful. I see two good options:

@ulrich I found the solution.

I updated the first post to show the solution.

Many thanks!!