I’ve been working with Freshservice automation and its PowerShell Orchestration App for over a year now, and I thought I’d share some of the things I’ve learned.
The PowerShell App times out after around 23 seconds.
This is apparently the length of time it takes to poll the process 10 times - if there’s no response after this, the Orchestration/Workflow just forgets about it.
Errors are different depending on whether you’re running a PowerShell function or a PowerShell script.
If you’re anticipating an error in the Automation workflow, you can usually capture it by looking for a response from the app that isn’t 200 (or greater than 299, if oyu might expect another 2xx code). Whilst this works fine for PowerShell functions, it doesn’t work for PowerShell scripts - call a .ps1 file, and the result will always be ‘200’, even if your script fails.
Tagging a ticket does not trigger an ‘Updated’ event.
Workflows begin with triggers, such as ‘Service Request raised’ or ‘Ticket updated’. But just adding a tag to a ticket doesn’t appear to be classed as a ticket ‘update’ (neither do adding notes or replies). To update a ticket you need to change the subject, status, type, priority, source, urgency, impact, agent group or agent.
Deleting a ticket will mark all of its outstanding tasks as ‘Completed’
This may not seem like a major issue on the face of it, but if you have automations that run when tasks are completed, then those automations will be run. I have let Fresh know about this ‘feature’ and I believe it’s in their ‘to-do’ list to change the behaviour to having tasks cancelled instead.
I’ll add to the list as and when I encounter (or remember) things, but at our organisation, over 40% of our service requests are serviced by automation (by which I mean PowerShell invoked from the Automation Workflow), and I’m aiming to increase this yet further.