trigger a logicapp from an API manager operation

SKT 141 Reputation points
2024-06-16T20:17:13.4933333+00:00

Hi all,

We want to trigger a logic app when a certain operation is used in API manager. I've had a look at event grid guide, but it only seems to support administration type events. Is it possible some other way to trigger a logic app when a certain operation is used in API manager?

e.g when someone posts /createitem operation in our API, we also want to send a teams notification.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,908 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,963 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vlad Costa 780 Reputation points
    2024-06-17T01:04:48+00:00

    Hi SKT,

    Here’s what you can try to achieve this:

    1. Triggering a Logic App: You can use the HTTP request trigger in Azure Logic Apps to create a callable endpoint. This endpoint can be called when a certain operation, like /createitem, is used in your API. You can set this up in the Azure portal by creating a new Logic App and choosing the HTTP request trigger when defining your Logic App’s workflow.
    2. API Management Integration: You can integrate your API Management with Azure Logic Apps. To do this, you can set the backend URL of your API definition in API Management to the URL of the HTTP request trigger of your Logic App. This way, whenever the /createitem operation is used in your API, it will trigger your Logic App.
    3. Sending a Teams Notification: You can use the Teams connector in Azure Logic Apps to notify a Teams channel. After triggering your Logic App, you can add an action to send a message to Teams. You’ll need to sign in with your Teams account and choose the team and channel where you want to send the notification.

    References:

    https://medium.com/@asaxena_43463/azure-logic-apps-7c380d32c6b2

    https://stackoverflow.com/questions/56278348/way-to-create-a-trigger-for-logic-apps-when-a-api-management-api-gets-called

    https://video2.skills-academy.com/en-us/graph/teams-send-activityfeednotifications?tabs=desktop%2Chttp

    If you find this response helpful and it resolves your issue, please consider marking it as “Accepted” or giving it an upvote. This will help others in the community find the solution more easily.

    0 comments No comments