Query gmail from google sheets gs) to editor, replacing the sample code there 12 | 1. Then use form mule addon to send emails from the spreadsheet. Import, analyze, and visualize your email data effortlessly for better insights. For more information on Drive, see Drive training and help. In this article, I'll show you how to integrate Gmail with Google Sheets, no matter your use case. Download apps to help your business increase workflow, productivity, and much more. Fortunately, the QUERY function is a powerful tool that makes filtering by date straightforward and efficient. Gmail to Google Sheet Script This Google Script can do any search on your Gmail account, and store the results on a sheet file. Follow along for video guidance and advice on the formula. Unlock the power of data analysis and manipulation with these adva Oct 13, 2025 · The Google Sheets API is a RESTful interface that lets you read and modify a spreadsheet's data. May 17, 2023 · Are you looking to learn how to use the Google Sheets QUERY function to select and filter data based on specific conditions? In this blog post, you’ll explore the ins and outs of the powerful QUERY function, particularly focusing on SELECT and WHERE clauses, to help you get the most out of your Google Sheets experience. Discover step-by-step guidance from basic syntax to advanced techniques. com – you increase the likelihood of encountering Sep 19, 2025 · How to make Google Sheets pull data from several documents into one. n8n recommends using OAuth2 with the Gmail node. Join today! Oct 13, 2025 · The Google Sheets API lets you add, remove, and manipulate rows and columns in sheets. 5 days ago · Learn to combine Google Sheets' QUERY function with REGEXMATCH for flexible pattern-based filtering of text data. You can create external tables over files in Drive that have the following formats: Comma-separated values (CSV) Newline-delimited JSON Avro Google Sheets Before When you set up backup, save, or export email messages into Google Sheets you might want to improve your Google spreadsheet so it also has a number of messages in a Gmail conversation. For example, the following is a simple regular expression that matches any 10-digit tel Nov 21, 2016 · You can use the Save Gmail add-on for saving the email metadata to a Google Sheet. Preparing Your Spreadsheet Setting the Stage: Organizing Data for Extraction Create a Jul 10, 2024 · Google Charts and Google Spreadsheets are integrated, allowing you to embed charts in spreadsheets or use spreadsheets as data sources for charts. Method 1: Import Google Sheets Data into Excel (Manual Refresh) One simple way to sync Google Sheets to Excel is by using the web query feature in Excel. So when you look for emails, Google can be an effective solution. This can be easily done using a very powerful Google Sheets QUERY formula. Is there any way I can log into my Google account through Excel? I have logged into my Okta/Google account in Internet Explorer but am still having this same issue Thanks! Solved! Go to Solution. For example, if writing a cell with formula =A1 into range B2:C4, B2 would be =A1, B3 would be =A2, B4 would be =A3 Search for emails on your gmail account (using a query) and store results on a google sheets - TiagoGouvea/gmail-to-google-sheets-script Aug 18, 2024 · In Google Sheets, we can use the QUERY function to retrieve the sum of all total sales for “Laptop” across all instances. The google sheet QUERY function can help you in appending two ranges from two different sheets. Mar 30, 2023 · We can easily filter for multiple criteria in Google Sheets by using the Query function "And" and "Or" keywords within the query. The majority of pivot table functionality may be duplicated by this single function, which takes the place of numerous others. It is useful to learn how to use Google Sheet Query to import data from another tab or an May 8, 2025 · Master data cleaning and transformation in Google Sheets using the QUERY function. What I'm going t Apr 29, 2025 · Returns the spreadsheet at the given ID. ) from any email address. This approach is more dynamic and flexible, as it allows us to aggregate the data. You can check for outages and downtime on the Google Workspace Status Dashboard. Where the thread size is unknown, and potentially very large, please use the 'paged' call, and specify ranges of the threads to retrieve in each call. Google regularly undergoes independent verification of security, privacy and compliance controls. way to query gmail metadata e. When you include a domain name in a search query – especially a generic one, such as @gmail. Ask Gemini in Gmail to write emails like a birthday invitation or customer outreach notes. Jan 19, 2024 · The ability to send emails directly from Google Sheets can save you a lot of time. To learn how to implement a batch update in different languages using the Google API client libraries, see Gmail and Service Accounts Google technically supports Service Accounts for use with Gmail, but it requires enabling domain-wide delegation, which Google discourages, and its behavior can be inconsistent. Nov 9, 2021 · Learn to use the QUERY function with these examples in Google Sheets to create powerful formulas with SQL-like syntax. Use tables in Google Sheets Use table references in Google Sheets Visit the Learning Center Using Google products, like Google Docs, at work or school? Try powerful tips, tutorials, and templates. In the following sections, I’ll start with an introduction to Google QUERY function COUNTIF VLOOKUP Visit the Learning Center Using Google products, like Google Docs, at work or school? Try powerful tips, tutorials, and templates. Why Google Sheets + Apps Script is a Data Dream Team On their own, Gmail and Google Sheets are already indispensable tools for most knowledge workers. into a Google Sheet Hello, I am cleaning up a ~15 year email account and would like to find a way to summarize metadata to help me identify where to prune. Learn how to draft emails with Gemini in Gmail. Google Sheets Tutorials & Excel Tutorials - Comprehensive channel covering Google Sheets & Excel functions, tricks & tips. Jul 28, 2025 · Discover how to automate email data extraction from Gmail to Google Sheets using Google Apps Script. Meu site!more Hojas de cálculo de Google admite las fórmulas de celdas que se suelen encontrar en la mayoría de los paquetes de hojas de cálculo para computadoras de escritorio. Many professionals, like analysts, educators, and marketers, use the QUERY function to sort and filter data. Nov 14, 2025 · Note: Saving results to Google Sheets is not supported by the bq command-line tool or the API. Nov 23, 2022 · I have a Google Sheets table and one of the columns has email addresses. With Connected Sheets, you can preview your BigQuery data and use it in pivot tables, formulas, and charts built from the entire set of data. Jan 8, 2020 · Need to filter, search, or manipulate data in a Google Sheets spreadsheet? Then, you need the QUERY function! Welcome to Part 4 of the Google Sheets Query Function Series!In this video, we’ll explore how to use constants (static values) within the QUERY function to m Aug 13, 2025 · Top Gmail search operators for productivity allow precise filtering of emails, enabling faster access to important information in large inboxes. Only the fields listed in the fields field are updated; others are unchanged. Nov 14, 2025 · This document describes how to create an external table over data stored in Google Drive. Sep 19, 2025 · How to make Google Sheets pull data from several documents into one. In this tutorial, we will walk through how to use this customize Jan 9, 2024 · What is the Google Sheets QUERY Function? The QUERY function is a dynamic and versatile function that allows you to execute queries on your spreadsheet data as if it were a database. If writing a cell with a formula, the formula's ranges will automatically increment for each field in the range. Get rid of unique tag info to prevent duplicate runs. It also saves the messages to Drive. Access menu Extension > App Script 11 | 1. Use array. You can include grid data in one of 2 ways: Specify a field mask listing your desired fields using the fields URL parameter in HTTP Set the includeGridData URL parameter to true. Conceptually, I'm thinking of a Google Sheet That shows me how many emails by sender, how many emails by subject, how many emails by year, etc. Use the Gemini in Gmail side panel to draft email responses, query your emails ("Catch me up on Project Clover emails"), and summarize emails and email threads. Create and edit web-based documents, spreadsheets, and presentations. May 23, 2024 · In the next few sections, you build integrations against Google Workspace products, such as Google Drive, Google Slides, and Google Sheets. How can I add the extra columns? Oct 13, 2025 · Query parameters that apply to all Google Sheets API operations are documented at System Parameters. flat() to change the date values to 1-d Customer: This is a query about using Gmail and Sheets. Jan 17, 2024 · Learn how to automate the extraction of email data from Gmail and import it directly into Google Sheets using Google Apps Script. Ví dụ mẫu QUERY(A2:E6;"select avg(A) pivot B") QUERY(A2:E6;F2;FALSE) Cú pháp QUERY(dữ_liệu; truy_vấn; [tiêu_đề]) dữ_liệu – Dải ô thực hiện truy vấn. In case of mixed data types in a single column, the majority data type Mar 11, 2025 · Learn more about Sync Google Sheets to Excel. Learn how to filter, sort, remove duplicates, and optimize performance. To create a chart from a separate We would like to show you a description here but the site won’t allow us. Sync live data from 100+ business systems directly into Google Sheets or Excel – from your CRM, BI, database, payment platform, and more. This help content & informationGeneral Help Center experienceSearch Many web pages across the Internet contain email addresses, and you might have noticed that Google occasionally shows email addresses in its search result snippets. Sep 15, 2025 · This must-have add-on simplifies data management with 40+ tools for cleaning, analyzing, transforming, and automating tasks directly in your Google spreadsheets ⚡ Among its add-ons you'll find those that remove duplicates, compare and vlookup sheets, import ranges from multiple sheets, merge cells, find and replace data, sum and count colored cells, generate numbers and other records. It can contain multiple Sheets, each with And speaking of sources, I'll show you how to connect to a Google Sheets file to access real-time data easily and effectively. Use Marketplace to explore enterprise apps for Google Workspace. You can embed a chart directly within a Google Spreadsheet using the "Insert" > "Chart" menu option. Get step-by-ste Sep 12, 2019 · I have the following code. To do that just add the following query as the last column of the spreadsheet: =QUERY Nov 24, 2023 · Google Apps Script is a powerful tool that allows users to automate tasks and integrate with various Google Workspace applications, including Gmail. Apr 22, 2020 · With Google Apps Script, marketers can capture Gmail messages, parse them for relevant information, and add them row-by-row to a Google spreadsheet. Transform you career with Coursera's online Google Sheets courses. Here's how to use it to extract and manipulate data from one or multiple sheets. Aquí te ofrecemos una lista de todas las funciones disponibles en cada Google Security Audits and Certifications At Google, ensuring the security of our users is a top priority, and we are constantly assessing how we can make our services even more secure. However, I can’t access or create a column beyond AA. ¿Usas productos de Google, como Documentos de Google, en el trabajo o en clase? Prueba estos eficientes consejos, tutoriales y plantillas. Manage a BigQuery data source This section uses the BigQuery Shakespeare public dataset to show how to use Connected Sheets. Quota limits While Sheets API has no hard size limits for an API request, users might experience limits from different processing components not controlled by Sheets. To create a chart from a separate This help content & informationGeneral Help Center experienceSearch Work with sample BigQuery data in Google Sheets To understand how Connected Sheets works, you can explore connected sheet examples with public data. We will use the IMAP plugin to connect to Gmail and query the emails. Not only is this method easy to follow, but it also ensures that your data stays updated seamlessly over time. Charts created using data from Google Spreadsheets will automatically update when the spreadsheet data changes. Learn to work on Office files without installing Office, create dynamic project plans and team calendars, auto-organize your inbox, and more. The dataset contains If you're having trouble accessing a Google product, there's a chance we're currently experiencing a temporary problem. To speed up requests, Google recommends a This integration makes it easy to trigger an email via Gmail for updates in a Google Spreadsheet. Oct 31, 2023 · The Query function in Google Sheets is the program’s most powerful and flexible feature. (disclaimer: I am the author of the add-on) It can be done with Google Script attached to the Google Sheet, something like this snippet. gs to editor, replacing the sample code there Replace the value on SEARCH_QUERY to your real query (Do your search on gmail first, copy and paste the search terms there) Click on "Save" button (the flop disk) Select saveEmails on menu (after "run" and "debug" buttons) Click on "Run" button It Jul 10, 2024 · Google Charts and Google Spreadsheets are integrated, allowing you to embed charts in spreadsheets or use spreadsheets as data sources for charts. Feb 25, 2025 · Learn how to efficiently analyze and manage data using Google Sheets Query with easy-to-follow tips and techniques for all skill levels. Here's a simplified diagram: At a high level, when a user query comes in, you use the Gemini API's function calling to determine which tool to use. Get the date values in column A as string using Range. Выполняет запросы на базе языка запросов API визуализации Google. If a field mask is set, the includeGridData parameter is ignored For large Search for emails on your gmail account (using a query) and store results on a google sheets - TiagoGouvea/gmail-to-google-sheets-script To create a regular expression, you must use specific syntax—that is, special characters and construction rules. I'm filtering that column using this custom formula that works: =FIND ("@gmail. Plan is to get: subject, date, email from body. Nesse vídeo vou mostrar como utilizar função query no google planilhas / google sheets. This function uses a query language similar to SQL (Structured Query Language) that lets users sort, filter, and analyze datasets in more sophisticated ways than standard spreadsheet functions allow. ⚠️ You can Oct 1, 2015 · Use regex with the emails body content to extract the email address i need to send the automated emails. Click on "Save" button (the flop disk) 14 | 1. Text Oct 13, 2025 · As the Google Sheets API is a shared service, we apply quotas and limitations to make sure it's used fairly by all users and to protect the overall health of the Google Workspace system. Mỗi cột của dữ_liệu chỉ được chứa giá trị boolean, số học (kể cả loại ngày Jul 28, 2025 · Introduction Efficient Email Management: Leveraging Google Apps Script for Data-Driven Insights In our data-centric world, managing and analyzing email data is crucial. Run your first query - Select any Gmail data that you want to access. In this step-by-step tutorial, discover the effortless and automated process of exporting Gmail emails directly to a Google Spreadsheet using the new V4 version of Google Apps Script. search (query) which will return an array of GmailThread Get the length of the array. Aug 24, 2025 · Learn how to use Google Sheets QUERY across multiple sheets with IMPORTRANGE, array syntax, and INDIRECT for dynamic data filtering. Dec 31, 2021 · When I upload the query I see this in the Web View: Unfortunately I can't click anything in this view to complete my log in so the query does not work. Get relevant responses to emails from Gemini in Feb 6, 2025 · Discover how to convert Gmail to Google Sheets effortlessly. Integrations Built-in nodes Actions Google Sheets Google Sheets Use the Google Sheets node to automate work in Google Sheets, and integrate Google Sheets with other applications. Пример использования QUERY(A2:E6; "select avg(A) pivot B") QUERY(A2:E6; F2; ЛОЖЬ) Синтаксис QUERY(данные; запрос; [заголовки]) данные – диапазон ячеек, для которого нужно выполнить Create a new Google Sheet Access menu Extension > App Script Copy the content from gmailt-to-sheets. Introduction to Anyquery Anyquery allows you to write SQL queries on pretty much any data source. gs] (gmailt-to-sheets. Learn how to collaborate with Gemini in Gmail. See full list on github. com",I2) But I need to be able to f Learn how to master Google Sheets Query Functions with multiple criteria in this tutorial. Store documents online and access them from any computer. Discover how to replicate Power Query in Google Sheets with native functions and add-ons. Suppose we have a range of 20 items for the date 05/29/2020 in another sheet, as shown above. You can trigger an email based on any update or specific updates to a certain column. This call will fail when the size of all threads is too large for the system to handle. As your data 4 days ago · Use the IMPORTRANGE Google Sheets function to access data between spreadsheets. Help Center Community Gemini in Docs Editors Google Docs Editors Privacy Policy Terms of Service Community Policy Community Overview This help content & information Nov 14, 2025 · Learn how to automatically populate an email template with data from Google Sheets and send personalized emails from your Gmail account. This can be especially helpful for capturing leads or contacts. This guide explains the process of searching labeled emails, extracting key information, and organizing it efficiently, making it ideal for handling inquiries or feedback submissions. Import emails and parse the contents of the email into Google Sheets™ to analyze data. With this versatile tool, you can use data commands to change the data in Google Sheets. Jun 17, 2025 · RepeatCellRequest Updates all cells in the range to the values in the given Cell object. Collaborate in real-time from any device and leverage AI to generate formatting, analysis, and more. The examples on this page illustrate how some common row and column operations can be achieved with the Sheets API. Learn efficient methods to turn your inbox into a structured, analyzable database. g. May 6, 2022 · I've started a script that matches an email address in Col D with Gmail and writes the last message date in Col E. Nov 6, 2022 · Im trying to extract emails from a specific Gmail Label to Google sheet, using Google App Script, the data in Google sheet to have timestamp, from email, to email, subject, and email body. Feb 23, 2025 · Explore the Google Sheets QUERY function to learn how you can use it to optimize your data manipulation experience in spreadsheets. Troubleshoot saving results to Google Sheets When saving data from BigQuery to Google Sheets, you might find that some cells in the sheets are blank. Learn how to master Google Sheets Query Functions with multiple criteria in this tutorial. Oct 7, 2022 · This tutorial explains how to use WHERE IN list syntax in a Google Sheets Query, including an example. With just a few simple steps, you can filter for a single date, or a range of dates, or even use today’s date Jan 18, 2022 · This tutorial explains how to query from another sheet in Google Sheets, including several examples. It can contain multiple Sheets, each with Mar 19, 2025 · Import reports or custom data queries from Salesforce into Google Sheetsᵀᴹ, make changes to Salesforce directly from Google Sheetsᵀᴹ or convert Salesforce URLs to smart chips in Google Docsᵀᴹ. The Sheets API lets you: Create spreadsheets Read and write spreadsheet cell values Update spreadsheet formatting Manage Connected Sheets The following is a list of common terms used in the Sheets API: Spreadsheet The primary object in Google Sheets. You build three tools that can do the following: Set up a Feb 20, 2025 · Learn how to automate Gmail data extraction into Google Sheets with AI. Sometimes users want to view all or specific Gmail emails in Google Sheets for data analysis, compliance requirements, data organizing, and other purposes. These examples are presented in the form of HTTP requests to be language neutral. Oct 13, 2025 · Connected Sheets lets you analyze petabytes of data directly within Google Sheets. Save time, reduce errors, and unlock valuable insights from your inbox effortlessly. Visit the Learning Center Using Google products, like Google Docs, at work or school? Try powerful tips, tutorials, and templates. By default, data within grids is not returned. Create online spreadsheets with Google Sheets. . 3 days ago · Email parser is a tool to extract data from your emails and export it to Google Sheets™. Check out how to do it right with our extensive case study. Learn how to use QUERY in Google Sheets to filter, reorganize, and analyze data effortlessly. here, I will show 3 easy ways to import google sheets to Excel. The Sheet template I’m designing initially started with columns A-Z, but I now need to extend to AA, AB, AC, and AD. Learn to transform and clean data efficiently in the cloud. This add-on allows four different operations with your Salesforce data: * Pull in a Salesforce report * Import Salesforce data based on a custom query or SOQL * Insert / Update changes made Sep 4, 2019 · Combining UNIQUE and FILTER, how can I exclude a range of data instead of a single data point? I have column that auto-generates new entries from Google Forms, and another column where I manually input names I don't want to include in a report that I later generate. com Oct 14, 2024 · Apps Script is Google‘s serverless scripting language that allows you to programmatically interact with and extend Google apps like Gmail, Sheets, Docs and more. n8n has built-in support for a wide range of Google Sheets features, including creating, updating, deleting, appending, removing and getting documents. Aug 27, 2025 · Explore Google Sheets automation, including available options, tips to troubleshoot common errors, and how to pick the right technique to streamline your workflow. I'd like that script to repeat row by row - now it only writes to Row 2 (newbie qu Create a named range by selecting cells and entering the desired name into the text box. Enroll for free, earn a certificate, and build job-ready skills on your schedule. In case of mixed data types in a single column, the majority data type 4 days ago · Learn to use the Google Sheets QUERY function. This spreadsheet pulls information in from 3 separate Google spreadsheets and merges it together using IMPORTRANGE () and QUERY () The Query Function in Google Sheets is a powerful tool for analyzing data. You can also do the following: Collaborate with partners, analysts, or other stakeholders in a familiar spreadsheet interface. Export Emails from a Gmail Account to a CSV File This tutorial will guide you through the process of exporting emails from a Gmail account to a CSV file using Anyquery. This guide walks you through simple and complex QUERY examples with screenshots and a free template. Choose one of the connected sheet Examples. Replace the value on `SEARCH_QUERY` to your real query (Do your search on gmail first, copy and paste the search terms there) 13 | 1. Write all that info to a spreadsheet. Jun 10, 2025 · Learn how to connect Gmail to Google Sheets without code or Apps Script. All data is exposed as standard tables and data views. May 4, 2024 · Importing data from google sheets to Excel comes handy sometimes. Jun 7, 2024 · How to use Gemini generative AI models through BigQuery to boost productivity in Google productivity tools like Sheets. And best of all: we'll do this in both Power Query for Excel and Aug 13, 2025 · Top Gmail search operators for productivity allow precise filtering of emails, enabling faster access to important information in large inboxes. com or @hotmail. You can even write custom queries with SQL to filter and join data. Configure your Gmail Connection - Click on Open Connect Spreadsheets from within Google Sheets to setup an account and configure a connection to Gmail. This means an independent auditor examines the controls present in our data centers, infrastructure and Nov 6, 2022 · Im trying to extract emails from a specific Gmail Label to Google sheet, using Google App Script, the data in Google sheet to have timestamp, from email, to email, subject, and email body. BigQuery is the autonomous data and AI platform, automating the entire data life cycle so you can go from data to AI to action faster. Chạy truy vấn bằng Ngôn ngữ truy vấn của API Google Visualization trên nhiều dữ liệu. You can connect your spreadsheets with a BigQuery data warehouse or Looker and do the analysis by using familiar Sheets tools like pivot tables, charts, and formulas. Estas fórmulas se pueden usar para crear funciones que manejen datos y calculen strings y números. Como no queremos tener información "regada" en múltiples sitios, preferimos tener una sola hoja maestra, y desde ahí poder generar reportes o informes a part Feb 10, 2025 · Learn how to create a custom function in Google Sheets that automatically identifies the email provider (Gmail, Microsoft 365, etc. com",I2) But I need to be able to f This quick reference cheat sheet lists of Google advanced search operators. Consulta cómo trabajar con archivos de Office sin instalar Office, crear calendarios de equipo y planes de proyectos dinámicos, organizar automáticamente tu bandeja de entrada y muchas cosas más. I have Jan 22, 2025 · Learn what the Google Sheets Query function is, how to use it, and why it may benefit your data management. Ensure a single source of truth for data Learn how to effortlessly connect Google Sheets to Gmail for seamless data management and automated email updates in a few easy steps. The caller must specify the spreadsheet ID. I have Nov 14, 2025 · Connected Sheets brings the scale of BigQuery to the familiar Google Sheets interface. Jan 30, 2025 · Retrieves all Inbox threads irrespective of labels. Jul 16, 2025 · By logging incoming emails in a spreadsheet, you can create a centralized to-do list that you can share with your team and actually work through systematically. Nov 14, 2025 · Learn how to connect with and use various external APIs, including those requiring OAuth, from your Apps Script projects. But this ss contains a lot of data and Google is slow to answer, even if we query only a small subset of the data (we usually have to wait 6 to 8 seconds before the spreadsheet begins to answer) Is there a way to improve that? Or is there any plan to increase those perfs on Google side ? Visit the Learning Center Using Google products, like Google Docs, at work or school? Try powerful tips, tutorials, and templates. Sep 3, 2021 · This tutorial explains how to query from multiple sheets in Google Sheets, including several examples. Feb 20, 2025 · Discover how to automatically parse and extract Gmail data into Google Sheets. Sep 22, 2025 · Dealing with dates in Google Sheets can become challenging, especially when you're trying to filter data by specific time periods or need to compare date values dynamically. BigQuery supports external tables over both personal Drive files and shared files. We would like to show you a description here but the site won’t allow us. This guide will show you how to export your Gmail inbox to Google Sheets using Google Apps Script, simplifying your email data management. Learn how to effortlessly connect Google Sheets to Gmail for seamless data management and automated email updates in a few easy steps. I've read many threads on how to solve query returning empty value but none of them worked in my case. The Fundamentals of QUERY in Google Sheets The QUERY function in Google Sheets is a basic tool for data analysis that helps users extract specific information from large sets of data quickly. Copy the content from [gmailt-to-sheets. Learn automatic email data extraction methods for better tracking, analysis, and reporting today. Nov 11, 2022 · as continued from my earlier post Extracting Emails from Gmail Label to Google Sheet Im trying to extract emails from a Single Gmail Label to Google sheet, using Google App Script, the data in Google Nov 21, 2016 · You can use the Save Gmail add-on for saving the email metadata to a Google Sheet. Jun 16, 2021 · Create a gmail query string using Gmail search operators label:(your label) after:(Epoch datetime) before:(Epoch datetime) Use GmailApp. On your computer, open the Google Sheets template gallery. It is a query engine that can be used to query data from May 16, 2013 · The data is stored in a Google Spreadsheet and we use a query to fetch it. Runs a Google Visualization API Query Language query across data. Oct 14, 2024 · Enter the magical combination of Google Sheets and Apps Script. getDisplayValues(). I've also shared a workaround Google spreadsheet. Read more on how to retrieve a specific set of information through a query text that is similar to SQL, by using the QUERY function in Google Sheets. Jul 30, 2024 · There are some unavoidable situations when users prefer to export Gmail emails to Google Sheets depending on specific requirements. Each column of data can only hold boolean, numeric (including date/time types) or string values. Sample Usage QUERY(A2:E6,"select avg(A) pivot B") QUERY(A2:E6,F2,FALSE) Syntax QUERY(data, query, [headers]) data - The range of cells to perform the query on. For more information, see Using Connected Sheets.