# TROUBLESHOOTING: When sending data from a NetSuite saved search to Google Sheets, the import performs a sheets delete method and then a sheets write method for each line of the saved search

**URL:** <https://connective.celigo.com/t/troubleshooting-when-sending-data-from-a-netsuite-saved-search-to-google-sheets-the-import-performs-a-sheets-delete-method-and-then-a-sheets-write-method-for-each-line-of-the-saved-search/1234>\
**Category:** Integrator.io\
**Tags:** csv, google-sheets, ftp, netsuite\
**Created:** [January 21, 2021, 10:51pm UTC](https://connective.celigo.com/t/troubleshooting-when-sending-data-from-a-netsuite-saved-search-to-google-sheets-the-import-performs-a-sheets-delete-method-and-then-a-sheets-write-method-for-each-line-of-the-saved-search/1234 "2021-01-21T22:51:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomsantiago](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/tomsantiago/32/7158_2.png) [@tomsantiago](https://connective.celigo.com/u/tomsantiago)\
**Post date:** [January 21, 2021, 10:51pm UTC](https://connective.celigo.com/t/troubleshooting-when-sending-data-from-a-netsuite-saved-search-to-google-sheets-the-import-performs-a-sheets-delete-method-and-then-a-sheets-write-method-for-each-line-of-the-saved-search/1234/1 "2021-01-21T22:51:53Z")

</div>

This problem can cause bottlenecks in a flow because the saved search output from NetSuite contains hundreds of lines, so integrator.io attempts the deletion process hundreds of times.

To resolve this issue, you can use the [clear method in Google Sheets API](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/clear). This clears the entire data range with a single command. The simplest solution is to create two flows:

1. The first flow sends the saved search data from NetSuite to an FTP endpoint that creates a CSV file.
2. The second flow groups all of the data in the CSV file, clears the sheet, then writes the grouped data back into the sheet.

---

<div class="post-metadata">

**Author:** ![jefferyhill](https://avatars.discourse-cdn.com/v4/letter/j/ea666f/32.png) [@jefferyhill](https://connective.celigo.com/u/jefferyhill)\
**Post date:** [December 19, 2021, 3:41pm UTC](https://connective.celigo.com/t/troubleshooting-when-sending-data-from-a-netsuite-saved-search-to-google-sheets-the-import-performs-a-sheets-delete-method-and-then-a-sheets-write-method-for-each-line-of-the-saved-search/1234/2 "2021-12-19T15:41:39Z")

</div>

The simplest solution would be to add an advanced function to "run once per flow" like what has been build for the Snowflake connector.

---

<div class="post-metadata">

**Author:** ![scotthenderson](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/scotthenderson/32/6780_2.png) [@scotthenderson](https://connective.celigo.com/u/scotthenderson)\
**Post date:** [October 19, 2023, 10:17pm UTC](https://connective.celigo.com/t/troubleshooting-when-sending-data-from-a-netsuite-saved-search-to-google-sheets-the-import-performs-a-sheets-delete-method-and-then-a-sheets-write-method-for-each-line-of-the-saved-search/1234/3 "2023-10-19T22:17:01Z")

</div>

We published a brand new template in our marketplace that makes it super easy to work with Google Sheets. We published a new article too explaining all the details ([here](https://docs.celigo.com/hc/en-us/articles/10031282236059-Working-with-Google-Sheets)). Hope this helps.
