How to convert a file to a Base64 string from an email trigger

The Byte Group step allows you to convert a file to a Base64 string and a Base64 string to a file in bytes.

Illustrated in the below image is an example of a flow with an email as a trigger source. In this example, a file is being converted to a Base64 string.

In the email trigger step, fill in the domain name of your email address without the “@” , tick the Process Attachments check box and type in the file type that you want to filter from your email as shown in the image below. Once that is done, click on “enable” and “attach” and then save to enable the trigger and to attach the file.

As per the image below, “Byte” has been selected from the dropdown list in the Input Mode and “Base64” has been selected from the dropdown list in Output Mode. This will reference the pdf file from the customized email address in the email trigger step as bytes and convert it to a Base64 string. If you want to give the Base64 string a field name, type a field name in the “To Field” field.

Illustrated in the below image is the output containing the field name and the converted file as a Base64 string.

Byte Buffers in Calculators