Call Logic App from Azure Databricks to Send Email

Subhadip Roy 36 Reputation points
2024-08-05T10:16:16.4166667+00:00

Hi Team,

Could you please advise for calling Azure Logic App to send email from Azure Databricks.

It is giving response as "Response 403".

Is it missing permission/access between logic app and Databricks.

Does it need Databricks connector to be added as Managed Identity in Azure logic Apps.

Below method has been called.

request.post(logic_app_url,json=data,headers=headers)

logic_app_url=https://....

data= request body which is defined as json in curly braces.

headers= {'Content-Type':'application/json'}

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. LeelaRajeshSayana-MSFT 17,866 Reputation points Moderator
    2024-08-05T16:10:40.16+00:00

    Hi @Subhadip Roy Greetings! Thank you for posting this question here.

    You can achieve this by creating a logic app with a trigger of type "When a HTTP request is received". This trigger will generate a URL after you save the workflow. This URL can then be used in your ADF pipeline Web action POST request to trigger the logic app workflow. Please refer the article section Create a callable endpoint that provides the steps on how to create a template for this trigger.

    Once you create the above trigger, you can use the ADF pipeline Web action and to a post request as following by providing the URL of the trigger.

    User's image

    As you may notice, there is no need to grant explicit access to the Logic App within the ADF pipeline.

    Please ensure your logic apps Trigger access option is set to allow access from Any IP address under Workflow settings.

    Once you run the pipeline, your logic app should be triggered without any issues.

    Hope this helps! If you are trying a different approach, kindly share more details and we would be glad to assist you further.


    If the response helped, please do click Accept Answer and Yes for the answer provided. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.