Queries
Create a Query
How to create a query to pull in data to Google Sheets
Queries serve as the foundation of Viasheets, allowing you to extract data directly into Google Sheets. A query empowers you to choose the specific data you wish to extract from a source and seamlessly integrate it into a spreadsheet.
After you have crafted and executed a query, you will have the opportunity to save it, allowing you to rerun the query at a later time.
Steps
- Create or go to a Google Sheet that exists.
- Click on Extensions > Viasheets > Launch Viasheets.
- Wait for the sidebar to load.
- Select your organization.
![](https://mintlify.s3-us-west-1.amazonaws.com/viasheets/images/sheets/screen-1.png)
- Click on the Navbar icon in the top right and click “Create Query from Source.”
![](https://mintlify.s3-us-west-1.amazonaws.com/viasheets/images/sheets/screen-2.png)
- Give your query a name, Select the Source you want to pull from, and the Source API you want to get data from. If you have multiple sources connected, you need to click on the “Click Here” text underneath the “Select Source API” dropdown.
![](https://mintlify.s3-us-west-1.amazonaws.com/viasheets/images/sheets/screen-4.png)
- (If you have multiple sources) Select the Source you want to pull data from.
- Click on “Get Source Data.”
- Select the fields you want to pull into the Google Sheet.
![](https://mintlify.s3-us-west-1.amazonaws.com/viasheets/images/sheets/screen-6.png)
- Select a cell on your Google Sheet where you want to pull the data into.
Please be aware that any cell data located within the specified number of rows and columns (based on the number of fields selected), where you import data, will be replaced by the incoming data.
![](https://mintlify.s3-us-west-1.amazonaws.com/viasheets/images/sheets/screen-7.png)
- Click “Add Source Data to Spreadsheet” to pull the data into the spreadsheet. Before this runs, you’ll be asked for confirmation to pull data into the starting cell. If you don’t want to pull in the data yet, click “Create Query.”
![](https://mintlify.s3-us-west-1.amazonaws.com/viasheets/images/sheets/screen-8.png)