How to get a user's Requester/User ID to use in Copilot Studio

Hi,

I am trying to experiment with creating a Copilot within Copilot Studio that can create a FreshService support ticket based on the information provided by the user. The information from the Copilot would be passed a Connector Action using the FreshService Connector’s Create a ticket (V2) action. The most of the fields are easy enough to automatically fill in with variables gathered earlier or set them manually.

However, the snag I’ve hit is that the Create a ticket action has Requester Id as a mandatory number field. I imagine most (if not all) users who would want to create a support ticket via this way wouldn’t know their FreshService User-id. Is there a way I can use the information they provide (either full name or email?) to get their User-id from FreshService? Or is there an alternative I could use?

Apologises if this is potentially a simple solution. Fairly new to automations, APIs ect.

Thank you in advance!

1 Like

Did you ever get an answer to this? I am running into the same issue. No user knows their numerical ID… We should be able to do this with email/SSO.

Hi,

you can use the Service Desk API for Developers | Freshservice

filter API to find the user by email to get the user ID

I’m not well versed enough to know how to totally do that yet. thanks, I will check it out. My issue is knowing how to get the email of the user and then run the API to translate it to the ID and pass that on!

@Bene_Immanuel has pointed you to the right direction @jseiler

If you’re unsure how to pass the email into the API, here’s a simplified workflow:

  1. Input: User enters their email address.
  2. Fetch User ID:
    • Query Freshservice API to find the user by email.
    • If found, retrieve User ID.
    • If not found, exit the workflow.
  3. Create Ticket:
    • Use the retrieved User ID to create a ticket via the Freshservice API.
    • Return the ticket details.
1 Like

Thank you. I’ve spent the last 2 hours trying to figure this out.
I can create a prompt to ask the user for their email, and store it. But how to query the API in Copilot, compare the email address and then pull the ID and store it… is not working well for me. I’m just not experienced enough.