Forum Discussion
Insightly with Power BI Desktop
Hi,
I actually dropped to use the out-of-the-box Insightly PowerBI Add-On because it is not useful if you would like to do some calculations.
I'm not a developer but I created a JSON code what you can use to connect Insightly's API connection (documented here: https://api.insight.ly/v2.2/Help). I used v2.1 API because with v2.2 I should use pagination to sync more than 100 data elements what would hard for me to develop... With v2.1 you do not have any limitation regarding data sync.
Here is my code where you should paste your API KEY with Base64 encoded. This is under Query creation in Advanced Editor.
let
Source = Json.Document(Web.Contents("https://api.insight.ly/v2.1/Opportunities", [Headers=[Authorization="Basic APIKEY", ContentType="application/json"]])),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded {0}" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {
"OPPORTUNITY_ID",
"OPPORTUNITY_NAME",
"OPPORTUNITY_DETAILS",
"PROBABILITY",
"BID_CURRENCY",
"BID_AMOUNT",
"BID_TYPE",
"BID_DURATION",
"OPPORTUNITY_VALUE",
"FORECAST_CLOSE_DATE",
"ACTUAL_CLOSE_DATE",
"CATEGORY_ID",
"PIPELINE_ID",
"STAGE_ID",
"OPPORTUNITY_STATE",
"OPPORTUNITY_STATE_REASON_ID",
"IMAGE_URL",
"RESPONSIBLE_USER_ID",
"OWNER_USER_ID",
"DATE_CREATED_UTC",
"DATE_UPDATED_UTC",
"VISIBLE_TO",
"VISIBLE_TEAM_ID",
"VISIBLE_USER_IDS",
"CUSTOMFIELDS",
"TAGS",
"LINKS",
"CAN_EDIT",
"CAN_DELETE"},{
"OPPORTUNITY_ID",
"OPPORTUNITY_NAME",
"OPPORTUNITY_DETAILS",
"PROBABILITY",
"BID_CURRENCY",
"BID_AMOUNT",
"BID_TYPE",
"BID_DURATION",
"OPPORTUNITY_VALUE",
"FORECAST_CLOSE_DATE",
"ACTUAL_CLOSE_DATE",
"CATEGORY_ID",
"PIPELINE_ID",
"STAGE_ID",
"OPPORTUNITY_STATE",
"OPPORTUNITY_STATE_REASON_ID",
"IMAGE_URL",
"RESPONSIBLE_USER_ID",
"OWNER_USER_ID",
"DATE_CREATED_UTC",
"DATE_UPDATED_UTC",
"VISIBLE_TO",
"VISIBLE_TEAM_ID",
"VISIBLE_USER_IDS",
"CUSTOMFIELDS",
"TAGS",
"LINKS",
"CAN_EDIT",
"CAN_DELETE"})
in
#"Expanded {0}"
If you need further assistance feel free to contact me.
BR, István
Thank you so much! This was exaclty what I was looking for. One other question, how do you handle the custom fields in Insightly? The custom fields are bundled together and when I run this query for the custom field name and the custom field value (there can be many values for custom field name), I get a null for the column.
- dan_blyth_18 years agoRegular Visitor
istvan_gorgey did you ever get anywhere with the custom fields within the insightly api?
- istvan_gorgey8 years agoFrequent Visitor, I have not really tried it.
- dan_blyth_18 years agoRegular Visitor
Hey istvan_gorgey ok no problem, not sure if you also came across this issue with the insightly API but I just posted a new thread where i am looking for a solution to the limited record return on v2.2/2.3 of the insightly API, if you have a dashboard you are maintaing you may already be using the method I have developed but i am looking for a full automated solution - you can find the thread here; http://community.powerbi.com/t5/Integrations-with-Files-and/Looking-for-a-Limited-API-solution-INSIGHTLY-API/m-p/457720#M18230 perhaps have a read and see if you have any ideas?
thanks,