i'm trying to use the mulesoft slack connector to upload a pdf file and a png file to a slack channel but i'm not able to configure the settings correctly to make this work. Has anyone been able to do so successfully? Here is my transform message just before the slack upload file connector:
%dw 2.0
output application/x-www-form-urlencoded
---
{
"channels": "C03E4FWEQRY",
"content": payload,
"filename": "AdobePremierPro2021.pdf",
"title": "AdobePremierPro2021",
"filetype": "pdf"
}
It sends the file to the channel but all content is lost. The file comes across as a binary file that cannot be read.
Here is the XML snippet:
<flow name="upload-sub-flow" doc:id="1c8a2b29-5358-41bd-acd8-760676ddd86e" >
<file:read doc:name="Read" doc:id="d4ba9476-4d83-47cd-8915-f1e8ef8e119e" config-ref="File_Config" path="/Users/aparkhe/AnypointStudio/1platform/slack-sys-api/src/main/resources/AdobePremierPro2021.pdf"/>
"] <ee:transform doc:name="Transform Message" doc:id="72c36c3b-ce68-4c5d-8a0f-961f95a71569" >
<ee:message >
<ee:set-payload ><![CDATA[%dw 2.0
output application/x-www-form-urlencoded
---
{
"channels": "C03E4FWEQRY",
//"thread_ts": vars.SlackTS,
"content": payload,
"filename": "AdobePremierPro2021.pdf",
//"filename": "ArrivalPass.png",
//"title": "AdobePremierPro2021",
"filetype": "pdf"
}]]></ee:set-payload>
</ee:message>
</ee:transform>
<slack:create-filesupload doc:name="Upload File" doc:id="08546a03-d746-42af-b50e-d45c11a5eb04" config-ref="Slack_Connector_Config"/>
</flow>
Here is the POM dependency:
<dependency>
<groupId>com.mulesoft.connectors</groupId>
<artifactId>mule4-slack-connector</artifactId>
<version>1.0.12</version>
<classifier>mule-plugin</classifier>
</dependency>