Parse Example

This example shows how to get the status of a Slack user from the user’s Slack profile. This information is useful to have when the user is out of the office or have their status set to a custom status. It also shows how to perform JSON parsing and how to get values from a JSON string.

Three cards are used in this flow:

  • Slack Read User

  • Optional. Object Construct

  • Slack Custom API Action

  1. Retrieve the User ID from Slack with the Read User card.

  2. Optionally, include the Object Construct card to pass the users:ID_VALUE into the Custom API Action card.

  3. To return the user’s information, use the Custom API Action card. This card might need to be added in the relative URL section. The Query value needs to be in the following format {“users”:”ID_VALUE”}. This is equivalent to having ?users=ID_VALUE at the end of an HTTP URL.

  4. Run the flow. When the operation is finished, the output in the JSON body should be similar to the following.

"real_name":"Jessie Doe",
"tz_label":"Pacific Daylight Time",
"title":"Director, Customer Service",
"real_name":"Jessie Doe",
"real_name_normalized":"Jessie Doe",


Extract user information

Use the Slack Get card to extract the user data from the JSON body.

The output type has to be an object and a list.

Use the List At card to get the first value of the list (index = 0). Then use the Object Get function card to find the specific profile.status_text.

Finally, verify that the status_text value is present and has the correct value.

Related topics

Functions in Workflows

Elements of Workflows