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