You can share the Google Sheet with your customers or team members, and they can refresh the data themselves by simply clicking the refresh button. They do not need to register for Superjoin or manage an API key on their own. All the logic and API authentication are handled within the sample Apps Script function, making the process seamless for anyone using the sheet.This feature allows you to:
Maintain control over the API key.
Ensure that customers can always access the latest data without needing to manually update it.
Avoid the need for additional Superjoin registrations for each customer.
The refresh functionality applies only to sheets where only the initial data pull was done using Superjoinโs Google Sheet Add on. Once data has been imported into a sheet via Superjoin, anyone the spreadsheet is shared with can refresh that data using the API key provided by the owner, ensuring easy and seamless updates.
To use this feature, you need to obtain an API key from Superjoin, by contacting us at support@superjoin.ai.
2
Store the API Key
To store your API key:
Open your target spreadsheet in Google Sheets
Navigate to Extensions > Apps Script
In the Apps Script editor, click the Settings icon in the left panel
Apps Script Editor
Scroll down to the Script Properties section
Click โAdd script propertyโ
Set the property name as โAPI_KEYโ
Set the value to the API key provided by Superjoin support
Apps Script Settings Tab
This securely stores your API key for use in the refresh function.
3
Create the Apps Script Function for Refreshing Data
In this step, we will create a function to refresh the data in the active Google Sheet.
The sheetId used in this function refers to the ID of the active sheet where the Apps Script editor is opened. This means the function will refresh data for the currently active sheet. If youโre working on a specific sheet in the editor, the refresh will be applied to that sheet alone.
In case you want to refresh multiple sheets, with a single click, you can use the follow the below instructions:Execute the below function to get all the sheet IDs along with their names, and then replace the sheetIds array with the sheet IDs you want to refresh in the refreshDataForMultipleSheets function.
Get All Sheet IDs
function getAllSheetIds() { var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets(); for (var i = 0; i < sheets.length; i++) { var sheet = sheets[i]; Logger.log(sheet.getSheetName() + ": " + sheet.getSheetId()); }}
Get All Sheet IDs output in Apps Script
Now paste the remaining code in the Apps Script editor:
Refresh Data for Multiple Sheets
function refreshDataForMultipleSheets() { const sheetIds = ["SHEET_ID_1", "SHEET_ID_2", ...]; // Replace with your sheet IDs const apiKey = PropertiesService.getScriptProperties().getProperty('API_KEY'); if (!apiKey) { Logger.log("Missing API Key"); return; } const spreadsheetId = SpreadsheetApp.getActiveSpreadsheet().getId(); for (let sheetId of sheetIds) { refreshData(apiKey, spreadsheetId, sheetId); }}function refreshData(apiKey, spreadsheetId, sheetId) { try { const BASE_URL = "https://api.superjoin.ai/public/v1"; const options = { method: "post", headers: { authorization: `Api-Key ${apiKey}`, }, contentType: 'application/json', payload: JSON.stringify({ spreadsheetId, sheetId, metadata: { userEmailAddress: Session.getActiveUser().getEmail(), } }) }; const response = UrlFetchApp.fetch(`${BASE_URL}/import/refresh-data`, options); if (response.getResponseCode() === 200) { Logger.log(`Data refresh initiated for Sheet ID: ${sheetId}`); } } catch (error) { Logger.log(`Error while refreshing data for Sheet ID ${sheetId}: ${error.message}`); }}
Do not forget to save the Apps Script file after making the changes, using the Floppy icon.
4
Insert a Button in the spreadsheet
Go to the Insert menu of the same spreadsheet. Select Drawing from the dropdown options. In the drawing editor, create a rectangle and add text, such as โRefresh Dataโ. You can customize the appearance as per your preference.
5
Assign the refresh function to the Button
After inserting the button, click on the three dots in the top-right corner of the button and select Assign Script. In the dialog box that appears, enter the name of the function (e.g., refreshData). Click OK to assign the function to the button.
In case, you are refreshing multiple sheets, use the script name as refreshDataForMultipleSheets
6
Run the Script ๐
Run the script throught the button you created in the first step, by clicking on it, and you will see the data is refreshed, in a few seconds or minutes (depends on the size of the data you have).
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Superjoin Docs","colors":{"primary":"#EE8245","light":"#EE8245","dark":"#EE8245"},"logo":{"light":"https://mintcdn.com/superjoin/dNa6MIx08W_Efkb9/logo/light.svg?fit=max\u0026auto=format\u0026n=dNa6MIx08W_Efkb9\u0026q=85\u0026s=742314b10d8444b5b8c18f2f97e2decd","dark":"https://mintcdn.com/superjoin/dNa6MIx08W_Efkb9/logo/dark.svg?fit=max\u0026auto=format\u0026n=dNa6MIx08W_Efkb9\u0026q=85\u0026s=a2fab640f4e4bd30c779e5510dec7bf0"},"favicon":"https://mintcdn.com/superjoin/7gRk5iUy86ROg5IF/favicon.svg?fit=max\u0026auto=format\u0026n=7gRk5iUy86ROg5IF\u0026q=85\u0026s=a1293183e706c2527f2b227f5fa86e33","appearance":{"default":"dark"},"background":{"decoration":"grid"},"navbar":{"links":[{"href":"mailto:support@superjoin.ai","label":"Help"}],"primary":{"type":"button","label":"Install \u0026 Launch","href":"https://app.superjoin.ai/?utm_campaign=docs\u0026utm_medium=referral\u0026utm_source=superjoin-docs"}},"footer":{"socials":{"website":"https://www.superjoin.ai","x":"https://x.com/superjoinai","linkedin":"https://www.linkedin.com/company/superjoin","youtube":"https://www.youtube.com/@superjoinai"}},"seo":{"indexing":"all"},"integrations":{"gtm":{"tagId":"GTM-NHXMH22B"},"hotjar":{"hjid":"5067915","hjsv":"6"},"posthog":{"apiKey":"phc_dDrgbMd5jm9oL0YHJSJu2V7YPrwerteM1NgVga8lKfN"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Install","icon":"arrow-up-right-from-square","href":"https://app.superjoin.ai/?utm_campaign=docs\u0026utm_medium=referral\u0026utm_source=superjoin-docs"},{"anchor":"Blogs","icon":"newspaper","href":"https://www.superjoin.ai/blog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"superjoin","hasAudioNarration":false,"actualSubdomain":"superjoin","customDomains":["docs.superjoin.ai"],"gitSource":{"type":"github","owner":"nowstackit","repo":"user-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6abfa37d6c2960b164699d96","collectionId":"0b101bdb-1350-4529-9467-3b9c186e4c25","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6abfa37d6c2960b164699d96"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6abfa37d6c2960b164699d96","clientVersion":"0.0.4021","searchFilterCounts":[{"language":"default","tag":"Integrations","count":160},{"language":"default","tag":"FAQs","count":56},{"language":"default","tag":"CRM","count":31},{"language":"default","tag":"Usecases","count":28},{"language":"default","tag":"Home","count":26},{"language":"default","tag":"Features","count":19},{"language":"default","tag":"Databases \u0026 Warehouses","count":18},{"language":"default","tag":"Imports","count":13},{"language":"default","tag":"Exports","count":12},{"language":"default","tag":"Salesforce","count":11}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"features/refresh-button","slug":"/features/refresh-button","pageMetadata":{"title":"Add Refresh Button in Sheets","icon":"arrows-rotate","description":null,"href":"/features/refresh-button"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{Card,CardGroup,Check,CodeBlock,Frame,Heading,Info,Note,OptimizedImage,Step,Steps}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!Check)_missingMdxReference(`Check`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);return _jsxs(_Fragment,{children:[_jsx(Check,{children:` Only available on Google Sheets `}),`\n`,_jsx(Heading,{level:`2`,id:`motivation`,children:`Motivation`}),`\n`,_jsx(_components.p,{children:`You can share the Google Sheet with your customers or team members, and they can refresh the data themselves by simply clicking the refresh button. They do not need to register for Superjoin or manage an API key on their own. All the logic and API authentication are handled within the sample Apps Script function, making the process seamless for anyone using the sheet.`}),`\n`,_jsx(_components.p,{children:`This feature allows you to:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Maintain control over the API key.`}),`\n`,_jsx(_components.li,{children:`Ensure that customers can always access the latest data without needing to manually update it.`}),`\n`,_jsx(_components.li,{children:`Avoid the need for additional Superjoin registrations for each customer.`}),`\n`]}),`\n`,_jsxs(Note,{children:[`The refresh functionality applies only to sheets where only the `,_jsx(`b`,{children:`initial`}),` data pull was done using Superjoinโs Google Sheet Add on. Once data has been imported into a sheet via Superjoin, anyone the spreadsheet is shared with can refresh that data using the API key provided by the owner, ensuring easy and seamless updates.`]}),`\n`,_jsx(Heading,{level:`2`,id:`step-by-step-guide`,children:`Step by Step Guide`}),`\n`,_jsxs(Steps,{titleSize:`h3`,children:[_jsx(Step,{title:`Get an API Key ๐`,id:`get-an-api-key-%F0%9F%94%91`,children:_jsxs(_components.p,{children:[`To use this feature, you need to obtain an API key from Superjoin, by contacting us at `,_jsx(_components.a,{href:`mailto:contact@superjoin.ai`,children:`support@superjoin.ai`}),`.`]})}),_jsxs(Step,{title:`Store the API Key`,id:`store-the-api-key`,children:[_jsx(_components.p,{children:`To store your API key:`}),_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Open your target spreadsheet in Google Sheets`}),`\n`,_jsxs(_components.li,{children:[`Navigate to `,_jsx(`b`,{children:`Extensions`}),` > `,_jsx(`b`,{children:`Apps Script`})]}),`\n`,_jsx(_components.li,{children:`In the Apps Script editor, click the Settings icon in the left panel`}),`\n`]}),_jsx(Frame,{caption:`Apps Script Editor`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/apps_script_editor_home.png?fit=max\u0026auto=format\u0026n=tR1QsuikxI8kxuAE\u0026q=85\u0026s=4d69d29a1a6f6689932f8e40ebfa41e2`,alt:`Apps Script Editor`,\"data-og-width\":`3360`,width:`3360`,\"data-og-height\":`2034`,height:`2034`,\"data-path\":`images/apps_script_editor_home.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/apps_script_editor_home.png?w=280\u0026fit=max\u0026auto=format\u0026n=tR1QsuikxI8kxuAE\u0026q=85\u0026s=cbed613fcbf6e8d203824038c75e3ad2 280w, https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/apps_script_editor_home.png?w=560\u0026fit=max\u0026auto=format\u0026n=tR1QsuikxI8kxuAE\u0026q=85\u0026s=0968f505bfb4f8bb2baf835f4789379a 560w, https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/apps_script_editor_home.png?w=840\u0026fit=max\u0026auto=format\u0026n=tR1QsuikxI8kxuAE\u0026q=85\u0026s=86248b91e022e05712f95fdbf35e28f5 840w, https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/apps_script_editor_home.png?w=1100\u0026fit=max\u0026auto=format\u0026n=tR1QsuikxI8kxuAE\u0026q=85\u0026s=d026d70fd166b83991021e08c6ab43e0 1100w, https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/apps_script_editor_home.png?w=1650\u0026fit=max\u0026auto=format\u0026n=tR1QsuikxI8kxuAE\u0026q=85\u0026s=06ec717c70e86d3123bad1df6af64138 1650w, https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/apps_script_editor_home.png?w=2500\u0026fit=max\u0026auto=format\u0026n=tR1QsuikxI8kxuAE\u0026q=85\u0026s=7fdf2912159dd83cd300c2d9cc963bb0 2500w`})}),_jsx(`br`,{}),_jsxs(_components.ol,{start:`4`,children:[`\n`,_jsx(_components.li,{children:`Scroll down to the Script Properties section`}),`\n`,_jsx(_components.li,{children:`Click โAdd script propertyโ`}),`\n`,_jsx(_components.li,{children:`Set the property name as โAPI_KEYโ`}),`\n`,_jsx(_components.li,{children:`Set the value to the API key provided by Superjoin support`}),`\n`]}),_jsx(Frame,{caption:`Apps Script Settings Tab`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/apps_script.png?fit=max\u0026auto=format\u0026n=tR1QsuikxI8kxuAE\u0026q=85\u0026s=355a13b0d9653bda8ca87450c2bec267`,alt:`Apps Script Settings`,\"data-og-width\":`3342`,width:`3342`,\"data-og-height\":`2032`,height:`2032`,\"data-path\":`images/apps_script.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/apps_script.png?w=280\u0026fit=max\u0026auto=format\u0026n=tR1QsuikxI8kxuAE\u0026q=85\u0026s=d13b723cd7ed1dde80521bea6eebd1ef 280w, https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/apps_script.png?w=560\u0026fit=max\u0026auto=format\u0026n=tR1QsuikxI8kxuAE\u0026q=85\u0026s=3613fbf290ed5417463645c37de0bd1c 560w, https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/apps_script.png?w=840\u0026fit=max\u0026auto=format\u0026n=tR1QsuikxI8kxuAE\u0026q=85\u0026s=4abca4215e3f00f534c6e9f38018e1f3 840w, https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/apps_script.png?w=1100\u0026fit=max\u0026auto=format\u0026n=tR1QsuikxI8kxuAE\u0026q=85\u0026s=f1cf6f820533ef5de25384fe08232318 1100w, https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/apps_script.png?w=1650\u0026fit=max\u0026auto=format\u0026n=tR1QsuikxI8kxuAE\u0026q=85\u0026s=402a31c49fc39169304f9b562e97248b 1650w, https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/apps_script.png?w=2500\u0026fit=max\u0026auto=format\u0026n=tR1QsuikxI8kxuAE\u0026q=85\u0026s=fed3ab516604ef1d0979fa9cc6aa0d72 2500w`})}),_jsx(_components.p,{children:`This securely stores your API key for use in the refresh function.`})]}),_jsxs(Step,{title:`Create the Apps Script Function for Refreshing Data`,id:`create-the-apps-script-function-for-refreshing-data`,children:[_jsx(_components.p,{children:`In this step, we will create a function to refresh the data in the active Google Sheet.`}),_jsx(Info,{children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`sheetId`}),` used in this function refers to the ID of the active sheet where the Apps Script editor is opened. This means the function will refresh data for the currently active sheet. If youโre working on a specific sheet in the editor, the refresh will be applied to that sheet alone.`]})}),_jsx(CodeBlock,{filename:`Refresh Data for Active Sheet`,numberOfLines:`33`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`33`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` refreshData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` apiKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` PropertiesService`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getScriptProperties`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getProperty`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Logger`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Missing API Key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` spreadsheetId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SpreadsheetApp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getActiveSpreadsheet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` sheetId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SpreadsheetApp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getActiveSpreadsheet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getActiveSheet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getSheetId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` BASE_URL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.superjoin.ai/public/v1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` options`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"post\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Api-Key \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` contentType:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` payload:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` spreadsheetId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sheetId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` metadata:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` userEmailAddress:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Session`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getActiveUser`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getEmail`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` identifier:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"EXTRA_IDENTIFIER\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` UrlFetchApp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`BASE_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"/import/refresh-data`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getResponseCode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`===`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Logger`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Data refresh initiated\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Logger`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`Error while refreshing data: \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`message`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`In case you want to refresh `,_jsx(`b`,{children:`multiple sheets`}),`, with a single click, you can use the follow the below instructions:`]}),_jsxs(_components.p,{children:[`Execute the below function to get all the sheet IDs along with their names, and then replace the sheetIds array with the sheet IDs you want to refresh in the `,_jsx(_components.code,{children:`refreshDataForMultipleSheets`}),` function.`]}),_jsx(CodeBlock,{filename:`Get All Sheet IDs`,numberOfLines:`7`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getAllSheetIds`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sheets`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SpreadsheetApp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getActiveSpreadsheet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getSheets`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` i`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`i`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sheets`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`length`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`i`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`++`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sheet`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sheets`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`i`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`];`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Logger`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sheet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getSheetName`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \": \"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sheet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getSheetId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(Frame,{caption:`Get All Sheet IDs output in Apps Script`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/superjoin/YLExbgl86h2tZ50q/images/get_all_sheet_ids.png?fit=max\u0026auto=format\u0026n=YLExbgl86h2tZ50q\u0026q=85\u0026s=27dacce3326f2a0f86ab063a8d45fa28`,alt:`Get All Sheet IDs`,\"data-og-width\":`3360`,width:`3360`,\"data-og-height\":`1916`,height:`1916`,\"data-path\":`images/get_all_sheet_ids.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/superjoin/YLExbgl86h2tZ50q/images/get_all_sheet_ids.png?w=280\u0026fit=max\u0026auto=format\u0026n=YLExbgl86h2tZ50q\u0026q=85\u0026s=942c51d438b6b8417e518e59890b2840 280w, https://mintcdn.com/superjoin/YLExbgl86h2tZ50q/images/get_all_sheet_ids.png?w=560\u0026fit=max\u0026auto=format\u0026n=YLExbgl86h2tZ50q\u0026q=85\u0026s=68f9edc116e5b2f6fddff507268f983c 560w, https://mintcdn.com/superjoin/YLExbgl86h2tZ50q/images/get_all_sheet_ids.png?w=840\u0026fit=max\u0026auto=format\u0026n=YLExbgl86h2tZ50q\u0026q=85\u0026s=4a7deec5427d12afb03bbe816710362d 840w, https://mintcdn.com/superjoin/YLExbgl86h2tZ50q/images/get_all_sheet_ids.png?w=1100\u0026fit=max\u0026auto=format\u0026n=YLExbgl86h2tZ50q\u0026q=85\u0026s=d4a850a897faeaa9adc3506c220a6c1f 1100w, https://mintcdn.com/superjoin/YLExbgl86h2tZ50q/images/get_all_sheet_ids.png?w=1650\u0026fit=max\u0026auto=format\u0026n=YLExbgl86h2tZ50q\u0026q=85\u0026s=b0811c62c1e17d9aa418101086dd3dbb 1650w, https://mintcdn.com/superjoin/YLExbgl86h2tZ50q/images/get_all_sheet_ids.png?w=2500\u0026fit=max\u0026auto=format\u0026n=YLExbgl86h2tZ50q\u0026q=85\u0026s=c887b4173a670bc857669465516c71c4 2500w`})}),_jsx(_components.p,{children:`Now paste the remaining code in the Apps Script editor:`}),_jsx(CodeBlock,{filename:`Refresh Data for Multiple Sheets`,numberOfLines:`41`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`41`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` refreshDataForMultipleSheets`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` sheetIds`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SHEET_ID_1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SHEET_ID_2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Replace with your sheet IDs`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` apiKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` PropertiesService`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getScriptProperties`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getProperty`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Logger`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Missing API Key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` spreadsheetId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SpreadsheetApp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getActiveSpreadsheet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sheetId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sheetIds`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` refreshData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`spreadsheetId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sheetId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` refreshData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`spreadsheetId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`sheetId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` BASE_URL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.superjoin.ai/public/v1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` options`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"post\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Api-Key \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` contentType:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` payload:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` spreadsheetId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sheetId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` metadata:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` userEmailAddress:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Session`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getActiveUser`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getEmail`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` UrlFetchApp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`BASE_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"/import/refresh-data`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getResponseCode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`===`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Logger`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`Data refresh initiated for Sheet ID: \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sheetId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Logger`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`Error while refreshing data for Sheet ID \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sheetId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`message`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`Do not forget to `,_jsx(`b`,{children:`save`}),` the Apps Script file after making the changes, using the Floppy icon. `,_jsx(OptimizedImage,{src:`https://mintcdn.com/superjoin/3kfktSzO4qKVejPu/images/save_apps_script.png?fit=max\u0026auto=format\u0026n=3kfktSzO4qKVejPu\u0026q=85\u0026s=4c00cc319cd851c7fd018e69fc2f09a9`,alt:`Floppy icon`,\"data-og-width\":`1098`,width:`1098`,\"data-og-height\":`82`,height:`82`,\"data-path\":`images/save_apps_script.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/superjoin/3kfktSzO4qKVejPu/images/save_apps_script.png?w=280\u0026fit=max\u0026auto=format\u0026n=3kfktSzO4qKVejPu\u0026q=85\u0026s=7ccbabc5265875edfa140d2ffc934f94 280w, https://mintcdn.com/superjoin/3kfktSzO4qKVejPu/images/save_apps_script.png?w=560\u0026fit=max\u0026auto=format\u0026n=3kfktSzO4qKVejPu\u0026q=85\u0026s=840f6ed32752267de9bc6c3a2e795bf4 560w, https://mintcdn.com/superjoin/3kfktSzO4qKVejPu/images/save_apps_script.png?w=840\u0026fit=max\u0026auto=format\u0026n=3kfktSzO4qKVejPu\u0026q=85\u0026s=38c78c31e515d59fdb64e70d09c33948 840w, https://mintcdn.com/superjoin/3kfktSzO4qKVejPu/images/save_apps_script.png?w=1100\u0026fit=max\u0026auto=format\u0026n=3kfktSzO4qKVejPu\u0026q=85\u0026s=a1fac9df4580660ad2c8674580e0ff20 1100w, https://mintcdn.com/superjoin/3kfktSzO4qKVejPu/images/save_apps_script.png?w=1650\u0026fit=max\u0026auto=format\u0026n=3kfktSzO4qKVejPu\u0026q=85\u0026s=6c264d6ab5c23bf0772f257fb747a335 1650w, https://mintcdn.com/superjoin/3kfktSzO4qKVejPu/images/save_apps_script.png?w=2500\u0026fit=max\u0026auto=format\u0026n=3kfktSzO4qKVejPu\u0026q=85\u0026s=368739ebdfc2aef075a82a9c0c2a1151 2500w`})]})]}),_jsxs(Step,{title:`Insert a Button in the spreadsheet`,id:`insert-a-button-in-the-spreadsheet`,children:[_jsxs(_components.p,{children:[`Go to the `,_jsx(`b`,{children:`Insert`}),` menu of the same spreadsheet. Select `,_jsx(`b`,{children:`Drawing`}),` from the dropdown options. In the drawing editor, create a rectangle and add text, such as โRefresh Dataโ. You can customize the appearance as per your preference.`]}),_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/superjoin/ZxJLQet0XJWypOF3/images/refresh-button-add/addRefreshButton.png?fit=max\u0026auto=format\u0026n=ZxJLQet0XJWypOF3\u0026q=85\u0026s=6c592dca41bdbb8e4e1c8d4565157861`,alt:`Insert Button`,\"data-og-width\":`1714`,width:`1714`,\"data-og-height\":`1251`,height:`1251`,\"data-path\":`images/refresh-button-add/addRefreshButton.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/superjoin/ZxJLQet0XJWypOF3/images/refresh-button-add/addRefreshButton.png?w=280\u0026fit=max\u0026auto=format\u0026n=ZxJLQet0XJWypOF3\u0026q=85\u0026s=88f6c8240b17898e72e3ea039603b721 280w, https://mintcdn.com/superjoin/ZxJLQet0XJWypOF3/images/refresh-button-add/addRefreshButton.png?w=560\u0026fit=max\u0026auto=format\u0026n=ZxJLQet0XJWypOF3\u0026q=85\u0026s=f58bb8f4818e6757b1e67e653cf0bffc 560w, https://mintcdn.com/superjoin/ZxJLQet0XJWypOF3/images/refresh-button-add/addRefreshButton.png?w=840\u0026fit=max\u0026auto=format\u0026n=ZxJLQet0XJWypOF3\u0026q=85\u0026s=3acc53cef972ab5c7dfec5fcb9d1b371 840w, https://mintcdn.com/superjoin/ZxJLQet0XJWypOF3/images/refresh-button-add/addRefreshButton.png?w=1100\u0026fit=max\u0026auto=format\u0026n=ZxJLQet0XJWypOF3\u0026q=85\u0026s=b13f7f591c38e9248a7bea86f609c892 1100w, https://mintcdn.com/superjoin/ZxJLQet0XJWypOF3/images/refresh-button-add/addRefreshButton.png?w=1650\u0026fit=max\u0026auto=format\u0026n=ZxJLQet0XJWypOF3\u0026q=85\u0026s=e6fb97054e01c98d3a52899d8f911002 1650w, https://mintcdn.com/superjoin/ZxJLQet0XJWypOF3/images/refresh-button-add/addRefreshButton.png?w=2500\u0026fit=max\u0026auto=format\u0026n=ZxJLQet0XJWypOF3\u0026q=85\u0026s=550a448eb2e37a8afb95f7a985d29ada 2500w`})})]}),_jsxs(Step,{title:`Assign the refresh function to the Button`,id:`assign-the-refresh-function-to-the-button`,children:[_jsxs(_components.p,{children:[`After inserting the button, click on the three dots in the top-right corner of the button and select `,_jsx(`b`,{children:`Assign Script`}),`. In the dialog box that appears, enter the name of the function (e.g., `,_jsx(_components.code,{children:`refreshData`}),`). Click `,_jsx(`b`,{children:`OK`}),` to assign the function to the button.`]}),_jsxs(Note,{children:[`In case, you are refreshing multiple sheets, use the script name as `,_jsx(_components.code,{children:`refreshDataForMultipleSheets`})]}),_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/superjoin/ZxJLQet0XJWypOF3/images/refresh-button-add/assignScript.png?fit=max\u0026auto=format\u0026n=ZxJLQet0XJWypOF3\u0026q=85\u0026s=a31cf990ed0f2d9cd5ef85602380b3fd`,alt:`Assign Script`,\"data-og-width\":`1711`,width:`1711`,\"data-og-height\":`1153`,height:`1153`,\"data-path\":`images/refresh-button-add/assignScript.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/superjoin/ZxJLQet0XJWypOF3/images/refresh-button-add/assignScript.png?w=280\u0026fit=max\u0026auto=format\u0026n=ZxJLQet0XJWypOF3\u0026q=85\u0026s=0fda4dc1b6bdde9609bec221f32a78fa 280w, https://mintcdn.com/superjoin/ZxJLQet0XJWypOF3/images/refresh-button-add/assignScript.png?w=560\u0026fit=max\u0026auto=format\u0026n=ZxJLQet0XJWypOF3\u0026q=85\u0026s=2c3ff37a4a1b03fb5868b3722c4c34b5 560w, https://mintcdn.com/superjoin/ZxJLQet0XJWypOF3/images/refresh-button-add/assignScript.png?w=840\u0026fit=max\u0026auto=format\u0026n=ZxJLQet0XJWypOF3\u0026q=85\u0026s=4d42315c775887b28879cad8be9eefc5 840w, https://mintcdn.com/superjoin/ZxJLQet0XJWypOF3/images/refresh-button-add/assignScript.png?w=1100\u0026fit=max\u0026auto=format\u0026n=ZxJLQet0XJWypOF3\u0026q=85\u0026s=20b8402bb9206d431ccb6ae40de4d749 1100w, https://mintcdn.com/superjoin/ZxJLQet0XJWypOF3/images/refresh-button-add/assignScript.png?w=1650\u0026fit=max\u0026auto=format\u0026n=ZxJLQet0XJWypOF3\u0026q=85\u0026s=245fe1a3d99fd2d02297d8c34fcc56f3 1650w, https://mintcdn.com/superjoin/ZxJLQet0XJWypOF3/images/refresh-button-add/assignScript.png?w=2500\u0026fit=max\u0026auto=format\u0026n=ZxJLQet0XJWypOF3\u0026q=85\u0026s=8907e55c9293067e754fcc01abc297bd 2500w`})})]}),_jsx(Step,{title:`Run the Script ๐`,id:`run-the-script-%F0%9F%8E%89`,children:_jsx(_components.p,{children:`Run the script throught the button you created in the first step, by clicking on it, and you will see the data is refreshed, in a few seconds or minutes (depends on the size of the data you have).`})})]}),`\n`,_jsx(CardGroup,{children:_jsx(Card,{title:`Need more help?`,children:_jsx(`p`,{children:_jsxs(_components.p,{children:[`If you need more help, you can always contact us at `,_jsx(_components.a,{href:`mailto:support@superjoin.ai`,children:`support@superjoin.ai`}),`.`]})})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Add Refresh Button in Sheets","icon":"arrows-rotate","description":null,"href":"/features/refresh-button"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Motivation","slug":"motivation","depth":2,"children":[]},{"title":"Step by Step Guide","slug":"step-by-step-guide","depth":2,"children":[{"title":"Get an API Key ๐","slug":"get-an-api-key-%F0%9F%94%91","depth":3,"children":[]},{"title":"Store the API Key","slug":"store-the-api-key","depth":3,"children":[]},{"title":"Create the Apps Script Function for Refreshing Data","slug":"create-the-apps-script-function-for-refreshing-data","depth":3,"children":[]},{"title":"Insert a Button in the spreadsheet","slug":"insert-a-button-in-the-spreadsheet","depth":3,"children":[]},{"title":"Assign the refresh function to the Button","slug":"assign-the-refresh-function-to-the-button","depth":3,"children":[]},{"title":"Run the Script ๐","slug":"run-the-script-%F0%9F%8E%89","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"superjoin","siteName":"Superjoin Docs","title":"Add Refresh Button in Sheets - Superjoin Docs","navMaps":{"firstHrefInVersion":{"v2.0":{"href":"/features/refresh-button","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-10-02T12:26:01.003Z","originalFileLocation":"features/refresh-button.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Superjoin Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/superjoin/YKIiXsfTkXhKCDwQ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/superjoin/YKIiXsfTkXhKCDwQ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/superjoin/YKIiXsfTkXhKCDwQ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/superjoin/YKIiXsfTkXhKCDwQ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/superjoin/YKIiXsfTkXhKCDwQ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/superjoin/YKIiXsfTkXhKCDwQ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/superjoin/YKIiXsfTkXhKCDwQ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/superjoin/YKIiXsfTkXhKCDwQ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/superjoin/YKIiXsfTkXhKCDwQ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Add Refresh Button in Sheets - Superjoin Docs\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Superjoin Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.superjoin.ai/features/refresh-button\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://superjoin.mintlify.app/_mintlify/api/og/v2?division=Features\u0026amp;title=Add+Refresh+Button+in+Sheets\u0026amp;theme=ffbdc2faf898722d21cbdba8\u0026amp;signature=963b4615950803a45df2cfc30843fb60552e738367ce47e15b4711d4279514e6\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Add Refresh Button in Sheets - Superjoin Docs\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://superjoin.mintlify.app/_mintlify/api/og/v2?division=Features\u0026amp;title=Add+Refresh+Button+in+Sheets\u0026amp;theme=ffbdc2faf898722d21cbdba8\u0026amp;signature=963b4615950803a45df2cfc30843fb60552e738367ce47e15b4711d4279514e6\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/superjoin/YKIiXsfTkXhKCDwQ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Superjoin Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#EE8245\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.superjoin.ai/features/refresh-button\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/features/refresh-button.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.superjoin.ai/#organization\",\"name\":\"Superjoin Docs\",\"url\":\"https://docs.superjoin.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/superjoin/dNa6MIx08W_Efkb9/logo/light.svg?fit=max\u0026auto=format\u0026n=dNa6MIx08W_Efkb9\u0026q=85\u0026s=742314b10d8444b5b8c18f2f97e2decd\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.superjoin.ai#website\",\"name\":\"Superjoin Docs\",\"url\":\"https://docs.superjoin.ai\",\"publisher\":{\"@id\":\"https://docs.superjoin.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.superjoin.ai/features/refresh-button#webpage\",\"url\":\"https://docs.superjoin.ai/features/refresh-button\",\"name\":\"Add Refresh Button in Sheets\",\"dateModified\":\"2026-10-02T12:26:01.003Z\",\"isPartOf\":{\"@id\":\"https://docs.superjoin.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.superjoin.ai/features/refresh-button#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.superjoin.ai/features/refresh-button#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Features\",\"item\":\"https://docs.superjoin.ai/features/exports\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Add Refresh Button in Sheets\",\"item\":\"https://docs.superjoin.ai/features/refresh-button\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.superjoin.ai/features/refresh-button#article\",\"headline\":\"Add Refresh Button in Sheets\",\"name\":\"Add Refresh Button in Sheets\",\"url\":\"https://docs.superjoin.ai/features/refresh-button\",\"mainEntityOfPage\":{\"@id\":\"https://docs.superjoin.ai/features/refresh-button#webpage\"},\"dateModified\":\"2026-10-02T12:26:01.003Z\",\"publisher\":{\"@id\":\"https://docs.superjoin.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.superjoin.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Superjoin Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Superjoin Docs","nav":{"global":{"anchors":[{"anchor":"Install","icon":"arrow-up-right-from-square","href":"https://app.superjoin.ai/?utm_campaign=docs\u0026utm_medium=referral\u0026utm_source=superjoin-docs"},{"anchor":"Blogs","icon":"newspaper","href":"https://www.superjoin.ai/blog"}]},"versions":[{"version":"v2.0","tabs":[{"tab":"Home","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","icon":"rocket","iconType":"duotone","href":"/introduction"},{"title":"Quickstart","icon":"flag-checkered","iconType":"duotone","href":"/quickstart"},{"title":"AI Copilot Quickstart","icon":"flag-checkered","iconType":"duotone","href":"/ai-copilot-quickstart"},{"sidebarTitle":"Troubleshooting","title":"Common Issues while launching Superjoin","icon":"life-ring","iconType":"duotone","href":"/issues-launching-superjoin"},{"sidebarTitle":"Superjoin + Google Sheets","title":"Superjoin ๐ Google Sheets","icon":"table-cells","iconType":"duotone","href":"/superjoin-gsheets"},{"sidebarTitle":"Superjoin + Microsoft Excel","title":"Superjoin ๐ Microsoft Excel","icon":"table-cells","iconType":"duotone","href":"/superjoin-excel"},{"sidebarTitle":"Common Use Cases","title":"What you can do with Superjoin","icon":"lightbulb","iconType":"duotone","href":"/common-usecases"}]},{"group":"Features","pages":[{"sidebarTitle":"Export Data","title":"What's your Export goal?","icon":"upload","href":"/features/exports"},{"sidebarTitle":"Scheduled Imports","title":"Scheduled Data Imports","icon":"clock-rotate-left","href":"/features/scheduled-refresh"},{"sidebarTitle":"Share with Teammates","title":"Share Connection with Your Teammates","icon":"share-nodes","href":"/features/share-source-connection"},{"sidebarTitle":"Formula Auto Filldown","title":"Formula Auto Filldown","icon":"function","iconType":"duotone","href":"/features/formulae-filldown"},{"sidebarTitle":"SUPERGPT Functions","title":"SUPERGPT Functions for Sheets","icon":"star","href":"/tlg/GPTFunctions"},{"sidebarTitle":"MCP Integration","title":"Model Control Protocol (MCP) for Copilot","icon":"robot","href":"/copilot/CopilotMCP"},{"group":"Send Alerts on Slack/Email","icon":{"style":"duotone","name":"bell"},"pages":[{"sidebarTitle":"Workflows \u0026 Email Alerts","title":"Automate Google Sheets Using Workflows","icon":"diagram-project","iconType":"duotone","href":"/workflows/introduction"},{"sidebarTitle":"Slack Alerts","title":"Send Google Sheet snapshots to Slack automatically","description":"Connect Slack to Google Sheets in a few clicks","icon":"slack","iconType":"duotone","href":"/workflows/slack"}]},{"title":"Add Refresh Button in Sheets","icon":"arrows-rotate","href":"/features/refresh-button"},{"group":"Saved SQL Queries","icon":"database","pages":[{"sidebarTitle":"Create SQL Queries","title":"Create custom SQL queries","description":"Learn how to create custom queries in Superjoin with a comprehensive guide. This section covers various methods, including writing SQL queries, using the Visual SQL Builder, and generating queries with AI. Follow the step-by-step instructions to import and manage your data effectively, ensuring a smooth setup and optimal data analysis.","icon":"pen-to-square","href":"/features/queries/create-queries"},{"sidebarTitle":"Share SQL Queries","title":"Share custom SQL queries","icon":"share-nodes","href":"/features/queries/share-queries"}]},{"group":"Derived Columns","icon":"Table","pages":[{"sidebarTitle":"Overview \u0026 Setup","title":"Derived Columns","href":"/features/derived-columns/overview"},{"sidebarTitle":"Operators","title":"Derived Columns Operators","icon":"plus-minus","href":"/features/derived-columns/operators"},{"sidebarTitle":"Mathematical Functions","title":"Derived Columns Mathematical Functions","icon":"calculator","href":"/features/derived-columns/mathematical-functions"},{"sidebarTitle":"String Functions","title":"Derived Columns String Functions","icon":"text","href":"/features/derived-columns/string-functions"},{"sidebarTitle":"Date Functions","title":"Derived Columns Date Functions","icon":"calendar","href":"/features/derived-columns/date-functions"},{"sidebarTitle":"Logical Functions","title":"Derived Columns Logical Functions","icon":"filter","href":"/features/derived-columns/logical-functions"},{"sidebarTitle":"Examples","title":"Derived Columns Examples","icon":"play","href":"/features/derived-columns/examples"}]},{"sidebarTitle":"Flashbacks","title":"Flashbacks","icon":"bolt","href":"/features/flashbacks"}]}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/summary"}]},{"tab":"Usecases","pages":[{"title":"Usecases","href":"/usecases/build-dynamic-dashboard-google-sheets-superjoin"}]},{"tab":"FAQs","pages":[{"title":"FAQs","href":"/faqs/missing-data-superjoin-preview"}]},{"tab":"Glossary","pages":[{"title":"Glossary","href":"/glossary/superjoin-terminology-glossary"}]},{"tab":"Superjoin APIs","pages":[{"title":"Superjoin APIs","href":"/superjoin-apis/authorization"}]}]}]},"title":"Add Refresh Button in Sheets - Superjoin Docs","buildId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","deploymentId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-CIbhtp2j.js","DynamicMarkdown-CtpgKJwj.js","zoom-image-lightbox-CVZVK4hN.js","lightbox-handle-r17bVUz3.js"]}