Hi Jaqueline,
Here is an example of the Upload File action.
1. Create a Collection and add four fields:
File (Binary),
File Name (Text),
Content Type (Text),
Field Name (Text)
2. On the
Initial Values tab, create a row. This row will contain the file you wish to upload to Slack and should be set up like this:
- The File field is where you click "Import" and select the file you want to upload to Slack.
- The File Name field is where you enter the exact name of the file you selected, in my case I selected an image from my computer titled
image.PNG
- The Content Type field must be set to
application/octet-stream
- Field Name must be set to
file
3. Add a second row to this collection which will contain information about which channel/conversation the file in Row 1 should be uploaded to in Slack. To achieve this, first you will need to create a new text file on your computer. This text file will contain the ID of the conversation you want to send the file to.
- In my case, I opened Notepad and created a new text file titled conversation.txt on my Desktop.
- I entered the ID of the Slack conversation where I want to upload my image file. (If you don't know the conversation/channel ID, you can use the "List Conversations" action to get a list of current Conversation IDs)
- You may add several Conversation IDs in this file, separated by commas. In my example, I just have one Conversation ID.
4. Back in the Collection, in your second row, click the "Import" button and select the .txt file you created in the previous step.
- Leave File Name and Content Type blank
- Set Field Name to
channels
Your collection should look like the image above - Row 1 has the file to upload, Row 2 has the file identifying the Slack conversation to upload the file.
5. In the Input Parameters for the Upload File action, set the Files input parameter to the Collection you have created. And set the Token credential name as well.
I just tested the above steps and it was successful for me.
------------------------------
Charlie Kovacs
Sr. Digital Exchange Engineer
Blue Prism
Austin, USA
------------------------------
Charlie Kovacs