├── Approvals-Extended.png ├── README.md └── Approvals-Extended.swagger.json /Approvals-Extended.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Laskewitz/Approvals/HEAD/Approvals-Extended.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Approvals Connector 2 | This approvals connector has been used in a video I create it. Watch it [here](https://www.youtube.com/watch?v=It3rOlzu94Q) to get instructions how to use it! 3 | -------------------------------------------------------------------------------- /Approvals-Extended.swagger.json: -------------------------------------------------------------------------------- 1 | { 2 | "swagger": "2.0", 3 | "info": { 4 | "version": "1.0.0", 5 | "title": "Power Automate - Approval Actions", 6 | "description": "Cancel, reassign, list & respond to approvals" 7 | }, 8 | "host": "api.flow.microsoft.com", 9 | "basePath": "/", 10 | "schemes": [ 11 | "https" 12 | ], 13 | "consumes": [], 14 | "produces": [ 15 | "application/json" 16 | ], 17 | "paths": { 18 | "/pplatform.onmicrosoft.com/oauth2/token": {}, 19 | "/providers/Microsoft.ProcessSimple/environments/72e87f56-e215-43d4-8883-5cf7ff5550f5/approvalViews": {}, 20 | "/providers/Microsoft.ProcessSimple/environments/72e87f56-e215-43d4-8883-5cf7ff5550f5/approvals/0b659654-429f-4ea4-89bd-91674d374059/cancel": {}, 21 | "/providers/Microsoft.ProcessSimple/environments/72e87f56-e215-43d4-8883-5cf7ff5550f5/approvals/0b659654-429f-4ea4-89bd-91674d374059/reassign": {}, 22 | "/providers/Microsoft.ProcessSimple/environments/72e87f56-e215-43d4-8883-5cf7ff5550f5/approvals/0b659654-429f-4ea4-89bd-91674d374059/approvalResponses": {}, 23 | "/providers/Microsoft.ProcessSimple/environments/{environment_name}/approvals/{approval_name}/approvalResponses": { 24 | "post": { 25 | "summary": "Approve or Reject Approval", 26 | "description": "Approve or Reject Approval", 27 | "operationId": "SetApprovalResponse", 28 | "parameters": [ 29 | { 30 | "name": "environment_name", 31 | "in": "path", 32 | "required": true, 33 | "type": "string", 34 | "default": "72e87f56-e215-43d4-8883-5cf7ff5550f5" 35 | }, 36 | { 37 | "name": "approval_name", 38 | "in": "path", 39 | "required": true, 40 | "type": "string" 41 | }, 42 | { 43 | "name": "api-version", 44 | "in": "query", 45 | "required": false, 46 | "type": "string", 47 | "default": "2016-11-01" 48 | }, 49 | { 50 | "name": "body", 51 | "in": "body", 52 | "required": true, 53 | "schema": { 54 | "type": "object", 55 | "properties": { 56 | "properties": { 57 | "type": "object", 58 | "properties": { 59 | "response": { 60 | "type": "string", 61 | "description": "response" 62 | }, 63 | "comments": { 64 | "type": "string", 65 | "description": "comments" 66 | } 67 | }, 68 | "description": "properties" 69 | } 70 | } 71 | } 72 | } 73 | ], 74 | "responses": { 75 | "default": { 76 | "description": "default", 77 | "schema": { 78 | "type": "object", 79 | "properties": { 80 | "name": { 81 | "type": "string", 82 | "description": "name" 83 | }, 84 | "id": { 85 | "type": "string", 86 | "description": "id" 87 | }, 88 | "type": { 89 | "type": "string", 90 | "description": "type" 91 | }, 92 | "properties": { 93 | "type": "object", 94 | "properties": { 95 | "stage": { 96 | "type": "string", 97 | "description": "stage" 98 | }, 99 | "status": { 100 | "type": "string", 101 | "description": "status" 102 | }, 103 | "creationDate": { 104 | "type": "string", 105 | "description": "creationDate" 106 | }, 107 | "owner": { 108 | "type": "object", 109 | "properties": { 110 | "id": { 111 | "type": "string", 112 | "description": "id" 113 | }, 114 | "type": { 115 | "type": "string", 116 | "description": "type" 117 | }, 118 | "tenantId": { 119 | "type": "string", 120 | "description": "tenantId" 121 | } 122 | }, 123 | "description": "owner" 124 | }, 125 | "response": { 126 | "type": "string", 127 | "description": "response" 128 | } 129 | }, 130 | "description": "properties" 131 | } 132 | } 133 | } 134 | } 135 | } 136 | } 137 | }, 138 | "/providers/Microsoft.ProcessSimple/environments/{environment_name}/approvals/{approval_name}/cancel": { 139 | "post": { 140 | "summary": "Cancel an Approval", 141 | "description": "Cancel an Approval", 142 | "operationId": "CancelApproval", 143 | "parameters": [ 144 | { 145 | "name": "environment_name", 146 | "in": "path", 147 | "required": true, 148 | "type": "string", 149 | "default": "72e87f56-e215-43d4-8883-5cf7ff5550f5", 150 | "x-ms-summary": "Environment" 151 | }, 152 | { 153 | "name": "approval_name", 154 | "in": "path", 155 | "required": true, 156 | "type": "string" 157 | }, 158 | { 159 | "name": "api-version", 160 | "in": "query", 161 | "required": false, 162 | "type": "string", 163 | "default": "2016-11-01" 164 | } 165 | ], 166 | "responses": { 167 | "default": { 168 | "description": "default", 169 | "schema": { 170 | "type": "object", 171 | "properties": { 172 | "name": { 173 | "type": "string", 174 | "description": "name" 175 | }, 176 | "id": { 177 | "type": "string", 178 | "description": "id" 179 | }, 180 | "type": { 181 | "type": "string", 182 | "description": "type" 183 | }, 184 | "properties": { 185 | "type": "object", 186 | "properties": { 187 | "title": { 188 | "type": "string", 189 | "description": "title" 190 | }, 191 | "details": { 192 | "type": "string", 193 | "description": "details" 194 | }, 195 | "result": { 196 | "type": "string", 197 | "description": "result" 198 | }, 199 | "stage": { 200 | "type": "string", 201 | "description": "stage" 202 | }, 203 | "status": { 204 | "type": "string", 205 | "description": "status" 206 | }, 207 | "creationDate": { 208 | "type": "string", 209 | "description": "creationDate" 210 | }, 211 | "completionDate": { 212 | "type": "string", 213 | "description": "completionDate" 214 | }, 215 | "owner": { 216 | "type": "object", 217 | "properties": { 218 | "id": { 219 | "type": "string", 220 | "description": "id" 221 | }, 222 | "type": { 223 | "type": "string", 224 | "description": "type" 225 | }, 226 | "tenantId": { 227 | "type": "string", 228 | "description": "tenantId" 229 | } 230 | }, 231 | "description": "owner" 232 | }, 233 | "response": { 234 | "type": "string", 235 | "description": "response" 236 | } 237 | }, 238 | "description": "properties" 239 | } 240 | } 241 | } 242 | } 243 | } 244 | } 245 | }, 246 | "/providers/Microsoft.ProcessSimple/environments/{environment}/approvalViews": { 247 | "get": { 248 | "responses": { 249 | "default": { 250 | "description": "default", 251 | "schema": { 252 | "type": "object", 253 | "properties": { 254 | "value": { 255 | "type": "array", 256 | "items": { 257 | "type": "object", 258 | "properties": { 259 | "name": { 260 | "type": "string", 261 | "description": "name" 262 | }, 263 | "id": { 264 | "type": "string", 265 | "description": "id" 266 | }, 267 | "type": { 268 | "type": "string", 269 | "description": "type" 270 | }, 271 | "properties": { 272 | "type": "object", 273 | "properties": { 274 | "type": { 275 | "type": "string", 276 | "description": "type" 277 | }, 278 | "isActive": { 279 | "type": "boolean", 280 | "description": "isActive" 281 | }, 282 | "userRoles": { 283 | "type": "array", 284 | "items": { 285 | "type": "string" 286 | }, 287 | "description": "userRoles" 288 | }, 289 | "owner": { 290 | "type": "object", 291 | "properties": { 292 | "id": { 293 | "type": "string", 294 | "description": "id" 295 | }, 296 | "type": { 297 | "type": "string", 298 | "description": "type" 299 | }, 300 | "tenantId": { 301 | "type": "string", 302 | "description": "tenantId" 303 | } 304 | }, 305 | "description": "owner" 306 | }, 307 | "creator": { 308 | "type": "object", 309 | "properties": { 310 | "id": { 311 | "type": "string", 312 | "description": "id" 313 | }, 314 | "type": { 315 | "type": "string", 316 | "description": "type" 317 | }, 318 | "tenantId": { 319 | "type": "string", 320 | "description": "tenantId" 321 | } 322 | }, 323 | "description": "creator" 324 | }, 325 | "title": { 326 | "type": "string", 327 | "description": "title" 328 | }, 329 | "result": { 330 | "type": "string", 331 | "description": "result" 332 | }, 333 | "allowCancel": { 334 | "type": "boolean", 335 | "description": "allowCancel" 336 | }, 337 | "creationDate": { 338 | "type": "string", 339 | "description": "creationDate" 340 | }, 341 | "dueDate": { 342 | "type": "string", 343 | "description": "dueDate" 344 | }, 345 | "expirationDate": { 346 | "type": "string", 347 | "description": "expirationDate" 348 | }, 349 | "userRequest": { 350 | "type": "object", 351 | "properties": { 352 | "stage": { 353 | "type": "string", 354 | "description": "stage" 355 | }, 356 | "creationDate": { 357 | "type": "string", 358 | "description": "creationDate" 359 | }, 360 | "dueDate": { 361 | "type": "string", 362 | "description": "dueDate" 363 | }, 364 | "expirationDate": { 365 | "type": "string", 366 | "description": "expirationDate" 367 | }, 368 | "assignedTo": { 369 | "type": "object", 370 | "properties": { 371 | "id": { 372 | "type": "string", 373 | "description": "id" 374 | }, 375 | "type": { 376 | "type": "string", 377 | "description": "type" 378 | }, 379 | "tenantId": { 380 | "type": "string", 381 | "description": "tenantId" 382 | } 383 | }, 384 | "description": "assignedTo" 385 | }, 386 | "allowReassignment": { 387 | "type": "boolean", 388 | "description": "allowReassignment" 389 | }, 390 | "isReassigned": { 391 | "type": "boolean", 392 | "description": "isReassigned" 393 | }, 394 | "responseOptions": { 395 | "type": "array", 396 | "items": { 397 | "type": "string" 398 | }, 399 | "description": "responseOptions" 400 | } 401 | }, 402 | "description": "userRequest" 403 | }, 404 | "completionDate": { 405 | "type": "string", 406 | "description": "completionDate" 407 | }, 408 | "approvers": { 409 | "type": "array", 410 | "items": { 411 | "type": "string" 412 | }, 413 | "description": "approvers" 414 | }, 415 | "principals": { 416 | "type": "array", 417 | "items": { 418 | "type": "object", 419 | "properties": { 420 | "id": { 421 | "type": "string", 422 | "description": "id" 423 | }, 424 | "displayName": { 425 | "type": "string", 426 | "description": "displayName" 427 | }, 428 | "email": { 429 | "type": "string", 430 | "description": "email" 431 | }, 432 | "type": { 433 | "type": "string", 434 | "description": "type" 435 | }, 436 | "tenantId": { 437 | "type": "string", 438 | "description": "tenantId" 439 | }, 440 | "userPrincipalName": { 441 | "type": "string", 442 | "description": "userPrincipalName" 443 | }, 444 | "thumbnailPhoto": { 445 | "type": "string", 446 | "description": "thumbnailPhoto" 447 | } 448 | } 449 | }, 450 | "description": "principals" 451 | } 452 | }, 453 | "description": "properties" 454 | } 455 | } 456 | }, 457 | "description": "value" 458 | }, 459 | "nextLink": { 460 | "type": "string", 461 | "description": "nextLink" 462 | } 463 | } 464 | } 465 | } 466 | }, 467 | "summary": "List Approvals", 468 | "description": "List Approvals in an environment", 469 | "operationId": "GetApprovals", 470 | "parameters": [ 471 | { 472 | "name": "environment", 473 | "in": "path", 474 | "required": true, 475 | "type": "string", 476 | "default": "72e87f56-e215-43d4-8883-5cf7ff5550f5" 477 | }, 478 | { 479 | "name": "$top", 480 | "in": "query", 481 | "required": false, 482 | "type": "integer", 483 | "default": 50 484 | }, 485 | { 486 | "name": "$filter", 487 | "in": "query", 488 | "required": false, 489 | "type": "string", 490 | "default": "properties/userRole eq 'Owner' and properties/isActive eq 'true'" 491 | }, 492 | { 493 | "name": "api-version", 494 | "in": "query", 495 | "required": false, 496 | "type": "string", 497 | "default": "2016-11-01" 498 | } 499 | ] 500 | } 501 | }, 502 | "/providers/Microsoft.ProcessSimple/environments/{environment-name}/approvals/{approval-name}/approvalRequests": { 503 | "get": { 504 | "responses": { 505 | "default": { 506 | "description": "default", 507 | "schema": { 508 | "type": "array", 509 | "items": { 510 | "type": "object", 511 | "properties": { 512 | "name": { 513 | "type": "string", 514 | "description": "The name of the approval request", 515 | "title": "Approval Request Name" 516 | }, 517 | "id": { 518 | "type": "string", 519 | "description": "ID of the approval request", 520 | "title": "ID" 521 | }, 522 | "type": { 523 | "type": "string", 524 | "description": "The type of the approval request", 525 | "title": "Type-" 526 | }, 527 | "properties": { 528 | "type": "object", 529 | "properties": { 530 | "stage": { 531 | "type": "string", 532 | "description": "The stage of the approval request", 533 | "title": "Stage" 534 | }, 535 | "creationDate": { 536 | "type": "string", 537 | "description": "Creation date of the approval request", 538 | "title": "Creation Date" 539 | }, 540 | "dueDate": { 541 | "type": "string", 542 | "description": "Due date of the approval request", 543 | "title": "Due Date" 544 | }, 545 | "expirationDate": { 546 | "type": "string", 547 | "description": "Expiration date of the approval request", 548 | "title": "Expiration Date" 549 | }, 550 | "assignedTo": { 551 | "type": "object", 552 | "properties": { 553 | "id": { 554 | "type": "string", 555 | "description": "ID of the person where the approval has been assigned to", 556 | "title": "Assigned To ID" 557 | }, 558 | "type": { 559 | "type": "string", 560 | "description": "The type of the person where the approval is assigned to", 561 | "title": "Type" 562 | }, 563 | "tenantId": { 564 | "type": "string", 565 | "description": "Tenant ID of the person where the approval is assigned to", 566 | "title": "Assigned To Tenant ID" 567 | } 568 | }, 569 | "description": "assignedTo" 570 | }, 571 | "notificationFrequency": { 572 | "type": "integer", 573 | "format": "int32", 574 | "description": "The notification frequency of the approval request", 575 | "title": "Notification Frequency" 576 | }, 577 | "lastNotificationDate": { 578 | "type": "string", 579 | "description": "Last notification date of the approval request", 580 | "title": "Last Notification Date" 581 | }, 582 | "allowReassignment": { 583 | "type": "boolean", 584 | "description": "This property will tell you if reassignment possible or not with this approval request", 585 | "title": "Allow Reassignment", 586 | "enum": [ 587 | "", 588 | "true", 589 | "false" 590 | ] 591 | }, 592 | "isReassigned": { 593 | "type": "boolean", 594 | "description": "This property will tell you if the approval request has been reassigned or not", 595 | "title": "Is Reassigned", 596 | "enum": [ 597 | "", 598 | "true", 599 | "false" 600 | ] 601 | }, 602 | "responseOptions": { 603 | "type": "array", 604 | "items": { 605 | "type": "string" 606 | }, 607 | "description": "responseOptions" 608 | }, 609 | "responseOptionsType": { 610 | "type": "string", 611 | "description": "The type of the approval (for instance basic approve reject)", 612 | "title": "Response Options Type" 613 | } 614 | }, 615 | "description": "properties" 616 | } 617 | } 618 | } 619 | } 620 | } 621 | }, 622 | "summary": "Get Approval Requests", 623 | "operationId": "GetApprovalRequests", 624 | "parameters": [ 625 | { 626 | "name": "environment-name", 627 | "in": "path", 628 | "required": true, 629 | "type": "string", 630 | "x-ms-summary": "Environment", 631 | "description": "The name of the environment (default-GUID or GUID)" 632 | }, 633 | { 634 | "name": "approval-name", 635 | "in": "path", 636 | "required": true, 637 | "type": "string", 638 | "x-ms-summary": "Approval", 639 | "description": "The name of the approval (GUID)" 640 | }, 641 | { 642 | "name": "api-version", 643 | "in": "query", 644 | "required": false, 645 | "type": "string", 646 | "default": "2016-11-01", 647 | "description": "The API version" 648 | } 649 | ], 650 | "description": "Get approval requests that are attached to an attachment" 651 | } 652 | }, 653 | "/providers/Microsoft.ProcessSimple/environments/{environment-name}/approvals/{approval-name}/approvalRequests/{approvalrequest-name}/reassign": { 654 | "post": { 655 | "responses": { 656 | "default": { 657 | "description": "default", 658 | "schema": { 659 | "type": "array", 660 | "items": { 661 | "type": "object", 662 | "properties": { 663 | "name": { 664 | "type": "string", 665 | "description": "The name of the approval request that has been reassigned", 666 | "title": "Name" 667 | }, 668 | "id": { 669 | "type": "string", 670 | "description": "The ID of the approval request that has been reassigned", 671 | "title": "ID" 672 | }, 673 | "type": { 674 | "type": "string", 675 | "description": "The type of the reassigned approval", 676 | "title": "Type" 677 | }, 678 | "properties": { 679 | "type": "object", 680 | "properties": { 681 | "stage": { 682 | "type": "string", 683 | "description": "The stage of the reassigned approval", 684 | "title": "Stage" 685 | }, 686 | "creationDate": { 687 | "type": "string", 688 | "description": "The creation date of the approval that has been reassigned", 689 | "title": "Creation Date" 690 | }, 691 | "dueDate": { 692 | "type": "string", 693 | "description": "The due date of the approval that has been reassigned", 694 | "title": "Due Date" 695 | }, 696 | "expirationDate": { 697 | "type": "string", 698 | "description": "The expiration date of the approval that has been reassigned", 699 | "title": "Expiration Date" 700 | }, 701 | "assignedTo": { 702 | "type": "object", 703 | "properties": { 704 | "id": { 705 | "type": "string", 706 | "description": "id", 707 | "title": "Assigned To ID" 708 | }, 709 | "type": { 710 | "type": "string", 711 | "description": "The type of the person that the approval request has been assigned to", 712 | "title": "Assigned To Type" 713 | }, 714 | "tenantId": { 715 | "type": "string", 716 | "description": "The tenant ID of the person that the approval request has been assigned to", 717 | "title": "Assigned To Tenant ID" 718 | } 719 | }, 720 | "description": "assignedTo" 721 | }, 722 | "notificationFrequency": { 723 | "type": "integer", 724 | "format": "int32", 725 | "description": "The notification frequency of the reassigned approval", 726 | "title": "Notification Frequency" 727 | }, 728 | "lastNotificationDate": { 729 | "type": "string", 730 | "description": "Last notification date of the reassigned approval", 731 | "title": "Last Notification Date" 732 | }, 733 | "allowReassignment": { 734 | "type": "boolean", 735 | "description": "This shows the value of the allow reassignment option of the approval request that has been reassigned", 736 | "title": "Allow Reassignment", 737 | "enum": [ 738 | "", 739 | "true", 740 | "false" 741 | ] 742 | }, 743 | "isReassigned": { 744 | "type": "boolean", 745 | "description": "This property will tell you if the reassigned approval has been reassigned or not", 746 | "title": "Is Reassigned", 747 | "enum": [ 748 | "", 749 | "true", 750 | "false" 751 | ] 752 | }, 753 | "responseOptions": { 754 | "type": "array", 755 | "items": { 756 | "type": "string" 757 | }, 758 | "description": "responseOptions" 759 | }, 760 | "responseOptionsType": { 761 | "type": "string", 762 | "description": "The type of the reassigned approval (for instance basic approve reject)", 763 | "title": "Response Options Type" 764 | } 765 | }, 766 | "description": "properties" 767 | } 768 | } 769 | } 770 | } 771 | } 772 | }, 773 | "summary": "Reassign an Approval", 774 | "operationId": "ReassignApproval", 775 | "description": "This action will give you a way to reassign approvals", 776 | "parameters": [ 777 | { 778 | "name": "environment-name", 779 | "in": "path", 780 | "required": true, 781 | "type": "string", 782 | "x-ms-summary": "Environment", 783 | "description": "The name of the environment (default-GUID or GUID)" 784 | }, 785 | { 786 | "name": "approval-name", 787 | "in": "path", 788 | "required": true, 789 | "type": "string", 790 | "description": "The name of the approval (GUID)", 791 | "x-ms-summary": "Approval" 792 | }, 793 | { 794 | "name": "approvalrequest-name", 795 | "in": "path", 796 | "required": true, 797 | "type": "string", 798 | "x-ms-summary": "Approval request", 799 | "description": "The name of the approval request (GUID)" 800 | }, 801 | { 802 | "name": "api-version", 803 | "in": "query", 804 | "required": false, 805 | "type": "string", 806 | "default": "2016-11-01", 807 | "x-ms-summary": "API version" 808 | }, 809 | { 810 | "name": "body", 811 | "in": "body", 812 | "required": false, 813 | "schema": { 814 | "type": "object", 815 | "properties": { 816 | "AssignedTo": { 817 | "type": "string", 818 | "description": "AssignedTo" 819 | } 820 | } 821 | } 822 | } 823 | ] 824 | } 825 | } 826 | }, 827 | "definitions": {}, 828 | "parameters": {}, 829 | "responses": {}, 830 | "securityDefinitions": { 831 | "oauth2_auth": { 832 | "type": "oauth2", 833 | "flow": "accessCode", 834 | "authorizationUrl": "https://login.windows.net/common/oauth2/authorize", 835 | "tokenUrl": "https://login.windows.net/common/oauth2/authorize", 836 | "scopes": {} 837 | } 838 | }, 839 | "security": [ 840 | { 841 | "oauth2_auth": [] 842 | } 843 | ], 844 | "tags": [] 845 | } --------------------------------------------------------------------------------