Convert Google Sheets from CSV to JSON
This article can be useful if your spreadsheet uses dates as column names.
Instead of the usual way of publishing a table and getting a link, follow the steps below.
Open Notepad and copy the following line into it:
https://tools.ds.tovie.ai/api/csv2json?url=
Publish a document
Open your spreadsheet, go to File → Share → Publish to web. Instead of Web page, choose CSV file.
You can publish either the entire spreadsheet or just a single sheet, depending on your task.
- To publish the entire spreadsheet, leave Entire document unchanged.
- To publish an individual sheet, select the sheet you need from the list.
Then click Publish.
In the Are you sure you want to publish this selection modal window, click OK.
Encode address
Copy the URL address in the window that appears:
If you have not changed the auto-publish settings, then you do not need to re-publish the updated spreadsheet. The bot will have access to the current spreadsheet content via the given link.
The resulting URL needs to be turned into a URL parameter. Use the URL Encoding service and paste the Google Sheets URL you copied there, then click Encode.
Copy the resulting value and paste it into the previously copied address https://tools.ds.tovie.ai/api/csv2json?url=
after url=
without a space.
Go to Add an HTTP request to spreadsheet and use the full link you got in your Notebook in the HTTP request.