Configuration

We have so far tested the app with a UI that prints the sample text given. We have to integrate with Asana and GitHub to make some actual functionality happen through the app.

Let's add the following code in config/iparams.json file:

1{
2  "github_username": {
3    "display_name": "GitHub Username",
4    "description": "Enter your GitHub username",
5    "type": "text",
6    "required": true
7  },
8  "github_repository": {
9    "display_name": "GitHub Repository",
10    "description": "Enter the GitHub repository to create issues in",
11    "type": "text",
12    "required": true,
13    "secure": false,
14    "events": [{
15      "change": "getAsanaWorkspaces"
16    }]
17  },
18  "asana_workspace": {
19    "display_name": "Asana Workspace",
20    "description": "Enter the Asana workspace to create cards in",
21    "type": "dropdown",
22    "options": [""],
23    "default_value": "",
24    "events": [{
25      "change": "getAsanaProjects"
26    }]
27  },
28  "asana_projects": {
29    "display_name": "Asana Projects",
30    "description": "Enter the Asana Projects to create cards in",
31    "type": "multiselect",
32    "options": [""],
33    "default_value": [""]
34  }
35}

In this iparams.json file,

  1. We have added four fields and their specification on how do we expect the vallues for the same.
  2. These fields will be filled by the user when they install the app and goes to the configuration page.
  3. To integrate with Asana and GitHub, we would need the workspace and projects information for Asana and the repository and username information for GitHub.

Refer to the documentation for more information about the Installation Parameters.

Testing

  1. Ensure the app is running locally with Freshworks CLI (FDK).
  2. Open the Marketplace under Admin settings in your Freshservice account.
  3. Navigate to the Custom App section. Find the app with "In Dev" tag on the list.
  4. Install the app and the configuration page will be opened with the four fields that we added.
  5. Submit all the fields with some random values to test if the app configuration works.

After the configuration setup, let's proceed to setup the authorisation with OAuth configuration.