OpenRPA does not pass arguments when using the “startProcess” tool

I have created a script in .ps1 to which you pass an argument and it creates an Excel file with argument + current date (I do more things inside the script, but for this I need the argument).

At the beginning of the script I check that the argument is passed.

param (
    [string]$nombre_robot
)

# Verificar que se ha proporcionado el nombre del robot
if (-not $nombre_robot) {
    Write-Host "Debe proporcionar el nombre del robot como argumento."
    exit 1
}

If I execute the script from the terminal it works perfectly .

image
image

I have configured the script in OpenRPA by passing it the same argument.

But the script indicates in the validation that no arguments have been passed.

You should use invoke openrpa for this. Is there a reason you don’t want to use that, or did you not try it yet?

but invoke openrpa is to call another OpenRPA workflow, not to call an external script, right?

How to call a script withinvoke openrpa?

Hmm, sorry, I don’t know why I read it like you were calling OpenRPA from PowerShell and now wanted to call that PowerShell script from OpenRPA.

If you want to run PowerShell in OpenRPA, use the Invoke Code activity (you need to install the optional Scripting component when running the OpenRPA.msi installer to have access to that).

1 Like

Fixed, I didn’t have that feature installed.
Thank you very much for the help again Allan

1 Like

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