Skip to main content

Installing and using the KurocoWorkflow bot for periodic verifications in Slack

note

Estimated time: 5 minutes

caution

Note: Package selection for the free trial has been temporarily disabled. To sign up for a KurocoWorkflow bot account, contact our Support Team.

About the app

KurocoWorkflow is a bot that sends periodic Slack reminders until mentioned members have reacted to the post.

  • This package was inspired by the article Specifications for the Slack "Verification Bot" (I need someone to create it) and created in 1 day.
  • The cost for a monthly usage of about 3,000 workflows is expected to exceed the free monthly quota of 1,100 yen.
  • This package can be used as an OEM product or modified entirely in the admin panel to fit your needs. Let us know if you have any questions or requests.

Image from Gyazo

Launch

The bot is launched by posting a message that includes the following conditions in any channel:

  • @KurocoWorkflow mention
  • @[Name] mention

Image from Gyazo

Default reminder settings

Mentioned individuals who have not reacted to the Slack post with either 👍 or 👎 will be reminded as follows:

Image from Gyazo

The reminders will stop once the mentioned user reacts to the Slack post with either 👍 or 👎.

Image from Gyazo

Reminder cancelation

The reminder can be canceled by adding a ❌ to the original Slack post (this can only be done by the original poster).

Image from Gyazo Image from Gyazo

Watch

Users can watch a post by reacting with 👀. They will receive a DM of the workflow results when it is completed.

Image from Gyazo Image from Gyazo

Workflow completion

The workflow is completed when all mentioned members have given a 👍 or 👎 reaction.

Image from Gyazo Image from Gyazo

App setup

Bot account sign up

To use KurocoWorkflow, you need to sign up for a workflow bot account on Kuroco's Free Trial page.

Image from Gyazo

Under "Package", select [Workflow Slack bot]. Fill in the required information and click [Sign up].

Image from Gyazo

You will receive a confirmation e-mail. Click the admin panel URL in the e-mail to log in. You will see the following screen.

Image from Gyazo

API domain verification

To integrate with Slack, you need the API domain. In the left sidebar menu, under "SETTINGS", select [Environment] -> [Account].

Image from Gyazo

On the account information screen, copy down the API domain for later use.

Image from Gyazo

Endpoint verification

Then, verify the endpoint required for Slack integration. In the left sidebar, select [API] -> [ForSlack].

Image from Gyazo

Note down the path of the existing endpoint.

Image from Gyazo

(In the above example, copy down /rcms-api/3/event.)

Create the app on Slack

Go to the Slack API page and click [Create an App].

Image (fetched from Gyazo)

In the app creation dialog that appears, select [From an app manifest].

Image (fetched from Gyazo)

Next, select the workspace where the app will be used under "Pick a workspace to develop your app in:". Then click [Next].

Image (fetched from Gyazo)

On the "Enter app manifest below" screen, paste the following code into the "YAML" text area.

Image (fetched from Gyazo)

_metadata:
major_version: 1
minor_version: 1
display_information:
name: KurocoWorkflow
features:
bot_user:
display_name: KurocoWorkflow
always_online: true
oauth_config:
scopes:
bot:
- app_mentions:read
- channels:history
- chat:write
- emoji:read
- im:history
- im:write
- mpim:history
- reactions:read
- team:read
- users:read
- groups:history
- groups:read
- groups:write
settings:
event_subscriptions:
request_url: https://sample.a.kuroco.app/rcms-api/3/event
bot_events:
- app_mention
- reaction_added
- reaction_removed
org_deploy_enabled: true
socket_mode_enabled: false
token_rotation_enabled: false
caution

Substitute https://sample.a.kuroco.app/rcms-api/3/event in the above code with the API domain/endpoint path you copied from the Kuroco admin panel.

After pasting in the code, click [Next].

Image (fetched from Gyazo)

Finally, click [Create] to finish adding your app.

Image (fetched from Gyazo)

Install the app to your Slack Workspace

Next, click [Install to Workspace] to install the app you created above in your Workspace.

Image (fetched from Gyazo)

On the access request screen, click [Allow].

Image from Gyazo

Select [Event Subscriptions] in the left sidebar to set up events.

Image (fetched from Gyazo)

Under "Request URL", enter the API domain/endpoint path you copied earlier. Then click [Save Changes].

Image (fetched from Gyazo)

Select [OAuth & Permissions] from the left sidebar to view your tokens.

Image (fetched from Gyazo)

Copy the "Bot User OAuth Token" for later use.

Image (fetched from Gyazo)

Adding an app icon

The app icon is hidden by default on Slack. Therefore, you need to configure the image settings.

Select [Basic Information] in the left sidebar.

Image (fetched from Gyazo)

Under "Display Information", click [+ Add App Icon].

Image (fetched from Gyazo)

For this tutorial, we are uploading the Kuroco icon (you can download the image here). The icon is set once the image has been uploaded.

Image (fetched from Gyazo)

App verification

"KurocoWorkflow" will be added under "Apps" in your workspace.

Image from Gyazo

Slack integration in Kuroco

Now that you have created the app in Slack, you need to integrate it into Kuroco before it can be used.

In the left sidebar of Kuroco's admin panel, select [External system integration] -> [Slack].

Image from Gyazo

On the Slack integration screen, select and enter the Bot User OAuth Token you copied earlier in the text field. Then, click [Update].

Image from Gyazo

Localization

Messages sent by the Workflow Slack bot are in Japanese by default.
Please edit the following to update the Workflow Slack bot messages.

  • Batch process: check_status
    Image from Gyazo

  • Custom function: update_status
    Image from Gyazo

The message to be sent by the bot is written in the slack_post_message section of each.

Image from Gyazo

Activity verification

Finally, verify the bot activity on Slack. Navigate to your Slack Workspace and post a message in a channel that mentions @KurocoWorkflow and @yourself.

Image from Gyazo

If you do not react with a 👍, you will receive a DM reminder.

Image from Gyazo

Operations

Verify posts

You can view all the posts and their statuses in [Content] -> [Workflow] from Kuroco's sidebar menu.

Image from Gyazo

Manage emojis

Select [Content] -> [Master] -> [Action emojis].

Image from Gyazo

You can manage the emojis and their actions on the master editor screen.

Image from Gyazo

The default settings are as follows.

ActionEmojiSlack emojiDescription
canceledxAdd to the original workflow message to cancel all DM notifications.
approved1👍React to approve the workflow. The workflow is completed when all mentioned individuals have reacted.
rejected-1👎React to reject the workflow. The workflow is completed when all mentioned individuals have reacted.
asapfire🔥Add to the original workflow message to mark it as high-priority.
watcheyes👀React to watch the workflow. Watchers will be notified by DM when the workflow is completed.

You can also edit the master content via CSV upload.

For more information, see User guide: Master.


Support

If you have any other questions, please contact us or check out Our Slack Community.