Use case
In your business your receive eml files and you want to implement an automation process to automatically process any email attached file(s) for further business logics or for archiving purposes. Then this is the right API for you.
What is the EML file format?
The EML file format is a common file type used for storing email messages. EML stands for "Electronic Mail" and it is a file format typically associated with email clients and systems. It contains the complete content of an email, including the sender and recipient information, subject, message body, attachments, and any other relevant metadata. EML files are usually plain text files with a specific structure that allows them to be easily parsed and interpreted by email applications. They can be opened and viewed by various email clients or imported into different email programs for further use or archiving purposes.
Sample request schema:
This API endpoint expects in the request body a JSON with a "content" property
{
content: "BASE-64 encoded string of an EML file"
}
For quick testing you can convert your *.eml file into a base-64 encoded string with an online converter:
https://base64.guru/converter/encode/file
Otherwise you need to implement this conversion logic in your client prior to calling this API endpoint.
In Microsoft's PowerAutomate or FX either you will get the file content already in base64 or there are functions for conversion available.
As a result this endpoint will return base-64 encoded files and its original file names and the mime (file) type.
Sample result schema:
[
{
"fileName": "mypicture.jpg",
"mimeType": "image/jpeg",
"content": "NzRjOGYwOWRmYTMwlyb......S1tYWlsLnhwaQo="
},
{
"fileName": "manifest.json",
"mimeType": "application/json",
"content": "ewogICJtYW5pZmVzHJ1.......ZQogICAgfQogIH0KfQ=="
}
]
To quickly check and convert the result base-64 strings back you could also use this online converter tool:
https://base64.guru/converter/decode/file