Forum Discussion

pranil2k2's avatar
pranil2k2
Contributor
6 years ago
Solved

How to Pass Mapping Variables to Email Snap

Hi,
I am new to SnapLogic. i need help on how to pass the Mapping variable to Email snap. I need a requirement to read the mapping variable and need to refer in Email Snap Template body. so that users can read the values on email itself.

Thanks

  • In Mapper i have two columns, and i need to configure in mail to show the table name and its stats.

    I am trying using below template as suggested in document but it is throwing error. is there any standard format to refer other than below?

    SMRT Load Stats

    Table Name

    +$$Table_name+

        <p>Table Stats</p> 
        <p>+$Table_Record_Count+</p> 
    

    Thanks Again

7 Replies

  • psadasivam's avatar
    psadasivam
    New Contributor III

    @pranil2k2 - You can access your document inside template body by enabling “=” (toggle) expression mode. eg: ‘<body>’+$firstname+‘</body>’. you have multiple ways. Can you share sample output from mapper snap and your template to help further.

  • In Mapper i have two columns, and i need to configure in mail to show the table name and its stats.

    I am trying using below template as suggested in document but it is throwing error. is there any standard format to refer other than below?

    SMRT Load Stats

    Table Name

    +$$Table_name+

        <p>Table Stats</p> 
        <p>+$Table_Record_Count+</p> 
    

    Thanks Again

  • "

    SMRT Load Stats

    Table Name

    +$$Table_name+

        <p>Table Stats</p> 
        <p>+$Table_Record_Count+</p> 
    
    " i think it got broken
    • psadasivam's avatar
      psadasivam
      New Contributor III

      @pranil2k2, Just make sure you are passing array of JSON object to email Snap as shown below and Table-data path is set to $

      • kindminis's avatar
        kindminis
        New Contributor

        Hi, how would this work if I wanted to output multiple tables in one email body? Thanks.

  • Hi Sadasivam,

    Thanks for the reply. I am trying to use HTML Text option. but i am getting below error.
    for now i want to pass single table stats,as mapped in mapper.

    i want to display $Table_Record_Count, $Table_name values in Mail. please can you give some example on this scenario and if possible please share me the pipeline for reference.

    Thanks Again.

  • Hi,

    I tried to implement your method using Table but it is throwing error.

    Below is the syntax used in Mapper
    [{‘Table Name’: $TABLE_NAME,‘Count’:$COUNT}]