Re: How to insert variable in power automate xpath expression
Hi @acrespo,
You could do like this:
1. Store the Xpath into a Compose action;
string(/*[name()="@{variables('TipoDoc')}"]/*[name()="Emisor"]/*[name()="Nombre"])
2. Append the output of Compose into the second parameter of Xpath() function:
xpath(xml(outputs('Obtener_contenido_de_XML_2')), outputs('Compose_4'))

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.