cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ZachRoberts
Resolver I
Resolver I

Envoy Custom Connector

 

Hello,

 

I have created a custom connector in PowerApps to retireve data from Envoy. In my powerapp I have a button that runs UpdateContext({Visitors: Envoyapi.getEnvoy()}) - if I am watching requests from the network tab I see the invoke and response from the API with the required data. However when I try to connect this to a gallery to use the values there I get the following error message:

 

"The property expects Table values, but this rule produces incompatible text values."

 

Also when I look at my Visitors variable I am not seeing any values being populated. I am not sure what I am missing any help would be appreciated. 


Thank you!

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello! 

 

Thanks for the reply, did however figure out what my issue was. It was how the API was sending back the results.  One of the objects returned an object which contained an array creating a table within a table possibly PowerApps did not like that because after removing that object i was able to pull in the data successfully. 

 

I had to remove the 'Custom Fields' object/array from my schema posted above. 

 

 

 

Thanks,

Zach

View solution in original post

5 REPLIES 5
ZachRoberts
Resolver I
Resolver I

OpenAPI generated used to create the custom connector is below.

 

{
"swagger": "2.0",
"info": {
"description": "Envoy API",
"version": "1.0.0",
"title": "Envoy API",
"contact": {
"name": "API Team",
"email": "apiteam@envoy.com"
},
"license": {
"name": "Apache 2.0",
}
},
"host": "app.envoy.com",
"basePath": "/",
"schemes": [
"https"
],
"paths": {
"/api/entries.json": {
"get": {
"summary": "find api entries.json",
"operationId": "getEnvoy",
"produces": [
"application/json; charset=utf-8"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"description": "",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "object",
"required": [
"id",
"signed_in_time_utc",
"signed_in_time_local",
"signed_out_time_utc",
"signed_out_time_local",
"here_to_see",
"company_name_",
"your_full_name",
"purpose_of_visit",
"your_phone_number",
"your_email_address",
"nda_pdf_url",
"photo_url",
"private_notes",
"id_checked",
"Custom Fields",
"full_name",
"is_delivery",
"additional_guests"
],
"properties": {
"id": {
"type": "number"
},
"signed_in_time_utc": {
"type": "string",
"minLength": 1
},
"signed_in_time_local": {
"type": "string",
"minLength": 1
},
"signed_out_time_utc": {
"type": "string"
},
"signed_out_time_local": {
"type": "string"
},
"here_to_see": {
"type": "string",
"minLength": 1
},
"company_name_": {
"type": "string",
"minLength": 1
},
"your_full_name": {
"type": "string",
"minLength": 1
},
"purpose_of_visit": {
"type": "string",
"minLength": 1
},
"your_phone_number": {
"type": "string",
"minLength": 1
},
"your_email_address": {
"type": "string",
"minLength": 1
},
"nda_pdf_url": {
"type": "string"
},
"photo_url": {
"type": "string",
"minLength": 1
},
"private_notes": {
"type": "string"
},
"id_checked": {
"type": "string"
},
"Custom Fields": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"type":"object",
"required": [
"Here to see"
],
"properties": {
"Here to see": {
"type": "string",
"minLength": 1
}
}
}
},
"full_name": {
"type": "string",
"minLength": 1
},
"is_delivery": {
"type": "boolean"
},
"additional_guests": {
"type": "number"
}
}
}
}
}
},
"parameters": [
{
"name": "api_key",
"in": "query",
"type": "string",
"description": "",
"required": true
},
{
"name": "from_date",
"in": "query",
"type": "string",
"description": "",
"required": false
},
{
"name": "to_date",
"in": "query",
"type": "string",
"description": "",
"required": false
}
]
}
}
}
}
v-xida-msft
Community Support
Community Support

Hi @ZachRoberts,

Which authentication type do you use within your OpenAPI definition file?

Could you please share a bit more about the response from your RESTful API?

The error message seems to tell that the Items property of the Gallery is required to provided a table value, but the Envoyapi.getEnvoy() formula returns a text value (or empty).

Please check if the getEnvoy function within your RESTful API returns a proper array value. You could consider take a try to test your RESTful API within Postman, then check if the response is required data that you want.

In additon, please also take a try to define a securityDefinitions part within your OpenAPI definition file, then try it again, check if the issue is solved.

 

More details about defining a securityDefinitions part within your OpenAPI definition file, please check the following article:

https://swagger.io/docs/specification/2-0/authentication/

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello! 

 

Thanks for the reply, did however figure out what my issue was. It was how the API was sending back the results.  One of the objects returned an object which contained an array creating a table within a table possibly PowerApps did not like that because after removing that object i was able to pull in the data successfully. 

 

I had to remove the 'Custom Fields' object/array from my schema posted above. 

 

 

 

Thanks,

Zach

Hi Zach

 

Can you please share the final swagger file used when removed this object from your schema? I'm having a similar issue 

Hello, 

 

See below.

 

{
  "swagger": "2.0",
  "info": {
    "description": "Envoy API",
    "version": "1.0.0",
    "title": "Envoy API",
    "termsOfService": "https://app.envoy.com/terms-of-service",
    "contact": {
      "name": "API Team",
      "url": "https://app.envoy.com/contact",
      "email": "apiteam@envoy.com"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    }
  },
  "host": "app.envoy.com",
  "basePath": "/",
  "schemes": [
    "https"
  ],
  "paths": {
    "/api/entries.json": {
      "get": {
        "summary": "find api entries.json",
        "operationId": "getEnvoy",
        "produces": [
          "application/json; charset=utf-8"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "description": "",
              "minItems": 1,
              "uniqueItems": true,
              "items": {
                "type": "object",
                "required": [
                  "id",
                  "signed_in_time_utc",
                  "signed_in_time_local",
                  "signed_out_time_utc",
                  "signed_out_time_local",
                  "here_to_see",
                  "company_name_",
                  "your_full_name",
                  "purpose_of_visit",
                  "your_phone_number",
                  "your_email_address",
                  "nda_pdf_url",
                  "photo_url",
                  "private_notes",
                  "id_checked",
                  "Custom Fields",
                  "full_name",
                  "is_delivery",
                  "additional_guests"
                ],
                "properties": {
                  "id": {
                    "type": "number"
                  },
                  "signed_in_time_utc": {
                    "type": "string",
                    "minLength": 1
                  },
                  "signed_in_time_local": {
                    "type": "string",
                    "minLength": 1
                  },
                  "signed_out_time_utc": {
                    "type": "string"
                  },
                  "signed_out_time_local": {
                    "type": "string"
                  },
                  "here_to_see": {
                    "type": "string",
                    "minLength": 1
                  },
                  "company_name_": {
                    "type": "string",
                    "minLength": 1
                  },
                  "your_full_name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "purpose_of_visit": {
                    "type": "string",
                    "minLength": 1
                  },
                  "your_phone_number": {
                    "type": "string",
                    "minLength": 1
                  },
                  "your_email_address": {
                    "type": "string",
                    "minLength": 1
                  },
                  "nda_pdf_url": {
                    "type": "string"
                  },
                  "photo_url": {
                    "type": "string",
                    "minLength": 1
                  },
                  "private_notes": {
                    "type": "string"
                  },
                  "id_checked": {
                    "type": "string"
                  },
                  "full_name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "is_delivery": {
                    "type": "boolean"
                  },
                  "additional_guests": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "api_key",
            "in": "query",
            "type": "string",
            "description": "",
            "required": true
          },
          {
            "name": "from_date",
            "in": "query",
            "type": "string",
            "description": "",
            "required": false
          },
          {
            "name": "to_date",
            "in": "query",
            "type": "string",
            "description": "",
            "required": false
          }
        ]
      }
    }
  }
}

 

 

Thanks,

Zach

 

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (5,923)