Skip to main content

App config

Learn how to configure your apps through app config.


Overview

App config refers to a set of parameters and settings that define the behavior and options of your app. These configurations are stored in dedicated configuration files, which allows app admins to modify the behavior without having to make changes in workflows.

The main purpose of app config is to provide a flexible way to adjust various aspects of your app without changing parameters in your workflows. It is particularly useful for handling specific settings and for storing repetitive information like message templates, or channel IDs to send notifications to.

The format of app config files is JSON (JavaScript Object Notation). JSON format is a lightweight data-interchange format widely used for configuration files due to its simplicity and readability.

Overall, app config is a tool that makes your app more customizable and adaptable, allowing you to fine-tune your app's behaviour without having to change the workflows in your app.

Creating a config

  1. On App config tab of your app, click + Add config.

Adding a new config

  1. Provide a name for your config. You can only use letters, numbers and underscore (_).

  2. Start constructing your JSON. You can use Beautify button to validate your format and beatify your data.

Updating app config

  1. Once it is all set, click Apply button at top right corner to save your configuration file.

Deleting config

To remove a congif from your app, click ellipsis at top right corner of your job and select Delete.

Deleting a config

Example config

Here's an example config in JSON format:

{
"botInformation": {
"botName": "Actioner",
"botEmoji": "rocket"
},
"requestChannels": ["C01234ABCDE", "C09876ABCDE"],
"emojiToCreateRequest": "ticket",
"autoCreateEnabled": true,
"priority": 3,
"notifyAfter": 30.5,
"additionalData": null
}

How to use config values in your workflows

The config variable allows you to access and modify your app's settings and behavior defined on App config tab. To retrieve data from your config named settings, you can use below syntax:

config.settings

For instance, according to above example, config.settings.botInformation.botName returns "Actioner".

Dynamically list, get and update configs in your workflows

Listing configs in your workflows

You can use List configs action from Actioner API integration to retrieve the list of configs in your app.

Retrieving a config in your workflows

You can use Get config action from Actioner API integration to retrieve a specific config from your app.

Updating a config in your workflows

You can use Update config action from Actioner API integration to update a specific config in your app.

Config schema

Creating a well-defined schema ensures that your app config files adhere to a consistent structure, making it easier to manage and validate configurations.

App config files follow a specific schema defined using JSON schema, a standard for describing the structure and constraints of JSON configs. You can refer to the JSON schema specification for detailed information on how to define the schema for your app's configuration files.

Adding a config schema

  1. Go to your config from App config tab of your app, and click + Add schema.

Adding a new schema

  1. Provide a name for your schema.

  2. Start constructing your schema in JSON format.

Constructing config schema

  1. Once it is all set, click Create button at top right corner to save your schema.

  2. The schema you created is automatically applied to your existing config. If you want to update the schema, you can use Edit button.

Updating schema

  1. You can also disassociate your schema from your config and optionally delete it.

Disassociating schema

Example config schema

  • type: Indicates the data type of the value.
  • properties: Lists the sub-properties or fields within an object.
  • required: Specifies which properties are mandatory and must be includedusage.
  • title: Shows the short explanation of the purpose of the data.
  • description: Provides more lengthy explanation about the purpose.
  • examples: Provides examples to clarify usage.

According to above config example, the schema looks like below:

{
"properties": {
"botInformation": {
"type": "object",
"properties": {
"botName": {
"type": "string",
"title": "Bot name",
"description": "The name of the bot, e.g., 'Actioner'.",
"examples": ["Actioner", "Support"]
},
"botEmoji": {
"type": "string",
"title": "Bot emoji",
"description": "The emoji of the bot, e.g., 'rocket'.",
"examples": ["rocket", ":robot_face:"]
}
},
"required": ["botName"],
"title": "Bot information",
"description": "Information about the bot sending messages."
},
"requestChannels": {
"type": "array",
"items": {
"type": "string"
},
"title": "List of request channels",
"description": "An array of channel IDs where requests can be created. For example: ['C01234ABCDE', 'C09876ABCDE'].",
"examples": [["C01234ABCDE", "C09876ABCDE"], ["C12345FGHIJ"]]
},
"emojiToCreateRequest": {
"type": "string",
"title": "Emoji to create a request",
"description": "The emoji used to create requests, e.g., 'ticket'.",
"examples": ["ticket", "bug"]
},
"autoCreateEnabled": {
"type": "boolean",
"title": "Auto-create of requests",
"description": "A boolean indicating whether auto-creation of requests is enabled (true or false). Example: true.",
"examples": [true, false]
},
"priority": {
"type": "integer",
"title": "Priority",
"description": "An integer representing the priority level for requests. Example: 3.",
"examples": [1, 2, 3, 4, 5]
},
"notifyAfter": {
"type": "number",
"title": "Notify after",
"description": "A number (float or integer) indicating the time (in seconds) after which notifications will be sent. Example: 30.5.",
"examples": [30, 30.5]
},
"additionalData": {
"type": ["object", "null"],
"title": "Additional data",
"description": "Additional data associated with the configuration, can be an object or null. Example: { 'customField': 'value' }.",
"examples": [null, { "customField": "value" }, { "customField": "value", "anotherField": 42 }]
}
},
"required": ["botInformation", "requestChannels", "emojiToCreateRequest", "autoCreateEnabled"],
"title": "Settings",
"description": "Settings for your app to run in Slack. Ensure that your app config adheres to this structure."
}

In this schema:

  • botInformation is an object with two properties, botName (string) and botEmoji (string).
  • requestChannels is an array of strings.
  • emojiToCreateRequest is a string.
  • autoCreateEnabled is a boolean.
  • priority is an integer.
  • notifyAfter is a number (float or integer).
  • additionalData can be an object or null.

This schema defines the structure and data types for each property in the JSON configuration. It enforces that the required properties are present and that their values match the specified types.