Table creation when sending mail


I was designing a pipeline which includes salesforce upsert and deletion . Obviously error view will be captured for the upsert and deletion operation and while sending the mail along with sending the file we decided to incorporate the values ( like upsert success, error and delete success , delete error ) in a table format using snaplogic’s HTML TABLE method . We achieved the same but whenever we have say 2 values out of 4 we have two separate tables and if we have 3 values 3 tables are created but we would like to incorporate all the values in a single table view . Please find my pipeline and sample attachment.

As per the above screenshot we would like to have the values Submitted Leave Success and Cancel DEL success in a single table instead of separate table.

Please find my pipeline:


@Harsha3 - Try below approach-
Use group by N make it as 0 so all record should be grp by in one array, then change the table data path with your group name like below-

Hi Supratim,

Thanks for the reply I have tried that approach still we get two rows instead of one for having two values.


You might try the Aggregate snap using the MAX function:

Hi del,

Thanks so much it works! . May i know the working procedure here because without this method we would have got two rows so does it like the inherent table property we use in mail sender

I’m not sure I understand this question; but will try to answer.

If the output from your pipeline just before the email sender is 2 separate documents due to the way your pipeline is set up; the email sender creates a table row for each document (i.e. a table with 2 rows). If your output was 30 documents, the table would have 30 rows.

However, by adding the aggregate snap before the email sender, it reduces all the individual documents into a single document - therefore the email sender will only create a table with one row.

1 Like

Thanks for the comprehensive answer!

Hi Harsha,

As an alternative you can put your data in XML then use XSLT to generate an HTML and use this HTML as the body


Thanks @alchemiz will try that approach too

Hi Alchemiz,

I was able to obtain the result as per your method . Thanks since I am new to IT with intermediate knowledge in snaplogic , I would like to know how to create a vertical table . Can you please help me in modifying the code which I published below ( This code creates horizontal table).

Email Snap HTML Table table.Snap {background-color:transparent;border-collapse:collapse;width:100%;} table.Snap th, table.Snap td {text-align:center;border:1px solid black;padding:5px;} table.Snap th {background-color:Aquamarine;}

Hi Team,

Kindly find the attached sheet which contains affiliation and address mismatches in SIQ.

Success and Error record count: