Forum Discussion

  • SpiroTaleski's avatar
    SpiroTaleski
    Valued Contributor

    @asingh760

    You can group the records from CSV file based on the “Owner Email” field, using Group By Fields Snap. So that, for each email address you will have all the related data in separate group.

    After that, in a Mapper Snap you can use Array Functions in order to loop through each of the group and get appropriate data for each email. After you get the needed data, in Email Sender Snap, in “Template Body” field, you can pass the data entry for each email address.

    Regards,
    Spiro Taleski

    • asingh760's avatar
      asingh760
      New Contributor II

      Thank you for the response on this.
      I am able to group by data and used mapper to read one by one. The output of the mapper looks like this

      I don’t know how to use this in email send snap

      I used this but it is not sending data to each user with the details

  • SpiroTaleski's avatar
    SpiroTaleski
    Valued Contributor

    @asingh760

    I am attaching two sample pipelines:

    1)Parent - which groups the data based on the email and send the data to Child pipeline.
    2)Child - which split the groups, apply xslt transformation(generate HTML table), and send the table through email.
    Parent_2021_08_27.slp (4.9 KB)
    Child_2021_08_27.slp (10.2 KB)
    Also, I am attaching the sample XSLT file, which you can modify based on your requirements:
    XSLT_Transformation (1).txt (1.1 KB)
    Note: You must create a SMTP account in order to be able to send emails, using Emails Sender Snap.

    Regards,
    Spirp Taleski

  • asingh760's avatar
    asingh760
    New Contributor II

    thanks a lot Spirp to provide detailed example with solution on this.
    I have one last question. I want to send the grouped data in the email to the people.

    I am not able to use the parameter’s using format " +$owneremail+" in the html body of the email.
    If I use email type as html table it fails.
    Do you have any idea on how to do that?