How to send an email from data factory pipeline with its inputs parameter

Rohit Boddu 461 Reputation points
2021-06-21T10:43:29.407+00:00

Hi Team,

We have one data factory pipeline which does the copy activity .. this pipeline gets used by many developers and when they debug/run they provide some parameter value for source and sink.

So whenever any developer runs/debugs pipeline our admin team should get email with below details -

1) name of developer who ran the pipeline
2) inputs given to source and sink in pipeline

How this can be done

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,693 questions
{count} votes

Accepted answer
  1. ShaikMaheer-MSFT 38,126 Reputation points Microsoft Employee
    2021-06-22T12:14:10.133+00:00

    Hi @Rohit Boddu ,

    Thank you for posting query in Microsoft Q&A Portal.

    You can achieve your scenario using HTTP trigger type logic app and by having "developerName","source" &"sink" parameters inside pipeline

    Logic App creation:
    Step 1: Create a consumption type logic app. Inside logic app designer select "Blank logic app". Search for "Request connector" and select "When a HTTP request is received" trigger. Add below Request body json

    {  
    		    "type": "object",  
    		    "properties": {  
    		        "developerName": {  
    		            "type": "string"  
    		        },  
    		        "source": {  
    		            "type": "string"  
    		        },  
    		        "sink": {  
    		            "type": "string"  
    		        }  
    		    }  
    		}  
    

    108150-httptrigger.gif

    Step 2: Click "Next Step", search for Office 365 or Outlook or Gmail connector based your email provider and select "Send an email" action. It will ask you to Sign In. Please Sign in with the email id with which you would like to send email. Enter "To" email address & "Subject" & Email body details.
    108175-emailnew1.gif

    Step 3: Save changes in Logic app and note down URL from HTTP request step

    Pipeline Implementation:
    Add parameters in Pipeline and use web activity to issue request to logic app API after copy activity to send email.

    Request body:

    {
    "developerName":"@{pipeline().parameters.developerName}",
    "source":"@{pipeline().parameters.source}",
    "sink":"@{pipeline().parameters.sink}"
    }

    108029-pipeline.gif

    Hope this will help. Thank you.

    --------------------------------------

    • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a email-notifications.
    3 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Rohit Boddu 461 Reputation points
    2021-06-24T11:40:28.637+00:00

    Yes @ShaikMaheer-MSFT .. thanks for answer ..