Custom API Action

Make a custom, authenticated HTTP call to the Slack API.

Note

This action is unlike other Slack cards; refer to the Slack API documentation.

Options

Field Definition Type Required
Request Type Dropdown TRUE
GET Retrieves data from a web server based on your parameters. This method requests a representation of the specified resource. If a request is successful, you receive a 200 (OK) response message with the requested content.
POST Sends data to a web server based on your parameters (for example, uploading a file). Multiple POST requests may result in a different outcome than a single POST, so you should be cautious about unintentionally sending multiple POST requests. If a request is successful, you receive a 200 (OK) response message.
PUT Sends data to be stored at a specific location on a web server based on your parameters (for example, uploading a file). The difference between PUT and POST requests is that PUT is idempotent. This means that for successful requests, the result of a single PUT request is the same as many identical PUT requests. If a request is successful, you receive a 200 (OK), 201 (Created), or 204 (No Content) response message.
PATCH Applies partial modifications to a resource on a web server based on your parameters. PATCH is not idempotent, which means that multiple PATCH requests could have unintended consequences. If a PATCH is successful, you receive a 200 (OK) or 204 (No Content) response message.
DELETE Deletes the specified resource from the web server based on your parameters (if the resource exists). If a DELETE is successful, you receive a 200 (OK) response message.

Input

Field Definition Type Required
Relative URL The address on the web server you are attempting to interact with. Relative URL means that you don't have to explicitly specify the protocol at the beginning of the URL (such as "http://"). This suggests to the web server that the interaction is occurring on the server (in this instance).

Example: https://api.slack.com/scim{{input.Request.Relative URL}}.

Caution

The Slack Admin connector can only query the SCIM endpoint within Slack, and it can't be used for any other admin APIs within Slack. For such use cases, use the Slack connector.

String FALSE
Query JSON object that determines the action taken at the URL. Object or String FALSE
Headers JSON object that determines the content type of the request. This will usually be a replica of the example below. Object FALSE

Output

Field Definition Type
Status Code Result of the operation. The connector returns an HTTP status code that indicates whether the action taken by the card succeeded or failed. For example:
  • A 201 Created status code indicates success where a new resource was created.
  • A 403 Forbidden error indicates that the HTTP request wasn't processed because the necessary permissions were missing.

For a full list of possible status codes, see HTTP status codes.

Number
Headers A detailed context for the status code, unrelated to the output body. Response headers are dependent on your selected HTTP request option. Note that not all headers are response headers. This will usually be a replica of the example below. Object
Body Data returned from your selected HTTP request (for example, the data from a GET request). Object

Related topics

Slack Admin connector

Elements of Workflows

Apps for admins