cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate II
Advocate II

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
Advocate II
Advocate II

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
}
]
}
}
}
}
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

View solution in original post

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,626)