Automate

 View Only
  • 1.  Trigger Query from Power Automate

    Posted 05-26-2026 11:18

    I have Query that updates a SQL table that I would like to trigger using Power Automate. 

    is this possible?



    ------------------------------
    Jane Dobbs
    Canadian Pacific Railway
    ------------------------------


  • 2.  RE: Trigger Query from Power Automate

    Employee
    Posted 05-26-2026 14:38

    Hi Jane

    Yes it's possible. 

    One way is via the command line interface:

    However, if you have an RPA tool/"bot" run scripts, it requires a different type of license - please see "Bot license" on this page: https://help.precisely.com/r/t/AEV-0001/2025-10-09/Automate/pub/Latest/en-US/Automate-Product-Support-and-Licensing/Automate-license-definitions

    Prior you had asked about scheduling the Query runs, which is possible in Studio Manager and Evolve, without using an RPA tool/"bot". The best choice would be dependent on your use case(s).

    Best Regards,

    Sigrid



    ------------------------------
    Sigrid Kok
    *Precisely Software Inc.
    ------------------------------



  • 3.  RE: Trigger Query from Power Automate

    Posted 05-27-2026 10:50

    I am now trying a PowerShell script but it's not returning any records: This script is a Query that is a direct update to a SQL Table.

    $exe = "C:\Program Files\Winshuttle\Studio\Winshuttle.Studio.Console.exe"

    $args = @(
        "-SapQuery",
        "-run `"MARA SQL Import`"",
        "-lib `"Qxq lib`"",
        "-tms `"SPS`""
    )

    Start-Process -FilePath $exe -ArgumentList $args -Wait -NoNewWindow



    ------------------------------
    Jane Dobbs
    Canadian Pacific Railway
    ------------------------------



  • 4.  RE: Trigger Query from Power Automate

    Posted 05-27-2026 13:38

    RESULTS

    added the -alf"C:\Secure\SAPLogin.alf" with an without  tms

    • PS C:\Users\dob0024> & "C:\Program Files\Winshuttle\Studio\Winshuttle.Studio.Console.exe" `
      -SapQuery `
      -run"MARA SQL Import" `
      -lib"Qxq lib" `
      -tms"SPS" `
      -alf"C:\Secure\SAPLogin.alf"
    • PS C:\Users\dob0024> & "C:\Program Files\Winshuttle\Studio\Winshuttle.Studio.Console.exe" `
      -SapQuery `
      -run"C:\Scripts\MARA SQL Import.qsq" `
      -alf"C:\Secure\SAPLogin.alf"

    this is the result:

    Initializing Application.
    Script run stopped.
    Error:
    No credentials are defined on the server for this system.



    ------------------------------
    Jane Dobbs
    Canadian Pacific Railway
    ------------------------------



  • 5.  RE: Trigger Query from Power Automate

    Employee
    Posted 05-27-2026 13:47
    Edited by Sigrid Kok 05-27-2026 13:50

    Hi Jane,

    Please take a look at the doc for running a Query from the command line: https://help.precisely.com/r/t/1016755953/2026-12-31/Automate-Studio/Evolve/Latest/en-US/Automate-Studio-with-Evolve-User-Guide/Run-a-Query-solution-from-the-command-line

    I think you need a parameter for the SQL connection, like below, from the documentation:

    and the login info

    -tms is the Application name aka App name, like Finance for a Finance app. It looks like this in my Evolve system - looks the same in Studio Manager

    There's also a note in there about having the right SQL permissions to the DB you are writing to:

    FYI

    Sigrid



    ------------------------------
    Sigrid Kok
    *Precisely Software Inc.
    ------------------------------