Hi @Lakshmi Narayana Sarma Bhamidipati
Welcome to Microsoft Q&A platform and thanks for posting your query here.
To help you send notifications with parameterized email IDs in Azure Data Factory (ADF) pipelines, here's a simple explanation:
Create a Pipeline Parameter for the Email:
- Inside your ADF pipeline, create a parameter (e.g.,
EmailRecipient
). This will store the email address you want to use for notifications.
Pass the Parameter to the Email Activity:
- If you're using a Web Activity to send emails, you can reference the parameter in the request body or headers using
@pipeline().parameters.EmailRecipient
. This makes the email address dynamic, instead of hardcoding it. - Alternatively, you can use an Azure Logic App triggered from ADF and pass the parameter value to the Logic App, which then handles the email notification.
Set Parameter Values Dynamically:
- You can dynamically set the parameter value during pipeline execution using variables or derived values based on specific conditions. For example, you might have a lookup activity to fetch email addresses from a table and set this value through subsequent activities.
Use Parameters in Multiple Activities:
- Since parameters are reusable, you can use the same parameter (
EmailRecipient
) across different activities within the pipeline. This avoids hardcoding and enables easy updates if the recipient list changes.
Example expression for using a parameter:
{
"emailTo": "@pipeline().parameters.EmailRecipient",
"subject": "Pipeline Status Notification",
"message": "The pipeline run has completed."
}
Reference: Send an email with an Azure Data Factory or Azure Synapse pipeline
Video link: https://www.youtube.com/watch?v=yw-_txuwUiA
I hope this helps. If you have any further questions, please let me know.