...
Environment/Instance Properties
Property Name | Property Code | Required | Description |
---|---|---|---|
Project Properties
Property Name | Property Code | Required | Description |
---|---|---|---|
Inputs
Input Name | Input Code | Required | Description |
---|---|---|---|
Slack Account | FDSLACK_INP_CLOUD_ACCT_CODE | Yes | Slack account code from Topology->Integrations->Messaging |
Message JSON | FDSLACK_INP_MESSAGE_JSON | Yes | JSON for slack message. Formatted based on Slack API . This input now allows FlexDeploy property replacement notation to be used. e.g. ${{FD_ENVIRONMENT_CODE}} This can be useful for writing dynamic message content. |
Outputs
Output Name | Description |
---|---|
FDSLACK_OUT_MESSAGE_TS | Resulting Slack Message Id (TS id) of the newly created message. This can be used start or reply to threads. |
Artifacts
This operation delegates the consume artifacts decision to the workflow developer.
...
Below is a message JSON payload example. This will send a message to a channel called flexdeploy-demo.
...
Message JSON example
Code Block |
---|
{ "channel": "flexdeploy-demo", "icon_url": "https://life.meetnext.com/favicon.ico", "as_user": false, "username": "FlexDeploy", "text":"This is a test message for FlexDeploy's slack plugin" } |
Below is the final result in the flexdeploy-demo channel.
...
A more complex message JSON can be found below.
...
Complex message JSON
Code Block |
---|
{ "channel": "random", "blocks": [ { "type": "section", "text": { "type": "mrkdwn", "text": "Danny Torrence left the following review for your property:" } }, { "type": "section", "block_id": "section567", "text": { "type": "mrkdwn", "text": "<https://google.com|Overlook Hotel> \n :star: \n Doors had too many axe holes, guest in room 237 was far too rowdy, whole place felt stuck in the 1920s." }, "accessory": { "type": "image", "image_url": "https://is5-ssl.mzstatic.com/image/thumb/Purple3/v4/d3/72/5c/d3725c8f-c642-5d69-1904-aa36e4297885/source/256x256bb.jpg", "alt_text": "Haunted hotel image" } }, { "type": "section", "block_id": "section789", "fields": [ { "type": "mrkdwn", "text": "*Average Rating*\n1.0" } ] } ] } |
This is the final result in the "random" channel.
...