web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Custom QnA Maker Conne...
Power Apps
Answered

Custom QnA Maker Connector String - JSON?

(0) ShareShare
ReportReport
Posted on by 8

I have created a customer connector for QNA Maker that I have working fine in a Flow. I wanted to add additional commands that aren't built into the default QNA Maker connector. I have not had any luck with it inside a PowerApp though. I have been trying to nail this done the past few days, in between taking breaks from it, but I cannot narrow it down or find a solution.

 

CreatePairConnector.png

 

FlowResponse.png

    

 

 

The closest I have come across to my situation is the following:

https://powerusers.microsoft.com/t5/General-Discussion/CUSTOM-CONNECTOR-Help-with-JSON-Request-or-Response/td-p/169101

 

For now I am using static values to test because I am just trying to get the connection string down.

 

I’ve tried collecting the values in a separate button and then passing that value to the ADD parameter. It complains about the value being a Table and not a Record.

 

qnalistCompile.png

 

I’ve tried directly adding the values into the ADD action and it looks for a qnalist column then, theirs is where I tried creating it with the compile button I setup. I know QNAList is the array value, but not sure how it's suppsed to be used in this function.

 

qnalistMissing.png

 

I've tried adding the values as a table similar to the article I found, but no luck either.

 

TableError.png

 

I've also tried many other iterations. I know it’s a formatting issue, I just can’t narrow it down. Help would be greatly appreciated.

Categories:
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Chris_C,

    Could you please share a bit more about the parameter type you specified for the add parameter within your custom connector?

    Based on the screenshot that you provided, I think there is something wrong with the formula you provided for the add parameter. The add parameter is required to provide a record value, but you provide a Table value.

    In addition, within the add parameter, you should also provide a value for qnaList property.

    I have made a test on my side, please modify your formula as below:

    QnAFlow.CreatePair(
     {
     'Content-Type': 'application/json',
     add: {
     qnaList: Table(
    {
    id: 0,
    answer: "At the time of running this test, it is 12:24 pm CST.",
    questions: ["What time is it?", "Do you have the time?"]
    }
    ) } } )

    Or

    Set the OnSelect property of the "Collect" button to following:

    ClearCollect(
    Collection1,
    Table({id:0, answer: "At the time of running this test, it is 12:24 pm CST.", questions: ["What time is it?","Do you have the time?"]})
    )

    Modify your formula as below:

    QnAFlow.CreatePair(
     {
     'Content-Type': 'application/json',
     add: {
     qnaList: Collection1
     }
     }
    )

    Please take a try with above solution, then check if your issue is solved.

     

    Best regards,

    Kris

  • Chris_C Profile Picture
    8 on at

    @v-xida-msft Thank you, that worked perfectly. I actually grabbed the JSON from the QNA Maker API page.

     

    https://westus.dev.cognitive.microsoft.com/docs/services/5a93fcf85b4ccd136866eb37/operations/5ac266295b4ccd1554da7600

     

    {
     "add": {
     "qnaList": [
     {
     "id": 0,
     "answer": "You can change the default message if you use the QnAMakerDialog. See this for details: https://docs.botframework.com/en-us/azure-bot-service/templates/qnamaker/#navtitle",
     "source": "Custom Editorial",
     "questions": [
     "How can I change the default message from QnA Maker?"
     ],
     "metadata": []
     },
     {
     "id": 0,
     "answer": "You can use our REST apis to manage your KB. See here for details: https://westus.dev.cognitive.microsoft.com/docs/services/58994a073d9e04097c7ba6fe/operations/58994a073d9e041ad42d9baa",
     "source": "Custom Editorial",
     "questions": [
     "How do I programmatically update my KB?"
     ],
     "metadata": [
     {
     "name": "category",
     "value": "api"
     }
     ]
     }
     ],
     "urls": [
     "https://docs.microsoft.com/en-us/azure/cognitive-services/Emotion/FAQ"
     ],
     "files": [
     {
     "fileName": "SurfaceManual.pdf",
     "fileUri": "https://download.microsoft.com/download/2/9/B/29B20383-302C-4517-A006-B0186F04BE28/surface-pro-4-user-guide-EN.pdf"
     }
     ]
     },
     "delete": {
     "ids": [
     4,
     13,
     35
     ],
     "sources": [
     "Custom Editorial"
     ]
     },
     "update": {
     "name": "QnA Maker + Emotion API FAQ Bot",
     "qnaList": [
     {
     "id": 30,
     "answer": "Yes, you can use our REST APIs to manage a KB. Please check our documentation for details.",
     "source": "Custom Q&A",
     "questions": {
     "add": [
     "can I programmatically manage a KB?"
     ],
     "delete": [
     "How do I programmatically update my KB?"
     ]
     },
     "metadata": {
     "delete": [
     {
     "name": "category",
     "value": "api"
     }
     ],
     "add": [
     {
     "name": "category",
     "value": "programmatic"
     }
     ]
     }
     }
     ],
     "urls": [
     "https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq"
     ]
     }
    }

    I only kept the ADD portion since I was trying to make a seperate connector action speciffically for it.

     

    Thank you much!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard