Retool Email - Attachment ContentType Issue

I'm sure I'm just missing something. However, it seems like I'm not getting the correct type of the attachment. In my case, it's a 'pdf' or 'pptx', but getting the generic file.

  1. My goal:
    I am uploading some files to s3. Then, I want to trigger a retool email to send an email based on a click of a button. I want to make sure we can include an attachment (pdf or pptx) for users to be able to download or view.
  2. Issue:
    I want to trigger a retool email coding block, the email is correctly sending. However, it seems that the file is always a 'file' not the specified 'pdf or pptx'.
  3. Steps I've taken to troubleshoot:
  • In the beginning, I just passed human-readable 'pdf' and 'pptx' strings to my workflow and used that as the 'contentType' I'm passing to my retool email coding block.
  • Next, I updated it so it would pass in the following instead:
    pdf: application/pdf
    pptx: application/vnd.openxmlformats-officedocument.presentationml.presentation

I found that online, this should be the contentType we should pass. However, I still have the same issue of it just sending a generic file. So, users cannot open this attachment.
4) Additional info: (Cloud or Self-hosted, Screenshots)
I am on cloud and using workflows.

screenshot of generic file attachment in the email:
image

screenshot of my retool email block:

1 Like

Hi there @brpark,

Have you tried the below structure?

[{
base64Data: base64,
name: "name",
type : "application/pdf 
}]

Best,
Miguel

Hi @MiguelOrtiz , yes I've tried that, but it still attaches as a generic file.

Have you tried specifying with the above structure that the name ends in .pdf or .pptx? I have seen that make a difference in other contexts.

4 Likes

that was it @Mike_M ! now it works perfectly

1 Like