Delete the data in the first sheet of the spreadsheet (except for the first row).
Update the spreadsheet with the data obtained from step 1.
How should I set up this workflow? If I use the ‘Clear’ function in Google Sheets to delete and then use ‘Update’ to input new data, it seems that it won’t work."
Could you provide the workflow you have so far? It would make it easier to help you if I can see exactly what you mean.
For example, are you sending the data from the code node to a google sheet? Or editing it first and sending it already edited?