I'm still working on this, and now from the Power Automate / Flow angle. I think I found a bug in the Plumsail Helpdesk connector that involves the same list item ID / ticket ID confusion.
I used the 'get tickets' action with an OData query to get a list of tickets that are pending for a certain period. Then I used the 'Get all comments for a ticket' action with the ticket ID from the get tickets action and it turns out it returns the comments from the ticket that has the LIST ITEM ID of the returned ticket ID...
An example ticket:
Result from 'Get tickets' action:
Result from 'Get all comments' action:
But this result is from the following ticket:
As you can see the Get all comments action returns the comments for a ticket with the list item id instead of the ticket ID that is fed in the action, which is the correct Ticket ID.
I can work around it for now by getting the tickets with a sharepoint action and then feed the list item id in the get comments action. Idea is to notify the last commenter that the ticket is going to be closed.