Click on a link inside a mail body

Hello Friend,

I had the following mail body:


Cliquez sur [ce lien] pour accéder aux informations sur le(s) candidat(s) partagé(s) (fichier au format PDF).

Merci de télécharger le fichier au format PDF avant le XXXX. Après cette date le fichier ne sera plus accessible.

i want to just click on [ce lien]

Hi @abdel
Use mail.Headers(“HTMLBody”) to get the mail body from the mail and store in string variable
Use the regex operation to extract the link from that string

Regex to be used [you can try to use this regex ] : (?<=href=“).*(?=”>[ce lien])

Then after extracting the link, use open browser activity to open the link.

Hope the information help u

Nived N
Happy Automation

Hello Nivad,

I got the url but when i try to open it inside “open browser” it did not work it gives fllowing error:
Le document recherché n’est pas disponible. Motifs possibles :

  • Vous n’avez pas l’autorisation de voir le document.
  • Le document n’existe pas.
  • Le lien vers le document a expiré.

Communiquez avec l’administrateur de système pour plus d’informations.

Did u check that link is extracting correctly ?

did u check whether it is working manually ?

when i click it inside the mail it works, but manually no

is it document or someting else?

yes it is a pdf document

How is the format of link actually, is it starting with https or http?


Hi @abdel
can u check whether the link u got from the process via regex and from mail are same

It may happen that due to change in url this error may occur

they are not the same
it seems that here:
the third was replaced by 0.

I think that is the issue