Skip to main content

Hi All,

Can anyone advise how to create a new onboarding ticket through PowerAutomate?

  1. When a new item is create in a SharePoint List, get the users details
  2. Make a POST request to create an onboarding ticket containing user details from the SharePoint List. 
  3. The request must come from the users manager and not the service account that runs the PowerAutomate. How would I generate the request from the users manager?

If anyone can advise how best to achieve this, or has done this before and can help, that would be great! I need to have something in place by next week.

 

Many thanks

 

Hello,

 

You should be able to use this API

https://api.freshservice.com/#create_onboarding_request

I belive it’s “initiator” that should be set rather than requester.


Hi KJC,

We do this with an Microsoft Azure Logic app which is pretty much just the Azure version of Power Automate.

How we do it may not be the best way but it should work.

Note: The user’s manager’s email needs to be present in the newly added record within the Sharepoint List in some shape or form in order for this to work.  In our Sharepoint List, the email address is made available by way of it referencing an existing O365 user object

 

Within your Power Automate Workflow you’ll want to start initialising the various Variables that you need and the data in those Variables:

Example: A ‘Is Manager?’ column’s value from the Sharepoint list which is either True or False

Note: This’ll make more sense to you when you get to submitting your API request 

 

Specifically when submitting the API request you’ll need to populate what is called an ‘initiator_id’:

After the request is submitted, ‘initiator_id’ becomes ‘requester_id’:


To achieve this, your preceeding steps will need to focus on getting the ID of the Manager from the Freshservice API:

Note: the ‘&include_agents=true’ is important in cases where the Line Manager has been converted to an Agent from a Requester.  Searching the API by email rather than name is more appropriate in the cases where you have non-unique staff names.

The API will return an array but the only property you are interested in is the sole instance of an  ‘id’ that should be returned:

 

The final hurdle will be ensuring that every potential Manager has the required rights to have an Onboarding Request raised on their behalf, otherwise the API will return a 403 Forbidden error


Hi MDavis,

That is great, I cannot thank you enough for taking the time and sharing this. It has given an idea of how I will attempt it. The isManager? Boolean value - I am still struggling to understand that part and why it would be required. 

 

Many thanks!


Hi KJC,

Apologies for the confusion.

The isManager? Boolean variable was just to demonstrate ‘Initializing a variable’ and gives you the opportunity to tell Power Automate what ‘Type’ of value it is expecting to be retrieved from the Sharepoint List or the Freshservice API for this new variable.

Here’s another example:

Here we tell the Flow that we are expecting an Integer Type value (numbers) to be stored in the new ManagerID variable.
 

We later Set the value for the ‘ManagerID’ variable and reference it in the Freshservice API request:

 

Hopefully this helps explain things a bit better.


Reply