Clear cell of hyperlinks after inserting values by API

Hi, this is probably a really obvious issue, but I know just enough to be dangerous. Here’s the situation:


I am using a Zapier custom webhook to insert a value and URL into a sheet cell to create a hyperlinked cell. So far so good. It all works fine. However, I cannot overwrite that cell with non-hyperlinked data once this first action is complete (the cell updates and sometimes the cell requires a hyperlink and sometimes not).


When I clear the cell manually it then allows a non-hyperlinked value to be added via Zapier. In my naivety I expected there to be a simple API call to clear a cell, which I could add as a step in Zapier prior to adding my non-hyperlinked data but I just cannot find how to do that (I typically rely on finding something someone else has previously done and then getting there by trial and error.). A few other things:


  • I tried adding a clear cell native automation in the sheet (the hyperlink cell change is always dependent on another column value), however, even this did not clear the hyperlinked cell when triggered.
  • the main Zapier / Smartsheet integration will not overwrite the value either

I feel that clearing a cell or just writing non-hyperlinked value into the cell should be really easy, I just can’t find it anywhere.


Any help would be really appreciate it.


I'm using a cURL format in the Zapier custom webhook to insert the value / URL if that helps

Answers

  • I thought I would share how I am putting the original hyperlinked values into the cell, if it helps:

    • Zapier custom webhook (PUT)

    to URL: https://api.smartsheet.com/2.0/sheets/MySheetID/rows


    the content:

    [{"id": MyRowID,"cells” [{"columnId":MyColumnID,"value": "MyText","hyperlink": {"url": MyURL}}]}]


    Thanks again, this is driving me bananas.

  • Genevieve P.
    Genevieve P. Employee Admin

    Hi @Gingermatti1

    The native Clear Cell workflow from within Smartsheet should clear out the cell so you can add new data that will no longer be hyperlinked. I didn't test with Zapier, but I was able to successfully clear out a manually hyperlinked cell with this workflow, then add in new content without the underlying URL (either manually or with another workflow).

    If Clear Cell is not working for you, what about using a Change cell automation, and change it to a symbol such as "-"?

    As an alternative, you can use the Smartsheet API to clear out hyperlinks and update cells. Here's the documentation on this type of call: https://smartsheet.redoc.ly/tag/cellsRelated#section/Hyperlinks

    There's a section in the Cell Object that specifies the URL of a hyperlink.

    Let me know if that helps!

    Cheers,

    Genevieve