Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
antara_centri
Frequent Visitor

Hello All,I am trying to integrate ServiceNow with Power BI

Hello,

I am trying to integrate ServiceNow with Power BI.

 

I have created a database view in ServiceNow and using the REST API EXPLORER  created the API calls.so far I have around 200000 records in the database view so my API calls are as below.

 

On first attempt  URL1: /api/now/table/incident?sysparm_limit=10000&sysparm_offset=0

Next with URL2: /api/now/table/incident?sysparm_limit=10000&sysparm_offset=10000

URL3: /api/now/table/incident?sysparm_limit=10000&sysparm_offset=20000

....

...

...

URL200: /api/now/table/incident?sysparm_limit=10000&sysparm_offset=200000

 

Then I have to get the newer data in in power BI as well.I am trying to understand what will be the best way to achieve this.

 

 

5 REPLIES 5
Anonymous
Not applicable

Hello @antara_centri,

You might want to try an alternative solution? We've built an app for Servicenow and Power BI integration: Power BI Connector for Servicenow. It's easy to use, it's fast and automated. 

 

If you need any assistance feel free to reach us anytime at support@alpha-serve.com .

jennratten
Super User
Super User

I agree with @Joe_Barry and am confirming that I connect to ServiceNow data in Power BI via SQL.

If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.

Proud to be a Microsoft Fabric Super User

Hello @jennjenn can you kindly elaborate on how you are using it now.I am a newbie and finding it difficult.I tried looking up but could not find much to connect via sql.

v-cgao-msft
Community Support
Community Support

Hi @antara_centri ,

Roughly the process can be to first generate a list of the API, then use a custom function to call the API, and then according to the results returned, for example, if the number of records exceeded the part of the return error you can use try...otherwise...to catch the error, or filter <>null if it returns null if it exceeds the number of records, and finally combine the expanded data.
This is a reference code:

let
        GetData = () =>
        let
            TotalRecords = 200000, // Adjust based on your actual record count
            PageSize = 10000,
            PageCount = Number.RoundUp(TotalRecords / PageSize) + 1,
            Source = List.Generate(
                () => 0,
                each _ < PageCount,
                each _ + PageSize,
                each 
                    let
                        Offset = _ * PageSize,
                        URL = "https://baseurl/api/now/table/incident?sysparm_limit=" & Text.From(PageSize) & "&sysparm_offset=" & Text.From(Offset),
                        Data = try CustomFuntiontoCallAPI(URL) otherwise null
                    in
                        Data
            ),
            FilteredSource = List.Select(Source, each _ <> null),
            CombinedData = Table.Combine(FilteredSource)
        in
            CombinedData
    in
        GetData

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

Joe_Barry
Super User
Super User

Hi @antara_centri 

 

It's been a few years since I worked on ServiceNow, but if memory serves me well, the database is built on a SQL DB, so you can connect directly to the database using the SQL Server Connector. If you have all the Server and DB information, then you should be able to connect. https://www.servicenow.com/community/developer-forum/what-type-of-database-does-servicenow-use/m-p/2...

 

Joe




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn
Let's connect on LinkedIn


Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors