Creating Incident Ticket from 3rd party application which send HTML content in the Body of the Email sometimes get really difficult to process and since the ServiceDesk Incident Management Description field doesn't support HTML, Email Monitoring Project convert the Body of the email from HTML to plain text which remove all the HTML tags and make the information difficult to understand as the formatting of the email is completely removed. To solve this issue I design a small modification which converts this sort of specific Email's Body in PDF attachment to the Ticket keeping almost the exact same formatting. The Trick is to use HTML to PDF converter Component
As you can see in the below mentioned Email Monitoring Workflow Project we have a used a additional components to accommodate this functionality.
Kindly note this is just an demonstration of the capabilities of Symantec Workflow, These Modifications are not officially supported by Symantec Support. In this demonstration we modified the Email Monitoring project only for POP but the same can be done for IMAP very easily. The attached Email Monitoring Project has the logic for both.
(In this Example we are modifying the Email Monitoring Workflow to Create tickets from the Critical Notification Sent from SEPM Server as the SEPM Server send's the list of computers with there respective status in a tabular form, it become difficult to understand it when formatting is remove so we can use this modification to create a PDF report from that notification and attach it to the ticket for further action.)
In order to accomplished this we need below mentioned components and arrange them in the order as show below.
1) Initialize Data Component.
2) Text Contains Rule Component
3) 2 AddNew Data Element Components and a Copy Data Element to New Location Component
4) Convert HTML to PDF Component.
5) Merge Text Component
6) Get Document Category by Name Component and Add Document Component
7) True False Rule Component.
Arrange Initialize Data Component, Text Contains Rule Component, 2 AddNew Data Element Components, Convert HTML to PDF Component and a Copy Data Element to New Location Component as show below.
In Initialize Data Component, Select DataType as Logical and Set the value to False and Variable name to SEPMEMail.
In the Text Contain Rule Component we need to define the verification condition based on which we will be deciding whether this is an email sent by SEPM Server or Normal user. We can use two logics here one, based on Sender's Email Address which I have used below or we can use the Subject as a deciding factor, To use Subject for classify emails change the Variable from SingleEmailMessage.From to SingleEmailMessage.Subject and Type the desired subject in Contains by click Eclipse(...).
The Next Component is the First Add New Data Element Component, Select the DataType as Logical and check the Value check box, this will set the value of the SEPMEmail variable to true.
The Second New Data Element will store the Incident number in the later part of the flow, so right now we just have to initialize it and set the value is none/null. Select the DataType as text and variable name as process id.
This is the component which is doing all the heavy lifting as it converting the HTML body of the Email to Pdf.
Since we have created a pdf file from the original body of the email we need to put something simple to replace body which will be used in ticket as description and notify the technician that the details are attached as PDF to the ticket.
Copy the New Body to SingleEmailMessage.Body
Now we have to set rest of the three components Get Document Category by Name Component, Add Document Component and True False Rule Component as shown below.
Additional Changes in the ProcessMessage Linked Model
Last Part of the puzzle.
Final Results :)