{"id":13116,"date":"2025-12-10T17:25:03","date_gmt":"2025-12-10T16:25:03","guid":{"rendered":"https:\/\/botnation.ai\/support\/importing-and-exporting-google-sheets-data-into-your-chatbot\/"},"modified":"2026-02-19T11:03:05","modified_gmt":"2026-02-19T10:03:05","slug":"importing-and-exporting-google-sheets-data-into-your-chatbot","status":"publish","type":"support","link":"https:\/\/botnation.ai\/en\/support\/importing-and-exporting-google-sheets-data-into-your-chatbot\/","title":{"rendered":"Importing and exporting Google Sheets data into your chatbot"},"content":{"rendered":"<p>Retrieve and insert data into Google Spreadsheet from your chatbot<\/p>\n\n<p>Do you have data in a Google Sheets file that you\u2019d like your chatbot to access? Would you like to save information about your users in a Google Sheets file? This article will help you do just that!  <\/p>\n\n<p>Botnation AI offers you 3 elements to integrate into your sequences to access your Google Sheets file:<\/p>\n\n<ul class=\"wp-block-list\">\n<li>Backing up data to Google Sheets<\/li>\n\n\n\n<li>Retrieving data from Google Sheets<\/li>\n\n\n\n<li>Generate a carousel from your Google Sheets data<\/li>\n<\/ul>\n\n<h2 class=\"wp-block-heading\">1. General information<\/h2>\n\n<p>To give your Chatbot access to your Google Sheets file, you need to follow a few rules:<\/p>\n\n<ul class=\"wp-block-list\">\n<li>Your table must contain one and <strong>only one header line<\/strong> in the <strong>1st row<\/strong>.<\/li>\n\n\n\n<li>The <strong>first column<\/strong> of your table must <strong>never be empty<\/strong><\/li>\n\n\n\n<li>Do not use the value <strong>undefined<\/strong> in a cell. This keyword is reserved for formulas that do not return a result. <\/li>\n<\/ul>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"829\" height=\"237\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/image-112.webp\" alt=\"\" class=\"wp-image-13098\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/image-112.webp 829w, https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/image-112-300x86.webp 300w\" sizes=\"(max-width: 829px) 100vw, 829px\" \/><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\">2. Configuration<\/h2>\n\n<p>First of all, you need to link your Google account to your chatbot. This takes place in the <strong>Plugins<\/strong> tab of your chatbot\u2019s settings. <\/p>\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"954\" height=\"254\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/image-101.webp\" alt=\"\" class=\"wp-image-13099\" style=\"width:954px;height:254px\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/image-101.webp 954w, https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/image-101-300x80.webp 300w\" sizes=\"(max-width: 954px) 100vw, 954px\" \/><\/figure>\n\n<p>Click on the <strong>Link a Google Account<\/strong> button, then select the account that has access to your Google Sheets file from the page that appears.<\/p>\n\n<p>Once the permissions have been accepted, you\u2019re back on your Chatbot and the account you\u2019ve just linked is now selected.<\/p>\n\n<p><strong>Expert mode<\/strong><br>Expert mode enables you to activate advanced options for Google Sheets elements. Refer to the element section for more information. <\/p>\n\n<h2 class=\"wp-block-heading\">3. Data backup<\/h2>\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1024\" height=\"604\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/googlesheet_00_FR-1024x604-1.webp\" alt=\"\" class=\"wp-image-13100\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/googlesheet_00_FR-1024x604-1.webp 1024w, https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/googlesheet_00_FR-1024x604-1-300x177.webp 300w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n<p>The <strong>Data backup<\/strong> feature lets you insert or update data in your Google Sheets.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"631\" height=\"533\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/image-102.png.webp.webp\" alt=\"\" class=\"wp-image-13101\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/image-102.png.webp 631w, https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/image-102-300x253.png.webp 300w\" sizes=\"(max-width: 631px) 100vw, 631px\" \/><\/figure>\n<\/div>\n<p><strong>Spreadsheet file<\/strong>: Select the Google Sheets file to be used.<\/p>\n\n<p><strong>Tab<\/strong>: Select the tab to be used<\/p>\n\n<p><strong>Force line creation (option)<\/strong>: If checked, a new line will be created<\/p>\n\n<p><strong>Update lines corresponding to the following conditions<\/strong>: Select the conditions to identify the line(s) to be updated.<\/p>\n\n<p><strong>Create line if no line matches (option)<\/strong>: If no row in your table matches the specified conditions, a new row will be created.<\/p>\n\n<p><strong>Update next columns<\/strong>: Specify the columns to be updated.<\/p>\n\n<p>N.B.: <strong>Expert<\/strong> mode lets you specify multiple fields in the <em>Update lines<\/em> block <em>, corresponding to the following conditions<\/em><strong>. <\/strong>This allows you to create AND \/ OR conditions.<\/p>\n\n<h2 class=\"wp-block-heading\">4. Data retrieval<\/h2>\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"604\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/googlesheet_01_FR-1024x604-1.webp\" alt=\"\" class=\"wp-image-13102\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/googlesheet_01_FR-1024x604-1.webp 1024w, https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/googlesheet_01_FR-1024x604-1-300x177.webp 300w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n<p>The <strong>Data Retrieval<\/strong> feature lets you update Chatbot variables with information from your Google Sheets.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"465\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/image-103.webp\" alt=\"\" class=\"wp-image-13103\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/image-103.webp 630w, https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/image-103-300x221.webp 300w\" sizes=\"(max-width: 630px) 100vw, 630px\" \/><\/figure>\n<\/div>\n<p><strong>Spreadsheet file<\/strong>: Select the Google Sheets file to be used.<\/p>\n\n<p><strong>Tab<\/strong>: Select the tab to be used<\/p>\n\n<p><strong>Select the 1st line corresponding to the following conditions<\/strong>: Select the conditions to identify the line to be retrieved.<\/p>\n\n<p><strong>Save data in variables<\/strong>: Assign data from your Google Sheets to variables in your Chatbot.<\/p>\n\n<p><strong>Redirect if no result<\/strong>: Redirect your user if none of the rows in your table match the above conditions.<\/p>\n\n<p>N.B.: <strong>Expert mode<\/strong> allows you to :<\/p>\n\n<ul class=\"wp-block-list\">\n<li>specify multiple fields in the <em>Select 1st line<\/em> block <em>, corresponding to the following conditions<\/em><strong>. <\/strong>This allows you to create AND \/ OR conditions.<\/li>\n\n\n\n<li>assign your variables more precisely. Column values can be retrieved via<em> [[GOOGLE_SHEET_XXX]<\/em> ] variables (where <em>XXX<\/em> corresponds to the column). <\/li>\n<\/ul>\n\n<h2 class=\"wp-block-heading\">5. Carousel<\/h2>\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"604\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/googlesheet_02_FR-1024x604-1.webp\" alt=\"\" class=\"wp-image-13104\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/googlesheet_02_FR-1024x604-1.webp 1024w, https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/googlesheet_02_FR-1024x604-1-300x177.webp 300w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n<p>The <strong>Carousel<\/strong> feature lets you generate a carousel from information in your Google Sheets.<\/p>\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"261\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/image-111-1024x261-1.png.webp.webp\" alt=\"\" class=\"wp-image-13105\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/image-111-1024x261-1.png.webp 1024w, https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/image-111-1024x261-1-300x76.png.webp 300w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"631\" height=\"800\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/image-104.webp\" alt=\"\" class=\"wp-image-13106\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/image-104.webp 631w, https:\/\/botnation.ai\/wp-content\/uploads\/2026\/01\/image-104-237x300.webp 237w\" sizes=\"(max-width: 631px) 100vw, 631px\" \/><\/figure>\n<\/div>\n<p><strong>Spreadsheet file<\/strong>: Select the Google Sheets file to be used.<\/p>\n\n<p><strong>Tab<\/strong>: Select the tab to be used<\/p>\n\n<p><strong>Select lines corresponding to the following conditions<\/strong>: Select the conditions to identify the lines to be retrieved.<\/p>\n\n<p><strong>Fill the carousel with information from your Google Sheet file<\/strong>: Create your carousel pages using information from your Google Sheet.<\/p>\n\n<p><strong>Redirect if no result<\/strong>: Redirect your user if none of the rows in your table match the above conditions.<\/p>\n\n<p>N.B.: <strong>Expert mode<\/strong> allows you to :<\/p>\n\n<ul class=\"wp-block-list\">\n<li>specify multiple fields in the <em>Select 1st line<\/em> block <em>, corresponding to the following conditions<\/em><strong>. <\/strong>This allows you to create AND \/ OR conditions.<\/li>\n\n\n\n<li>sort results by column in your Google Sheet<\/li>\n\n\n\n<li>limit the number of pages to be displayed in the carousel<\/li>\n\n\n\n<li>assign your variables more precisely. Column values can be retrieved via<em> [[GOOGLE_SHEET_XXX]<\/em> ] variables (where <em>XXX<\/em> corresponds to the column). <\/li>\n<\/ul>\n\n<h2 class=\"wp-block-heading\">6. Frequently asked questions (FAQ)<\/h2>\n\n<p><strong>The date saved in my Google Sheets file is not formatted or is incorrectly formatted.<\/strong><br>Check the display format of your cell. Choose the Date format or delete the formatting. <\/p>\n\n<p><strong>How long does it take to write to Google Sheets?<\/strong><br>This variable delay can take from 1 to a few seconds depending on Google\u2019s \u201cgood mood\u201d, which will depend on: the API load (number of operations in the processing queue), the replication of your data on their numerous servers, any limitations on the use of your Google account, etc\u2026<\/p>\n\n<p>Google Sheets isn\u2019t a professional CRM or database solution designed to store large volumes of data very quickly \u2013 it\u2019s an online spreadsheet. That\u2019s why we recommend that you don\u2019t rely too heavily on entries. <\/p>\n\n<p>You can read data from a Google Sheets document, manipulate it in your bot, then write a result to Google Sheets, but we don\u2019t recommend the opposite: writing data to Google Sheets and then immediately reading this data, as it may not yet be up to date at Google and could disrupt your chatbot\u2019s behavior.<\/p>\n\n<p>It\u2019s better to perform these operations in 2 steps, with a human action in between in your bot for example, such as a click on a button, which will leave a few seconds for Google to write and update your data.<\/p>\n\n<p>For more \u201cdynamic\u201d use, we recommend the<a href=\"https:\/\/botnation.ai\/fr\/support\/api-botnation-importer-et-exporter-des-donnees-par-webhook\/\">Botnation API<\/a>.<\/p>\n\n<p><strong>What does the \u201cmatch\u201d condition for line selection mean?<\/strong><br>The \u201cmatch\u201d condition is used to enter a regular expression that will be tested on the column value. This can be used, for example, to test whether the value contains a substring of characters. For example, the \u201cmatch\u201d condition with the value \u201cnation\u201d will return true for cells containing the text \u201cBot created by <strong>Botnation<\/strong>\u201d or \u201cchampionship of <strong>nations<\/strong>\u201c.<br>For further information on regular expressions, please refer to this documentation: <a href=\"https:\/\/developer.mozilla.org\/fr\/docs\/Web\/JavaScript\/Reference\/Objets_globaux\/RegExp\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/developer.mozilla.org\/fr\/docs\/Web\/JavaScript\/Reference\/Objets_globaux\/RegExp<\/a>  <\/p>\n\n<h2 class=\"wp-block-heading\">7. Video<\/h2>\n\n<p>Here\u2019s also a video we recommend you watch on integrating a Google Sheets document into your Botnation chatbot.<\/p>\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Connecter un chatbot \u00e0 Google Sheet\" width=\"780\" height=\"439\" src=\"https:\/\/www.youtube.com\/embed\/rZPI7RLAIDA?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n","protected":false},"featured_media":21275,"template":"","meta":{"_acf_changed":false},"categorie-support":[194,222,221],"class_list":["post-13116","support","type-support","status-publish","has-post-thumbnail","hentry","categorie-support-features","categorie-support-variables-en","categorie-support-web-chatbot-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/support\/13116","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/support"}],"about":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/types\/support"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/media\/21275"}],"wp:attachment":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/media?parent=13116"}],"wp:term":[{"taxonomy":"categorie-support","embeddable":true,"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/categorie-support?post=13116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}