Create a Send Message to Particular Channel Service
In this task, we create a Send a Message to Particular Channel service that sends a message to a particular channel in the Slack application.
To Create a Send Message to Particular Channel Service
- Go to Integrations - IPAAS > Integrations dashboard.
- Go to the Slack integration. Then, click on the name of the integration.
- Drag and drop the Http Client entity from the left pane to the canvas.
- Select the Http Client entity and update the properties panel.
- In the Authenticate section, select the required Authentication.
For more information on authentication and credentials, refer to Authentication and Credentials. - In the Operation section, select the operation as Get Channels.
When you select an operation, the Backflipt platform automatically selects the latest version of the particular operation.
- In the Authenticate section, select the required Authentication.
- Drag and drop the Loop entity from the left pane to the canvas below the Slack integration.
- Select the Loop entity and update the properties panel.
- In the Operation section, select the operation as Loop List.
- In the Input section, under List, click the dropdown icon and select slack_1 from the JSON Path.
By default, the Index Handle is an index and the Item Handle is currentValue.
- Drag and drop the Boolean Condition entity from the left pane to the canvas below the Loop entity.
- Select the Boolean Condition entity and update the properties panel.
- In the Operation section, select the operation as Boolean Condition.
- In the Input section, under Fields, click Add Condition.
- Under Condition, click the dropdown icon and select Slack and label from the JSON Path.
- Select Equals in the dropdown list under label.
- Click the dropdown icon and select channel from the JSON Path.
- Drag and drop the Slack integration from the left pane to the canvas in the True branch of the Boolean Condition entity.
- Select the Slack integration and update the properties panel.
-
- In the Operation section, select the operation as Send Message To Channel.
- In the Input Channel section, click the dropdown icon and select channel from the JSON Path.
- In the Input Text section, click the dropdown icon and select message from the JSON Path.
- Drag and drop the Loop entity from the left pane to the canvas in the False branch of the Boolean Condition entity.
- Select the Loop entity and update the properties panel.
- In the Operation section, select the operation as Continue Loop.
- On the top pane of the canvas, click Schema and select Input to configure the input schema.
- In the Schema Editor dialog:
-
- Select ADVANCED option.
- Enter the Key as channel and Label as Channel Name.
- Enable the Required button.
- In the UI Control dropdown, select the UI control method as Input.
- Click Add Field.
- Enter the Key and Label as message.
- In the Parser dropdown, select the parser method as Template.
- Enable the Required button.
- In the UI Control dropdown, select the UI control method as Input.
- Select OK.
- On the top pane of the canvas, click Schema and select Output to configure the output schema.
- In the Output Schema dialog, select the Type as Run type.
- Select OK.
- Select Save.
The created service is added to the Slack integration.