Set up the Microsoft Outlook Send Message Step so that you can use it to send richly formatted emails with images in line with the email body text instead of only as file attachments.
To send emails with inline images, the Microsoft Outlook Send Message Step must be v8.1 or later.
To send emails with inline images in Outlook:
Open the Workflow: In Torq, go to Build > Workflows and open the relevant Workflow.
Create an HTML document: Add a Print a message to stdout Step (renamed
HTML message bodyin this example) to create the HTML content that will be used as the Message content for the Send Message Step. The HTML must include animgtag that will reference the image you will attach using a content ID that is an arbitrary alphanumeric string (e.g.<img alt="Torq Rules" width="1584" height="396" src="cid:email_banner">).Encode the image to base64: Add a parallel Print a message to stdout Step (renamed
Message image base64in this example) to add the image in line with the email message body as base64 strings.Configure the Send Message Step: Add a Microsoft Outlook Send Message Step and open its parameters.
Add the Message content parameter and select the HTML message body Step's output context.
Add the Message content type parameter and select HTML.
Add the Attachment content parameter and select the Message image base64 Step's output context to reference the base64-encoded string of the image you want to add to the email.
For Attachment content type, enter the provided image's content type. A base64-encoded PNG image would be
image/png;base64.For Attachment filename, enter a file name for the attached image. This is required by the Microsoft 365 Graph API.
For Encode attachment, select
falsesince you already provided the image as a base64-encoded string.Add the Content ID parameter and enter the string inside the
imgtag in the HTML code of the email body (e.g.email_banner) to refer to the attached image.Add the Is inline parameter and select
true. This will instruct the Microsoft 365 Graph API to display the image in line with the email message body.
Finalize: Run the Workflow. The sent Outlook email should look similar to the following:


