Extracting embedded images from an email’s body when using the “Get IBM Notes Mail Message” activity in UiPath can be a bit challenging because this activity returns the email body as a string, and embedded images are typically encoded as base64 within the HTML of the email body. To extract these images, you’ll need to parse the HTML content of the email body and then extract the base64-encoded image data.
Here are the general steps to extract embedded images from an email’s body:
Get the Email Body: You already have the email body as a string.
Parse the HTML Content: Since email bodies are often in HTML format, you’ll need to parse the HTML content to locate and extract the image tags.
Extract Image Data: For each image tag in the HTML, you’ll need to extract the base64-encoded image data.
Decode the Image Data: Once you have the base64-encoded image data, you can decode it to obtain the image in binary format.
Save or Use the Image: You can save the extracted images to a file or perform any other desired actions.