스크립트 프로젝트는 Google Apps Script의 파일 및 리소스 모음을 나타내며, 간단히 '스크립트'라고도 합니다. 스크립트 프로젝트에는 하나 이상의 스크립트 파일이 있으며, 이는 코드 파일 (.gs 확장자) 또는 HTML 파일 (.html 확장자)일 수 있습니다. HTML 파일에 JavaScript와 CSS를 포함할 수도 있습니다.
스크립트 편집기에는 항상 하나의 프로젝트만 열려 있습니다.
여러 브라우저 창이나 탭에서 여러 프로젝트를 열 수 있습니다.
프로젝트 생성 및 삭제
이 섹션에서는 독립형 또는 컨테이너 바운드 Apps Script 프로젝트를 만들고 삭제하는 방법을 설명합니다.
Apps Script에서 코드 파일을 가져오려면 각 파일의 코드를 원하는 텍스트 편집기에 복사하여 붙여넣거나 명령줄에서 clasp를 사용하면 됩니다.
clasp를 사용하려면 스크립트 프로젝트 다운로드를 참고하세요.
프로젝트의 시간대 설정
Apps Script 프로젝트의 시간대를 설정할 수 있습니다. 스크립트에서 실행하는 함수는 이 시간대를 사용합니다.
Apps Script 프로젝트를 엽니다.
왼쪽에서 프로젝트 설정을 클릭합니다.
시간대 섹션에서 사용할 시간대를 선택합니다.
특정 함수가 스크립트 프로젝트와 다른 시간대를 사용하도록 하려면 함수에 시간대를 명시적으로 입력하세요. 예를 들어 아래 샘플에서 각 함수는 Google Calendar에 새 일정을 만듭니다. 첫 번째 함수는 기본적으로 프로젝트 시간대로 설정됩니다. 두 번째 함수는 태평양 표준시 시간대를 지정하므로 프로젝트의 시간대와 관계없이 이벤트가 태평양 표준시로 예약됩니다.
functioncreateEvent(){//Createsaneventinthescriptproject's time zone and logs the IDvarevent=CalendarApp.getDefaultCalendar().createEvent('New test event',newDate('December 20, 2022 17:00:00'),newDate('December 20, 2022 18:00:00'));console.log('Event ID: '+event.getId());}functioncreateEventPacific(){//CreatesaneventwithaspecifiedtimezoneandlogstheeventID.varevent=CalendarApp.getDefaultCalendar().createEvent('New sample event',newDate('December 20, 2022 17:00:00 PDT'),newDate('December 20, 2022 18:00:00 PDT'));console.log('Event ID: '+event.getId());}
여러 Google 계정 관련 문제 해결하기
동시에 여러 Google 계정에 로그인된 경우 부가기능 및 웹 앱 액세스 문제가 발생할 수 있습니다.
Apps Script, 부가기능, 웹 앱에서는 멀티 로그인, 즉 동시에 여러 Google 계정에 로그인하는 기능이 지원되지 않습니다.
여러 계정에 로그인한 상태에서 Apps Script 편집기를 열면 Google에서 계속 진행할 계정을 선택하라는 메시지가 표시됩니다.
웹 앱 또는 부가기능을 열 때 멀티 로그인 문제가 발생하는 경우 다음 해결 방법 중 하나를 시도해 보세요.
모든 Google 계정에서 로그아웃하고 액세스하려는 부가기능 또는 웹 앱이 있는 계정으로만 로그인합니다.
Chrome의 시크릿 창 또는 이와 유사한 시크릿 브라우징 창을 열고 액세스하려는 부가기능 또는 웹 앱이 있는 Google 계정에 로그인합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eAn Apps Script project is a collection of files and resources, including code (\u003ccode\u003e.gs\u003c/code\u003e) and HTML (\u003ccode\u003e.html\u003c/code\u003e) files, that can be created as standalone entities or bound to Google Workspace documents.\u003c/p\u003e\n"],["\u003cp\u003eProjects can be created and deleted through the Apps Script editor, Google Drive, or specific Google Workspace applications like Docs, Sheets, Slides, and Forms.\u003c/p\u003e\n"],["\u003cp\u003eUsers can manage files within their projects, including creating, deleting, and exporting them, as well as setting the project's time zone.\u003c/p\u003e\n"],["\u003cp\u003ePotential issues arising from multiple Google Account logins can be mitigated by selecting the appropriate account or using private browsing modes.\u003c/p\u003e\n"]]],[],null,["# Script Projects\n\nA script project represents a collection of files and resources in\nGoogle Apps Script, sometimes referred to simply as \"a script\". A script project\nhas one or more script files which can either be code files (having a `.gs`\nextension) or HTML files (a `.html` extension). You can also include\nJavaScript and CSS in HTML files.\n\nThe script editor always has one and only one project opened at any given time.\nYou can open multiple projects in multiple browser windows or tabs.\n\nCreate and delete projects\n--------------------------\n\nThis section explains how to create and delete standalone or\ncontainer-bound Apps Script projects.\n\n### Create a standalone project\n\nTo create a standalone project from Apps Script:\n\n1. Go to [`script.google.com`](https://script.google.com/).\n2. Click add **New Project**.\n3. In the script editor, click **Untitled project**.\n4. Give your project a name and click **Rename**.\n\n### Create a standalone project from Google Drive\n\n1. Open [Google Drive](https://drive.google.com/).\n2. Click **New** \\\u003e **More** \\\u003e **Google Apps Script**.\n\n### Create a container-bound project from Google Docs, Sheets, or Slides\n\n1. Open a Docs document, a Sheets spreadsheet, or Slides presentation.\n2. Click **Extensions** \\\u003e **Google Apps Script**.\n3. In the script editor, click **Untitled project**.\n4. Give your project a name and click **Rename**.\n\n### Create a container-bound project from Google Forms\n\n1. Open a form in Google Forms.\n2. Click More more_vert \\\u003e **Script editor**.\n3. In the script editor, click **Untitled project**.\n4. Give your project a name and click **Rename**.\n\n### Create a standalone project using the `clasp` command line tool\n\n`clasp` is a command line tool that allows you create, pull/push, and deploy Apps\nScript projects from a terminal.\n\nSee the [Command Line Interface using `clasp` guide](/apps-script/guides/clasp)\nfor more details.\n\n### Delete a container-bound project\n\n| **Warning:** Once you delete a container-bound Apps Script project, it can't be recovered.\n\n1. Open your container-bound project using the appropriate method above.\n2. At the top left, click **Overview** info_outline.\n3. At the top right, click Remove delete \\\u003e **Delete forever**.\n\n| Only the owner of the container can see the deletion menu options.\n\n### Delete a standalone project\n\n1. Go to [`script.google.com`](https://script.google.com/).\n2. At the right of the project you want to delete, click More more_vert \\\u003e **Remove** \\\u003e **Remove**.\n\nManage files in a project\n-------------------------\n\n### Create a file\n\n1. Open your Apps Script project.\n2. At the left, click **Editor** code \\\u003e Add add.\n3. Select the type of file to create and give it a name.\n\n### Delete a file\n\n| Deleted files can't be recovered.\n\n1. Open your Apps Script project.\n2. At the left, click **Editor** code.\n3. Next to the file you want to delete, click More more_vert \\\u003e **Delete**.\n\n### Export files out of an Apps Script project\n\nTo take code files out of Apps Script, you can either copy and paste the code\nfrom each file into your preferred text editor or use clasp on the command line.\nTo use clasp, refer to [download a\nscript project](/apps-script/guides/clasp#download_a_script_project).\n\nSet the time zone for a project\n-------------------------------\n\nYou can set the time zone for an Apps Script project. Functions performed by the\nscript use this time zone.\n\n1. Open your Apps Script project.\n2. At the left, click **Project Settings** .\n3. In the **Time zone** section, select the time zone you want to use.\n\nIf you want a specific function to use a different time zone than the script\nproject's, explicitly enter the time zone in your function. For example, in the\nbelow sample, each function creates a new event in Google Calendar. The first\nfunction defaults to the project time zone. The second function specifies the\nPacific time zone, so the event is scheduled in Pacific time, regardless of the\nproject's time zone. \n\n function createEvent(){\n // Creates an event in the script project's time zone and logs the ID\n var event = CalendarApp.getDefaultCalendar().createEvent('New test event',\n new Date('December 20, 2022 17:00:00'),\n new Date('December 20, 2022 18:00:00'));\n console.log('Event ID: ' + event.getId());\n }\n function createEventPacific(){\n // Creates an event with a specified time zone and logs the event ID.\n var event = CalendarApp.getDefaultCalendar().createEvent('New sample event',\n new Date('December 20, 2022 17:00:00 PDT'),\n new Date('December 20, 2022 18:00:00 PDT'));\n console.log('Event ID: ' + event.getId());\n }\n\nFix issues with multiple Google Accounts\n----------------------------------------\n\nIf you're logged into multiple Google Accounts at the same time, you might\nhave trouble accessing your add-ons and web apps.\nMulti-login, or\nbeing logged into multiple Google Accounts at once, isn't supported for Apps\nScript, add-ons, or web apps.\n\n- **If you open the Apps Script editor** while logged in to more than one account,\n Google prompts\n you to choose the account you want to proceed with.\n\n- **If you open a web app or add-on** and experience multi-login issues, try one of\n the following solutions:\n\n - Log out of all your Google Accounts and only log in to the one that has the add-on or web app you want to access.\n - Open an incognito window in Google Chrome, or an equivalent private browsing window, and log in to the Google Account that has the add-on or web app you want to access."]]