I’ve recently started parsing some Freshdesk API data inside of a Google Sheet using the ImportJSON function (which works great!). Everything has been working great, except today I noticed that when I’m querying data using api/v2/companies, it’s doing some weird things with my custom company fields. I’ve added three custom fields for companies, and if there is a value in that field it comes through the API data just fine. However, if that custom field doesn’t have anything in it on Freshdesk, the API displays the previous entry’s data instead of leaving it empty. It’s only doing this on the custom fields though.
First of all, welcome to Freshworks developer community!
You have mentioned that you have used
api/v2/companies API to get these data before importing them to Google Sheets. Could you share if the values have the same effect in the response JSON itself? Also, if possible, could you attach the real values from the Freshdesk portal.
[Please hide any sensitive information while sharing personal data and sensitive data]
Thanks for the reply and welcome! I just manually ran the API call from the command line and it looks like the API is replying with the correct null values for those custom fields that are empty. That definitely points the issue to being this ImportJSON script I’m using. I appreciate the help and making me realize I should have tested that first!