Freshservice

Integrate Freshservice and Apono with your access requests

Integrating Freshservice with Apono allows users to create a Freshservice ticket that triggers an access request in Apono. Depending on your preferred workflow, you can then manage approvals in Slack, Microsoft Teams, CLI, or the Apono web portal.


Prerequisites

Item
Description

Apono API Token

Credentials enabling secure, programmatic access to the Apono API

Apono IDs

Apono identifiers required for the Freshservice integration:

  • Integration ID

  • Resource ID

  • Permissions

Follow these steps to obtain these IDs:

  1. On the Inventory page, on the Resources tab, click Basic.

  2. From the Integration dropdown menu, select one integration. Only the resources associated with the integration will be displayed.

  3. Click a resource from the list. The Entitlements Details panel appears.

  4. From the page URL, copy the values for the integration and resourceId query strings.

  5. In the Entitlements Details panel, on the Entitlements tab, copy each of the values under the PERMISSION column.

Freshservice Admin Permission

Permission to manage all features except billing


Build a workflow

Freshservice's Workflow Automator allows you to define the events and conditions that trigger an access request, and configure the necessary web requests to communicate with the Apono API.

Workflow Automator canvas

Follow these steps to build a workflow:

  1. In Freshservice, click Admin. The admin page appears.

  2. In the search field, enter Workflow Automator.

  3. Click Workflow Automator. The Workflow Automator page appears.

  4. Click New Workflow. The New Workflow panel opens.

  5. Enter a meaningful Title for the workflow.

  6. Select the relevant Module.

  7. Under Workflow Type, select Event Based Workflow.

  8. Click Create. The New Workflow panel closes and the Event panel opens.

  9. Define the event that triggers this workflow.

Defining an Event

Follow these steps to define an event:

  1. In the first field, build the event from the dropdown options.

  2. Select who can perform the event.

  3. Click Done. The Event panel closes. The module appears on the canvas.

  1. (Optional) Define a condition for the event.

Defining a Condition

Follow these steps to define a condition:

  1. From the side menu, click and drag a Condition module to the canvas. The Condition panel opens.

  2. Define the condition with the Match or Build Expression option.

  3. Click Done. The Condition panel closes. The module appears on the canvas.

  1. Define a web request to retrieve the user's ID.

Defining a Web Request

Follow these steps to retrieve the user's ID:

  1. From the side menu, click and drag a Web Request module to the canvas. The Web Request panel opens.

If a condition has been added, be sure that the module is positioned at the end of the YES branch

  1. Under Request Type, select GET.

  2. Under Endpoint, enter https://api.apono.io/api/v2/users/{{ticket.from_email}}.

  3. From the Credentials dropdown menu, select Inline Credential.

  4. From the Authentication Type dropdown menu, select API key.

  5. Under Key, enter Authorization.

  6. Under Value, enter Bearer APONO_API_TOKEN. Be sure to replace APONO_API_TOKEN with the value of your Apono personal API token.

  7. At the bottom of the panel, in the Enter Label field, add a label for the web request module, such as Grab User ID.

  8. Click Done. The Web Request panel closes. The module appears on the canvas.

  1. Parse the user ID.

Defining a JSON Parser

Follow these steps to define the JSON parser:

  1. From the side menu, click and drag a JSON Parser module to the canvas. The JSON Parser panel opens.

  2. Under Source, click { + }. The Placeholders menu appears.

  3. Click Web Request Fields > response_body.

  4. Click X to close the Placeholders menu.

  5. Copy and paste the following JSON object into the JSON field.

{
  "id": "1234567890345678",
  "email": "[email protected]",
  "first_name": "Peter",
  "last_name": "Parker",
  "active": true
}
  1. Click Generate Output to generate the fields necessary for the next step. The output appears in the Output panel.

  2. In the Enter Label field, enter a label for the module, such as Parse User ID.

  3. Click Done. The JSON Parser panel closes. The module appears on the canvas.

  1. Define a web request to create an access request.

Defining a Web Request

Follow these steps to create an access request:

  1. From the side menu, click and drag a Web Request module to the canvas.

  2. Under Request Type, select POST.

  3. Under Endpoint, enter https://api.apono.io/api/v3/access-requests.

  4. From the Credentials dropdown menu, select Inline Credential.

  5. From the Authentication Type dropdown menu, select API key.

  6. Under Key, enter Authorization.

  7. Under Value, enter Bearer APONO_API_TOKEN. Be sure to replace APONO_API_TOKEN with the value of your Apono personal API token.

  8. Copy and paste the following JSON payload into the Body field. This payload contains all the parameters required by the Apono API.

Be mindful of the following points regarding this payload:

  • Be sure to replace the following placeholders with the actual Apono ID values:

    • APONO_INTEGRATION_ID

    • RESOURCE_ID_1, RESOURCE_ID_2

    • PERMISSION_1, PERMISSION_2

  • Click Insert Placeholders to verify the placeholders. The Placeholders window opens.

    • For user_id, check Parser Fields > P1 - Parse User ID > root > id.

    • For justification, check Tickets > Description. The _text appended to the placeholder ensures that additional HTML is removed from the description.

{
  "user_id": "{{P1.root.id}}",
  "integration_id": "APONO_INTEGRATION_ID",
  "resource_ids": ["RESOURCE_ID_1", "RESOURCE_ID_2"],
  "permissions": ["PERMISSION_1", "PERMISSION_2"],
  "justification": "{{ticket.description_text}}",
  "duration_in_sec": 3600
}
  1. Add a header:

    1. Under Headers, click Add Header.

    2. Under Key, enter Content-Type.

    3. Under Value, enter application/json.

  2. At the bottom of the panel, in the Enter Label field, add a label for the module, such as Access Request.

  1. Click Done. The Web Request panel closes. The module appears on the canvas.

  1. Click Activate. The Activate Automator popup window appears.

  2. Click Confirm.

Last updated

Was this helpful?