0

i was trying to upload xlsx file which contains multiple sheets to slack channel with the below is the code snippet

        <ee:transform doc:name="Transform Message" doc:id="568e7e17-1177-4dac-9a6f-985c45827215">
            <ee:message>
                <ee:set-payload><![CDATA[%dw 2.0
output application/x-www-form-urlencoded
---
{
    "channels": "#notification-accelerator",
   "content":write(payload, "application/xlsx") ,
    "filename": vars.filename ,
    "title": vars.filename,
    "filetype": "xlsx "
}]]></ee:set-payload>
            </ee:message>
        </ee:transform>
<slack:create-filesupload doc:name="Upload File" doc:id="d6771237-59c3-401c-a8d6-9c8f0a61ba58" config-ref="Slack_Connector_Config" />

here i was sending this dwl transformed payload to slack to upload file, xlsx file was getting generated in slack channel as corrupted file.same data in other formats like json or txt ,those files are able access/view to the data. same xlsx file payload i was sending it mailbox through smtp as an attachment,it was creating in correct format. But with Slack connector, files which contains xlsx data ,those are getting corrupt/not able to view the data.

Slack connector dependency from pom:

<dependency>
    <groupId>com.mulesoft.connectors</groupId>
    <artifactId>mule4-slack-connector</artifactId>
    <version>1.0.16</version>
    <classifier>mule-plugin</classifier>
</dependency>
Saikumar R
  • 9
  • 1
  • 3
  • 1
    Does this answer your question? [Uploading image/pdf to slack channel using Mulesoft Slack Connector](https://stackoverflow.com/questions/72349522/uploading-image-pdf-to-slack-channel-using-mulesoft-slack-connector) – aled May 10 '23 at 12:37

0 Answers0