web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Regarding the construc...
Power Automate
Answered

Regarding the construction of webfook

(1) ShareShare
ReportReport
Posted on by 21

Description: I'm trying to set up Webhooks in SharePoint to receive notifications when folders or files are created in a document library using Power Automate.

For this, I've created another flow that sets up the webhook in SharePoint. When creating the "HTTP request received" trigger in that flow, I obtained an HTTP URL.

In my main flow, I added an action to make an HTTP request to SharePoint with:

  • Method: POST
  • URI: _api/web/lists('@{variables('libraryId')})/subscriptions
  • Body: Including fields like notificationUrl (the URL from the webhook trigger creation) and expirationDateTime.

However, I received an error: "notificationUrl validation failed," and the setup didn't work.

I need assistance configuring SharePoint's document library webhooks using Power Automate's "HTTP request received" trigger as the endpoint.

endpoint.png
Error.png
webfook.png
Categories:
I have the same question (0)
  • Verified answer
    WillPage Profile Picture
    2,335 Super User 2026 Season 1 on at
    It's hard to say based on the info you provided, but I think what you've missed is the response to the webhook subscription.
     
    When you send the initial request to subscribe to the webhook, you supply the endpoint on your side, which is your Flow HTTP trigger URL, and also lifecycleNotificationUrl, which can be the same URL if you want, or different.
     
    The service will then send a request to your lifecycleNotificationUrl with some text in a URL query parameter called validationToken, which you must send back in the response for the subscription to be activated.
     
    Personally, I use the same flow to handle the this process but you could have two flows, one for subscribing and reauthorising the webhook, and one to actually process the incoming webhooks, but I put it all in the same flow and use a condition at the top to decide if it's an authorisation request or an actual webhook payload.

    In the screen shot below, the condition is evaluating whether the validationToken is not null and, in which case this is a subscription response, then if so, send the validation token back to the caller and exit the flow.

    If you don't do this step the first time you subscribe to the webhook and each subsequent reauthorization, then the webhook will not be activated.
  • CU24062200-0 Profile Picture
    21 on at
    "WillPage-san,
    Thank you for your guidance. I realized that the response containing the validationToken was missing on the endpoint side.
    I've added the validationToken response to the endpoint's flow processing. The process completes successfully when receiving from the webhook registration flow.
    However, in the webhook registration process flow itself, the URL validation still fails on the endpoint side.

    If you have any other observations or reference materials to share, I would greatly appreciate it."
  • WillPage Profile Picture
    2,335 Super User 2026 Season 1 on at
    What is the input of the last SharePoint HTTP action in the second screen shot?
  • CU24062200-0 Profile Picture
    21 on at
    WillPage-san,
    the input of the last SharePoint HTTP action in the second screen shot shown below.
     
    HTTP PUT Request: Create a new subscription by making a PUT request with the following payload and uri:
     
    uri:uri:_api/web/lists('@{variables('libraryId')}')/subscriptions
     
    payload
    {
      "resource": "List ID",
      "notificationUrl": "HTTP URL generated on the endpoint side",
      "expirationDateTime": "2025-07-31T23:59:59Z",
      "clientState": "Optional"
    }

    I am trying to set up a webhook subscription with this SharePoint HTTP action.
  • WillPage Profile Picture
    2,335 Super User 2026 Season 1 on at
    @CU24062200-0 the resource should be the URL for the list. For example https://mycompany.sharepoint.com/sites/mysite/lists/mylist

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 959

#2
Valantis Profile Picture

Valantis 872

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard