I'm trying for days to build an operation mixing dynamic fields and schema.
The operation has 2 static fields: subject and description. Then it has a field called template, this field is tied with a dynamic value tag and it's working fine, I'm able to fetch the values from my API.
Now it's the hard part when the template is selected I would like to add dynamic fields to the operation. The API is ready, but the request never goes to the API.
Does anyone have any example of how to do this? The official Power Automate documentation is really poor in this regard. This is what I have today:
This operation is used to fetch the dynamic values for the field template.
"/v1/integration/power-automate/templates/summaries": {
"get": {
"x-ms-visibility": "internal",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"required": [
"summaries"
],
"properties": {
"summaries": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"name"
],
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
}
},
"default": {
"description": "Operation Failed."
}
},
"summary": "List the template summaries",
"description": "List the current user template summaries.",
"operationId": "templateSummary",
"parameters": []
}
}
This is my the actual part that I'm having problems:
"/v1/integration/power-automate/signature-requests": {
"post": {
"consumes": [
"application/json"
],
"tags": [
"Actions"
],
"responses": {
"200": {
"description": "OK"
},
"default": {
"description": "Operation Failed."
}
},
"summary": "Request Signature Using a Template",
"description": "Send a request signature using a template.",
"operationId": "signatureRequest",
"parameters": [
{
"in": "body",
"name": "request",
"description": "The signature request entity.",
"schema": {
"type": "object",
"required": [
"subject",
"description",
"template"
],
"properties": {
"subject": {
"type": "string",
"description": "Subject line of the email notification."
},
"description": {
"type": "string",
"description": "Message included in the email notification."
},
"template": {
"type": "string",
"description": "Use this option to select the template to be used for the signature request.",
"x-ms-dynamic-values": {
"operationId": "templateSummary",
"value-path": "id",
"value-title": "name",
"value-collection": "summaries",
"parameters": {}
}
}
},
"x-ms-dynamic-schema": {
"operationId": "signatureRequestSchema",
"parameters": {
"id": {
"parameter": "template"
}
},
"value-path": "fields"
},
"x-ms-dynamic-properties": {
"operationId": "signatureRequestSchema",
"parameters": {
"id": {
"parameterReference": "request/template"
}
},
"itemValuePath": "fields"
}
}
}
]
}
}
This is the field definition:
"field": {
"type": "object",
"properties": {
"key": {
"type": "string",
"x-ms-summary": "key"
},
"name": {
"type": "string",
"x-ms-summary": "name"
}
}
}