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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Use Bing news in power...
Power Apps
Answered

Use Bing news in power app

(0) ShareShare
ReportReport
Posted on by 16

Hello All,

I have added the Bing Serch connector in PowerApps and trying to use it(BingSearch.GetNews("Corona", {count: 50})). But having a below error. Please help me out with this.

BingSearch.GetNews failed: { "message": "The
message body is not a valid JSON. Unexpected
character encountered while parsing value:
\u001b. Path '', line 0, position 0.\r\n at
Newtonsoft.Json.JsonTextReader.ParseValue()\r\n
at Newtonsoft.Json.Linq.JObject.Load(JsonReader
reader, JsonLoadSettings settings)\r\n at
Microsoft.WindowsAzure.ApiManagement.Proxy.G
stream, Encoding encoding, JsonSerializerSettings
settings)\r\n at
Microsoft.WindowsAzure.ApiManagement.Proxy.G
(Boolean preserveContent)"}

 

Thank you in advance.

Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @BhavikaVala :

    I did the same test and encountered the problem you mentioned.

    Firstly, I guess the reason is that PowerApps seems can not recognize the message body of BingSearch.GetNews ().

    So you could not directly use PowerApps to get the news list.

    message body(fieldname)

     

    [
     {
     "name": "XXXX",
     "url": "https://www.reuters.com/article/XXXXXXXX",
     "image": {
     "thumbnail": {
     "contentUrl": "https://www.bing.com/th?id=ON.DB0E833XXXXXX",
     "width": 700,
     "height": 490
     }
     },
    ……]

     

    PowerApps required format(fieldname)

     

    [
     {
     ‘name’: "XXXX",
     ‘url’: "https://www.reuters.com/article/XXXXXXXX",
     ‘image’: {
     ‘thumbnail’: {
     ‘contentUrl’: "https://www.bing.com/th?id=ON.DB0E833XXXXXX",
     ‘width’: 700,
     ‘height’: 490
     }
     },
    ……]

     

    Secondly, the good news is that PowerApps can recognize the data after Flow analysis.

    Here is my solution:

    1\Create a new flow('PowerApp->Listnewsbyquery')

    Action-Power Automate-Create a new flow

     

    Response Body JSON Schema:

     

    {
     "type": "array",
     "items": {
     "type": "object",
     "properties": {
     "name": {
     "type": "string"
     },
     "url": {
     "type": "string"
     },
     "image": {
     "type": "object",
     "properties": {
     "thumbnail": {
     "type": "object",
     "properties": {
     "contentUrl": {
     "type": "string"
     },
     "width": {
     "type": "integer"
     },
     "height": {
     "type": "integer"
     }
     }
     }
     }
     },
     "description": {
     "type": "string"
     },
     "provider": {
     "type": "array",
     "items": {
     "type": "object",
     "properties": {
     "_type": {
     "type": "string"
     },
     "name": {
     "type": "string"
     },
     "image": {
     "type": "object",
     "properties": {
     "thumbnail": {
     "type": "object",
     "properties": {
     "contentUrl": {
     "type": "string"
     }
     }
     }
     }
     }
     },
     "required": [
     "_type",
     "name",
     "image"
     ]
     }
     },
     "datePublished": {
     "type": "string"
     },
     "category": {
     "type": "string"
     },
     "about": {
     "type": "array",
     "items": {
     "type": "object",
     "properties": {
     "readLink": {
     "type": "string"
     },
     "name": {
     "type": "string"
     }
     },
     "required": [
     "readLink",
     "name"
     ]
     }
     }
     },
     "required": [
     "name",
     "url",
     "description",
     "provider",
     "datePublished"
     ]
     }
    }

     

    2\Add a button set its OnSelect Property to:

     

    ClearCollect(VarVar,'PowerApp->Listnewsbyquery'.Run("Corona")) /*VarVar is my custom collection*/

     

     

    Best Regards,

    Bof

  • Bhavika A. Vala Profile Picture
    16 on at

    Thank you so much @v-bofeng-msft for your time and help.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard