Documentation for listAppRequests
Purpose
The node is designed to facilitate the fetching of app requests from a Slack workspace. It connects to the Slack API through a built connection instance and fetches details based on specified parameters such as team ID, enterprise ID, and limits on the number of requests returned. This functionality is crucial for integrating Slack app requests into various analytics and data workflows.
Settings
1. teamId
- Input Type: String
- Description: This setting specifies the ID of the Slack team from which to fetch the app requests. If not provided in the inputs, it falls back to the configuration object.
- Effect of Changing: Modifying this value targets different Slack teams, thereby altering the set of app requests returned.
- Default Value:
null(if not specified)
2. enterpriseId
- Input Type: String
- Description: This setting denotes the ID of the enterprise account associated with the Slack workspace. Like
teamId, it can be fetched from the inputs or config. - Effect of Changing: Changing the enterprise ID may limit or expand the scope of requests retrieved, depending on whether the app is installed in multi-team setups.
- Default Value:
null(if not specified)
3. includeCertified
- Input Type: Boolean
- Description: When set to
true, this option includes certified apps in the list of requests fetched. If set tofalse, only non-certified apps will be retrieved. - Effect of Changing: Toggling this setting affects the nature of the app requests returned. Setting it to
falsecould be useful for focusing on custom or experimental applications. - Default Value:
true
4. limit
- Input Type: Numeric
- Description: This setting limits the number of app requests to return. Affects pagination when large datasets are involved.
- Effect of Changing: Increasing this value retrieves more app requests in a single call, while decreasing it limits the results.
- Default Value:
100
5. cursor
- Input Type: String
- Description: This setting is used for pagination. It specifies the cursor for the next set of results if there are more requests to fetch.
- Effect of Changing: Adjusting this value affects which subset of results is retrieved, allowing navigation through paginated data.
- Default Value:
null(if not specified)
How It Works
-
Initialization: The function begins by extracting input values such as
teamId,enterpriseId,includeCertified,limit, andcursor. These values are prioritized first from theinputsparameter, then from theconfig, and default to predefined values when not specified. -
Establishing Connection: Utilizing the utility the integration connection, the function creates a connection to the Slack API by specifying 'slack' as the integration type, along with the
contextprovided in the function call. -
Fetching Data: The app requests are fetched using the
listAppRequestsmethod on the created integration instance. It passes the parameters gathered from the previous step to this method. -
Error Handling: If an error occurs during the API call, it returns an error message indicating an internal error.
-
Return Data: In a successful execution, the function returns the fetched app requests in an
output1field.
Data Expectations
-
Inputs:
teamId: Required to query team-specific requests.enterpriseId: Optional but can scope the requests across teams.includeCertified: Optional, defaults totrue.limit: Optional, defaults to100.cursor: Optional, used for pagination.
-
Integration Context: The context may include authentication tokens or user identifiers needed to make API requests.
Use Cases & Examples
Use Case 1: Analyze App Integration Requests
An organization with multiple Slack teams can track and analyze app requests submitted by team members to determine which applications are most commonly requested and their approval statuses.
Use Case 2: App Compliance Monitoring
A company may need to ensure that the apps being requested meet compliance requirements. By retrieving certified apps, compliance officers can gather relevant data for audits or reviews.
Example Configuration
To implement Use Case 1, where an organization wants to analyze app requests from a specific team, the following configuration can be used:
{
"inputs": {
"teamId": "T01234567",
"includeCertified": true,
"limit": 50,
"cursor": null
},
"config": {
"teamId": null,
"enterpriseId": null,
"includeCertified": true,
"limit": 100,
"cursor": null
},
"context": {
"authToken": "xoxb-1234567890-abcdefg"
}
}In this configuration:
- The
teamIdis set specifically for the analysis. - Certified apps will be included.
- The limit is set to 50 to focus on a manageable dataset for analysis.
This configuration would retrieve up to 50 app requests specifically from team "T01234567", providing insight into app integration trends within that team.