ADF - Make a webhook activity which calls a logicapp to continue to next task

VickyD 81 Reputation points
2024-04-16T09:48:23.04+00:00

Hi all,

On ADF, I have a logic app which is called inside a webhook activity. The intention is to continue to next activity after successful completion of the logic app.

But the webhook activity keeps in running state even after logoc app is completed.

Please help me how to make webhook activity to continue to next task after completing the logicapp.

attaching an image for your reference.

User's image

Thanks,

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

2 answers

Sort by: Most helpful
  1. Amira Bedhiafi 15,446 Reputation points
    2024-04-16T10:50:47.07+00:00

    In your case the Logic App being called need to send a response back to ADF callback URL. This is often where the issue lies.

    • In the Logic App Designer: Towards the end of your Logic App workflow, add a HTTP Response action.
    • Configure the HTTP Response: Status Code: Typically 200 for success. Body: Include any necessary output data you want to return to ADF.

    Then set up the ADF Webhook Activity Correctly

    • Method: POST (usually, unless your Logic App is set to listen to a different method)
    • URL: The URL of your Logic App
    • Body: Format the JSON body as needed by your Logic App.
    • Headers: Include any required headers.
    • Timeout: Ensure this is sufficiently long to allow your Logic App to complete its process.

    Last but not least, the Logic App must extract the callback URL from the request it receives from ADF and use it to send the response.

    • In your Logic App, before the HTTP response action, add an action (like Compose) to capture the callback URL from the incoming request.
    • Use an expression to extract the callback URL, typically found in the headers or body of the incoming webhook request.

  2. ShaikMaheer-MSFT 37,896 Reputation points Microsoft Employee
    2024-04-18T05:16:13.6+00:00

    Hi VickyD,

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

    Webhook activity wait for post back URL to invoke to mark it as completed. You can consider changing your logicapp to invoke postback URL.

    OR

    Easy way, to address this issue, is instead of using webhook activity, consider using web activity. Web activity, will not wait for post back URL to invoke.

    Please check below videos to understand more about these activities.

    Web Activity in Azure Data Factory

    Web Hook Activity in Azure Data Factory

    Hope this helps. Please let me know if any further queries.


    Please consider hitting Accept Answer button. Accepted answers help community as well.