Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

How to send email attachments using SendGrid with Qlik Application Automation

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
hervebiey
Support
Support

How to send email attachments using SendGrid with Qlik Application Automation

Last Update:

Jul 18, 2023 7:00:52 AM

Updated By:

Sonja_Bauernfeind

Created date:

Sep 17, 2021 7:02:48 AM

This articles gives a basic overview of how to send an email attachment using the SendGrid connector in Qlik Application Automation.

For more information about how to use the SendGrid connector, see How to get started with SendGrid in Qlik Application Automation.

Content:

 

Creating the attachments to send

To compose the email, use the "Send Email" block.

The attachment field allows you to add one attachment or a list of multiple attachments that you’d like to send with the email.

attachments.png

There are three attachment types that you can choose from:

  • Email Base 64 File Attachment
    Use the Email Base 64 File Attachment block to send any Base64 encoded file as an attachment.
  • Email CSV Attachment
    Use the Email CSV Attachment block to create a custom CSV that can be sent.
  • Email Text Attachment
    Use the Email Text Attachment block to create an attachment from any text type (this can be Base64 encoded, but does not have to).

 

Creating the Base64 content:

All attachments need to be Base64 encoded. This is one possible way to create a Base64 encoded file:

  1. Drag and drop the "Open File" block.

    open file block.png

  2. Select the storage "Connector" that you’d like to use. Dropbox is used for this example.

    open file.png

  3. Fill in the Path to the file that should be encoded.

    Connector and Path.png

  4. Drag and drop the "Read Data From File" block and select the file that was just opened.

    Read Data From File.png

  5. Drag and drop the "Create Attachment From Base 64" block and add the content from the "Read Data From File" block to the Attachment Content field.

    Create Attachment From base64.png

  6. Click on the content and select "Add Formula".

    Read Data from File Add Formula.png

  7. Search for "Base64 encode" and click on it.

    Base64 encode.png

  8. Make sure the correct content is used and click on "Save". 

    Read Data from File String.png

  9. Add the file's name and optionally also the MIME type. 

    Create Attachment from base64 attachment content.png

 

Sending one attachment:

  1. Drag and drop one of the three attachment blocks.
  2. Add this block to the attachment field of the Send Email block.

    send the attachment.png

 

Sending a list of multiple attachments:

  1. Create the various attachments using any or all of the three attachment blocks.
  2. Create a variable by drag and dropping the "Variable" block (you can search for it in the blocks search box).

    variable.png

  3. Click "Manage variables" in the Variable block panel (right panel).

    Variable Inputs.png

  4. Give the variable a Name, and set the "Type" to "List". Then click on "Save".

    add new variable.png

  5. Set the variable you created, and add the various attachments to the variable.

    variable attachments.png

  6. Add the variable to the attachment field of Send Email block.

    add the attachments.png

 

Labels (2)
Version history
Last update:
‎2023-07-18 07:00 AM
Updated by: