Forum Discussion

anusha_2023's avatar
anusha_2023
Icon for Helper IV rankHelper IV
4 months ago
Solved

Sending Outlook Email using Data Factory Pipeline

Hi,   I have multiple rows for each receiver. I need to send one mail per user only.   When I have created Lookup to read Lakehouse table and indide Foreach Outllook component how to send o...
  • arabalca's avatar
    4 months ago

    Hi anusha_2023 ,

    would do it in a simpler way. Here is the order I would follow: (lookup -for each - office 365)

     

    1. Lookup : Add a Lookup pointing to your table with a simple query:

    Select name, email, subject,summary from nameTableLakehouse

    2. ForEach: Connect the Lookup to the ForEach and in the Items field put:

    @activity('NameLookup).output.value

    This tells the ForEach to iterate over all the records returned by the Lookup.

    3. Office 365 - Send an Email: Inside the ForEach add the Send an Email activity:

    • To: @item().Email
    • Subject: @item().subject
    • Body: @item().summary

     

    With this, each iteration of the ForEach sends one email per user with their data. Simple and clean.

     

    If you find this helpful please give it a 👍, and if it answered your question please mark it as a solution . This helps the community and motivates me to keep contributing. Thank you!