Dashboard widgets break when updating source sheet via API

tommasofedele ✭✭✭
edited 03/01/24 in API & Developers

Hi there,

I have a source sheet feeding a Dashboard Chart widget.

I am using the API to update the rows on the source sheet.

Unfortunately everytime I run the code to update the source sheet, the source sheet information on the dashboard disappears, as if the widget link to the source sheet would be manually deleted.

I would appreciate some feedback.

The rows id are the same. Why the is Dashboard link affected?

Maybe some more explanation on the logic behind the link between Dashboards and sheets might trigger a work around this issue.




  • Samuel Mueller
    Samuel Mueller Overachievers

    This seems very strange. This may not be the answer you are looking for, but try creating a report referencing the data you want to chart from your sheet, and add that report as a chart widget.

    Are you just doing a normal PUT request to the sheet?

  • tommasofedele

    Hi Samuel,

    thanks for your answer.

    Yes, it is a PUT request.

    At the beginning I did not want to create Reports, since they are no manageable by API. There is a way to control the row I am writing to, without deleting the row already there. This is a bit of coding but feasible with the API.

    I attached a Python function for reference.

    Now I have implented Reports. I agree that your suggestion is the most stable solution!