cancel
Showing results for 
Search instead for 
Did you mean: 

Slack Skill

acatalano
Level 4
Hello, anyone is using slack to run process ?

Hola, ¿alguien está usando slack para ejecutar procesos?

------------------------------
Agustin Rodolfo Catalano
Computing Engineering
Santander Argentina
America/Argentina/Buenos_Aires
------------------------------
12 REPLIES 12

Hi Jaqueline,

Glad to hear it is working! I have attached an example process that you can download here and import into your Blue Prism environment that may be helpful for you (need to unzip file first). I already have my image file and my conversation.txt file created on my computer so I know the file paths for those (these are the Input File Paths data items). From here, the process will do the rest of the work of putting the Collection together so that the Upload File action is successful. Here is what it looks like:
6008.png
So, you are on the right track - start by bringing your files in as Binary data items. Then I use the Split Path action from the Utility - File Management object. You will see this action has an output parameter called File Name which will give us the name of the file that we need to include in the File Name field in the Upload File Collection.

From there, I add a row to my Upload File Collection and then a Multi-Calc stage to write all the fields at once. The [File Name] data item is the output of the Split Path action. And Field Name will always just be "file" for this case - here is how it looks for creating Row 1:
6009.png
I do something similar for row 2, to add the conversations.txt file. And finally, the collection is prepared for the Slack Upload File action.

If you can import my example process into your own environment, you will be able to see how I set up the input and output parameters for each stage to make this work.

Cheers


------------------------------
Charlie Kovacs
Sr. Digital Exchange Engineer
Blue Prism
Austin, USA
------------------------------
Charlie Kovacs

Olá Charles, poderia me auxiliar na action Post Message (Blocks). Estou na dúvida de como definir os parâmetros json (slack) no Blue Prism. Seria por meio de uma collection? quais seriam os campos devo criar?

------------------------------
Jaqueline Santos
------------------------------

Hi Jaqueline,

The Post Message (Blocks) action is useful when you are sending a Slack message that is built with "blocks". Slack has a feature called Block Kit. Instead of plain messages with only text, you can create more complex messages that have things like buttons and menus. Slack refers to these buttons and menus and such as "blocks."

Slack also has a tool called Block Kit Builder. This tool allows you to visually build and design your own Block message (drag and drop). On the left-hand side, it shows what your message will look like in Slack. On the right, it shows the JSON that defines this Block message. I recommend designing your Block message in Block Kit Builder first. Then copy the JSON text (note in the screenshot below, just copy the inside of "blocks" (like what I highlighted in gray, including the square brackets)). 

6029.png


The copied JSON text can then be placed in a Text data item in your Blue Prism process. And then that data item can be your input parameter for Blocks.
6030.png


If you need to change some text or value in your Blocks message dynamically, you can use a Calculation stage and the Replace() function to make the change. Here I am changing the word "well" to "great":
6031.png

Last item I will note is the "Text" input parameter for the Post Message (Blocks) action. If you provide some text for this input parameter, it will show it in the notification for the user that receives the Slack message.
6032.png
If you leave it blank, the notification will look like this:
6033.png


------------------------------
Charlie Kovacs
Sr. Digital Exchange Engineer
Blue Prism
Austin, USA
------------------------------
Charlie Kovacs