API Commenting Multiple Times

I am using Power Automate to create users from SolarWinds Service Desk tickets. In my flow I have it looking to see if there is a task to create the user, and if the task exists and is not complete it creates the user and does some other things.

At the end of this whole flow, I have a step to add a comment that the user was completed.

It sends a request to

https://api.samanage.com/incidents/{Ticket Number}/comments

With Body of

{ "comment": { "body": "Azure / Outlook Account Created", "is_private": "true" } }

Every time this automation runs, it leaves multiple comments on the ticket. (It was 9 comments this time, it's usually around that many.) Any idea why this is happening? The step is not triggering multiple times, because none of the steps prior to it are triggering multiple times.

  • For anyone seeing this in the future, I found out why this is happening. In Power Automate, on the step to comment on the ticket, so to the "Settings" tab and disable "Asynchronous pattern."

    When hovering over it, that option says:

    "With the asynchronous pattern, if the remote server indicates that the request is accepted for processing with a 202 (Accepted) response, the runtime engine will keep polling the URL specified in the response's location header until reaching a terminal state."