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 / Custom API WebHook Tri...
Power Automate
Answered

Custom API WebHook Trigger - dynamic WebHook response schema

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello!

 

I have created my Custom API Trigger which uses WebHooks. I have added "x-ms-dynamic-schema" to one parameter in my Trigger which allows me to dynamically select options provided by my api.

My subscribe endpoint in swagger looks like this:

 

"/api/external/WebHook/Subscribe": {
 "x-ms-notification-content": {
 "description": "Details for Webhook",
 "schema": {
 "type": "object",
 "properties": {
 "FormSubmittedData": {
 "type": "string"
 },
 "User": {
 "type": "object",
 "properties": {
 "UserName": {
 "type": "string"
 },
 "UserEmail": {
 "type": "string"
 }
 }
 },
 "SubmitDate": {
 "type": "string"
 },
 "DisplayDataUrl": {
 "type": "string"
 },
 "FormTitle": {
 "type": "string"
 }
 }
 }
 },
 "post": {
 "tags": [
 "WebHook"
 ],
 "summary": "When form is submitted",
 "operationId": "webhook-trigger",
 "consumes": [
 "application/json"
 ],
 "produces": [
 "application/json"
 ],
 "responses": {
 "201": {
 "description": "Created"
 }
 },
 "parameters": [
 {
 "name": "Request body of webhook",
 "in": "body",
 "description": "This is the request body of the Webhook",
 "schema": {
 "type": "object",
 "properties": {
 "TriggerUrl": {
 "type": "string",
 "x-ms-visibility": "internal",
 "x-ms-notification-url": true
 },
 "FormUid": {
 "type": "string",
 "x-ms-summary": "Select form",
 "x-ms-dynamic-values": {
 "operationId": "GetFormSchemas",
 "parameters": {},
 "value-collection": "values",
 "value-path": "Uid",
 "value-title": "Title"
 }
 }
 }
 }
 }
 ],
 "x-ms-trigger": "single"
 }
 }

 

 

So here comes my question, can I make "schema" property of "x-ms-notification-content" dynamic? I would like to use selected FormUid to get webhook response schema and use it in "x-ms-notification-content" property as schema.

 

To be honest i want it to work like Typeform trigger does, first you select form which triggers flow and then you can use all field of this form as dynamic values in next action or trigger.

Is it posibble?

 

I can provide more details if needed

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Bump

  • v-micsh-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    Have you checked the article below?

    Customize your Swagger definition for Microsoft Flow

    Would "x-ms-dynamic-schema " help here?

    For more details, please check the article above.

    Regards

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi, thanks for your response.

     

    Yes Itried it like this:

     "x-ms-notification-content": {
     "description": "Details for Webhook",
     "x-ms-dynamic-schema": {
     "operationId": "GetSchema",
     "value-path": "schema"
     }
     }

    And like this:

    "x-ms-notification-content": {
     "description": "Details for Webhook",
     "schema": {
     "x-ms-dynamic-schema": {
     "operationId": "GetSchema",
     "value-path": "schema"
     }
     }
     }

    In both cases Flow didn't send any request to GetSchema endpoint.

    In my opinion both examples are wrong because docuemtntation says "This is a hint to the flow designer that the schema for this parameter (or response) is dynamic in nature.".

    So maybe it should be included in response/parameters attributes? But i dont' really know where should I put this.

    Regards

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello

     

    I managed to solve my problem by myself. Also i have found a strange bug which occurrs in Typeform trigger too.

    I have created two forms in Typeform adn after selecting both of them in trigger dropdown all field from both forms appeared in dynamic content in my action.

    flow_bug.png

     

    Seems like all Json schemas are morged/mixed after fetching from endpoint. I tried to fix that in my trigger but didn't manage to do it so far.

    If you want more feedback about flow or more detailed information about this problem just contact me or reply here.

     

    Regards

  • Sunay Profile Picture
    Microsoft Employee on at

    Hi @Anonymous -

     

    I am working on posting a tutorial to help with this issue. I will update the thread as soon as the tutorial is live.

     

    Thanks,

    Sunay

  • Sunay Profile Picture
    Microsoft Employee on at

    Hello @Anonymous - The docs have been updated here : https://flow.microsoft.com/en-us/documentation/customapi-how-to-swagger/

    The doc links to a swagger that actually works so you can test the functionality in real time.

     

    Thanks,

    Sunay

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

     

    Could you please help me with how you were able to create a custom API webhook trigger for flow? 

     

    Thanks

  • pbijvani Profile Picture
    16 on at

    I am also facing similar issue. Can not make x-ms-dynamic-schema work with trigger. FLOW is not calling my schema endpoint.

    can you share your swagger here? 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi, 

    Hopefully someone can help with this related question.

    I can succesfully create and delete the webhook request.

    However i dont seem to be able to find where to find how to reference the Microsoft Flow "system" to recieve the api feed which is one of the parameters when creating the webhook.

     

    Any help greatly appreciated.

  • wuweng Profile Picture
    Microsoft Employee on at

    This is a sample custom connector with Webhook trigger. Hope it can help.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 425

#2
11manish Profile Picture

11manish 323 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard