Power Automate: Difference between revisions

Jump to navigation Jump to search
Line 117: Line 117:


-->
-->
== Advanced triggers ==
Before [[Releases/Winter_2021|release 14.3]], Resco Cloud connector did not support triggers as an out-of-the-box feature. However, there was a workaround available using the server process event and invoking an HTTP request provided by "When an HTTP request is received" (described below). This workaround is still an option for custom triggers.
Create a new automated cloud flow, name it, and click skip to create an empty flow. Search for "Request" connector and add the "When an HTTP request is received" trigger. Set "Request Body JSON Schema" to accept the ''id'' parameter:
<syntaxhighlight lang="json">
{
    "type": "object",
    "properties": {
        "id": {
            "type": "string"
        }
    }
}
</syntaxhighlight>
Under '''Show Advanced Options''' set method to '''POST'''. Save the flow to generate "HTTP POST URL".
[[File:Pa-flow.png|600px]]
Now you have to create a process to invoke trigger in your flow.
# Log into your [[Resco Cloud]] server, start the [[Admin Console]], and select '''Processes''' from the menu.
# Click '''New''', enter a name for the new process, select the desired entity (e.g., Account), and the desired event (e.g., Record is created).
# Add StringList variable '''headers''' and add item <code>Content-Type: application/json;charset=utf-8</code> to it.
# Add string variable '''body''' as "Format Text" with: <code>\{ "id": "{Entity.id}" \}</code>.
# Then, add the function step `Server.InvokeWebRequest` with `POST` method. URL copied from "When an HTTP request is received" trigger and body variable.
[[File:Resco-process.png|600px]]
Now, when you create a record of the specified entity type, the trigger activates.


== See also ==
== See also ==

Navigation menu