Integrating Slack with DronaHQ

Integrate Slack and DronaHQ to achieve the flexibility to connect with your customer and teams members easily from your micro-app

You can make use of the Slack Integration to send messages to the members of that specific channel or to specific users.

Configuring Slack connector

  • The Slack connector is available under Connectors.

  • You need to add the Slack Account to Authenticate Slack. Here you can add an account by using Connect Slack Account.

  • For this you need to first configure the account and then proceed. Once all details are added, click Save. Your connector account configuration is now done.

  • If you have already configured your account, you simply need to choose it from the list. In case you want to make any changes to the account configuration you can hover your mouse across the account and you can note the edit and delete options. Click to Edit.

Using Slack connector

Now let us consider a few scenarios to understand some of the functionalities available with this integration. You can make use of the connector actions by adding the connector from an Action Flow or a Workflow. You can also use the Bind Data to fetch data from the connector.

Now when you want to use the Slack connector within your Apps, you can go to the UI Builder > Connectors > Connected tab. Here all connectors that have accounts configured or in other words, are connected will be listed out. If you click Manage Account, you can see the list of all available actions for the connector. You would need to add the API / action whenever that you need to use for further actions. Once you have fetched the data using the respective action, you can make use of the Bind Data to fetch data into a control.

Get a list of users

Let us consider a very simple example to fetch a list of users of Slack. Add a Table grid control and go to Bind data.

  • Click Select Connector where you would get a list of Connectors. Select Slack and click Continue. You get the list of available actions for the connector.

  • Select GetUserList action and click Continue. Select the Account to authenticate Slack.

  • Add the connector name. Now if you want to transform response or add transform keys you can make the necessary changes and updates here and click Finish.

  • Once the configuration is done you need to select the keys to be used to display data. You can select them as members.id, members.name, members.email and so on. Click Save.

Now if you run the form you can get the list of users.

You can also use the GetChannelList action in a similar manner.

Sending a message

Let us consider a very simple example to send a message to a specific user of Slack. Add a Text input control to your form to accept the message to send and a dropdown control to list out the Slack users. Also, add an Action button that would trigger the action to send the message. So now you need to use the Connector action from the Action flow.

  • From the Server Side actions select the Slack Connector and click Continue. From the list of actions select SendMessage Action.

  • Select the Account to authenticate Slack.

  • You need to configure the Connector fields. so, select the user from the list or you can also accept it from the form as input control. In this example, we will make use of the same action GetUserList to fetch the data for the dropdown. Here the dropdown will have to be two columns so that the Id is visible. We will fetch the id and the name as you need the ID as input for the SendMessage action.

  • Let us configure the connector. We will assign the dropdown control’s value to the Select Users field using the Use keyword and the text input control as the Message field.

  • Add the keywords and click Continue. Add the connector name. Now if you want to transform response or add transform keys you can make the necessary changes and updates here and click Finish.

Now when you run the form, you can select the user and type the message.

Click the Action button to Send Message and the selected user would receive the message on Slack.