Skip to main content

Hello,

How can I go about created a scheduled workflow that creates one weekly department ticket (Friday evening) with a ticket description that:

For each agent:

  • lists all their added/updated time entries for the last week, with an entry for each ticket showing ticket ID and company
  • lists a total number of hours logged from their time entries for the last week

Department wide:

  • lists total number of hours logged from all agent time entries for each company

We do not have the upgraded FreshService analytics feature and cannot utilize this functionality.

Any guidance towards initializing this workflow is greatly appreciated.

Hi.

For this matter, you would need to perform several API calls.

All ticket fields:

Service Desk API for Developers | Freshservice

List of tickets:

Service Desk API for Developers | Freshservice

Time Entries:

Service Desk API for Developers | Freshservice

List all Time Entries of a Ticket:

Service Desk API for Developers | Freshservice

 

You may also take a look to this app, as you would need to perform several operations:

Freshworks FreshservicePS - Freshservice Powershell Module Integration | Freshworks Marketplace

 

Or check standard way:

Powershell : Freshservice

 

Regards,


Hi @cabrena,

I suggest using Power Automate to run each Friday evening, the automation would use the API calls listed by @eeha0120.

First it would get all the tickets updated this week (filter tickets API would work I think). This should give you a ticket list.

Then use iterate through each ticket from the list and get the time entries for each of them. In the iteration loop, create a compose section that would gather the data about Ticket ID, agent, and Time recorded. Call it Time Entries or something.

Outside of the loop create another compose section with the outputs of Time Entries (this should merge all of the Time entries compose actions for each ticket). Call this All Time Entries
Order the All Time entries by Agent name. “Time Entries ordered by Name” compose action

Iterate through this list again, this time for each agent add the time entries. (similar process as before). Finish with a compose action merging the outputs of the iteration.

This way you have two arrays with the data you need.

Now last step - creating a ticket:

Option 1 - create using API

Option 2 - send an email to the ticketing system with the arrays as body of the email.


Reply