Google OAuth2 generic
이 문서는 커스텀 작업에 사용할 일반 Google OAuth2 API 자격증명을 생성하는 방법을 설명합니다. n8n 자격증명을 Google 서비스에 연결하려면 다섯 가지 단계가 필요합니다: 먼저 Google Cloud Console 프로젝트를 생성합니다.
이 문서는 커스텀 작업에 사용할 일반 Google OAuth2 API 자격증명을 생성하는 방법을 설명합니다.
- Google Calendar
- Google Calendar Trigger
- Google Contacts
- Google Docs
- Google Drive
- Google Drive Trigger
- Google Mail
- Google Mail Trigger
- Google Sheets
- Google Sheets Trigger
- Google Slides
- Google Tasks
사전 요구사항#
- Google Cloud 계정을 생성합니다.
OAuth 설정#
n8n 자격증명을 Google 서비스에 연결하려면 다섯 가지 단계가 필요합니다:
Google Cloud Console 프로젝트 생성#
먼저 Google Cloud Console 프로젝트를 생성합니다. 이미 프로젝트가 있다면 다음 섹션으로 건너뛰세요:
-
Google 계정으로 Google Cloud Console에 로그인합니다.
-
상단 메뉴에서 상단 내비게이션의 프로젝트 드롭다운을 선택하고 새 프로젝트를 선택하거나, 새 프로젝트 페이지로 직접 이동합니다.
-
프로젝트 이름을 입력하고 프로젝트의 위치(조직 및/또는 상위 리소스)를 선택합니다.
-
만들기를 선택합니다.
-
상단 내비게이션을 확인하여 프로젝트 드롭다운에 방금 생성한 프로젝트가 선택되어 있는지 확인합니다. 그렇지 않으면 방금 생성한 프로젝트를 선택합니다.
 Google Cloud 상단 내비게이션의 프로젝트 드롭다운 확인
API 활성화#
프로젝트를 생성했으면 필요한 API를 활성화합니다:
- Google Cloud Console - 라이브러리에 접속합니다. 올바른 프로젝트에 있는지 확인하세요.
 Google Cloud 상단 내비게이션의 프로젝트 드롭다운 확인 - API 및 서비스 > 라이브러리로 이동합니다.
- 활성화하려는 API를 검색하고 선택합니다. 예를 들어 Gmail 노드의 경우 Gmail API를 검색하여 활성화합니다.
- 일부 연동은 다른 API가 필요하거나 접근 권한 요청이 필요합니다:
- Google Perspective: API 접근 권한 요청.
- Google Ads: 개발자 토큰 발급 필요.
다음 연동은 자체 API 외에 Google Drive API도 필요합니다:
* Google Docs
* Google Sheets
* Google Slides
Vertex AI API 외에도 Cloud Resource Manager API를 활성화해야 합니다.
- 사용 설정을 선택합니다.
OAuth 동의 화면 구성#
Google Cloud 프로젝트에서 OAuth를 처음 사용하는 경우 OAuth 동의 화면을 구성해야 합니다:
- Google Cloud Console - Library에 접속합니다. 올바른 프로젝트인지 확인하세요.
 Google Cloud 상단 네비게이션의 프로젝트 드롭다운을 확인하세요 - 왼쪽 네비게이션 메뉴를 열고 APIs & Services > OAuth consent screen으로 이동합니다. Google이 Google Auth Platform 개요 페이지로 리디렉션합니다.
- Overview 탭에서 Get started를 선택하여 OAuth 동의 구성을 시작합니다.
- OAuth 화면에 표시할 App name과 User support email을 입력합니다. Next를 선택하여 계속합니다.
- Audience에서 조직의 Google 워크스페이스 내 사용자 접근을 위해 Internal을, Google 계정이 있는 모든 사용자를 위해 External을 선택합니다. 사용자 유형에 대한 자세한 내용은 Google의 User type 문서를 참조하세요. Next를 선택하여 계속합니다.
- 프로젝트 변경 사항 알림에 사용할 Email addresses를 선택합니다. Next를 선택하여 계속합니다.
- Google의 User Data Policy를 읽고 동의합니다. Continue를 선택한 후 Create를 선택합니다.
- 왼쪽 메뉴에서 Branding을 선택합니다.
- Authorized domains 섹션에서 Add domain을 선택합니다:
- n8n Cloud 서비스를 사용하는 경우
n8n.cloud를 추가합니다. - 셀프 호스팅을 사용하는 경우 n8n 인스턴스의 도메인을 추가합니다.
- n8n Cloud 서비스를 사용하는 경우
- 페이지 하단에서 Save를 선택합니다.
Google OAuth 클라이언트 자격증명 생성#
다음으로 Google에서 OAuth 클라이언트 자격증명을 생성합니다:
- Google Cloud Console에 접속합니다. 올바른 프로젝트인지 확인하세요.
- APIs & Services 섹션에서 Credentials를 선택합니다.
- + Create credentials > OAuth client ID를 선택합니다.
- Application type 드롭다운에서 Web application을 선택합니다.
- Google이 자동으로 Name을 생성합니다. 콘솔에서 알아볼 수 있도록 Name을 수정합니다.
- n8n 자격증명에서 OAuth Redirect URL을 복사합니다. 이를 Google Console의 Authorized redirect URIs에 붙여넣습니다.
- Create를 선택합니다.
n8n 자격증명 완료#
Google 프로젝트와 자격증명 설정이 완료되면 n8n 자격증명을 마무리합니다:
- Google의 OAuth client created 모달에서 Client ID를 복사합니다. 이를 n8n 자격증명에 입력합니다.
- 같은 Google 모달에서 Client Secret을 복사합니다. 이를 n8n 자격증명에 입력합니다.
- 이 자격증명에 사용할 스코프를 지정해야 합니다. 자세한 내용은 Scopes를 참조하세요. 여러 스코프는 공백으로 구분하여 입력합니다. 예:
https://www.googleapis.com/auth/gmail.labels https://www.googleapis.com/auth/gmail.addons.current.action.compose - n8n에서 Sign in with Google을 선택하여 Google 인증을 완료합니다.
- 새 자격증명을 Save합니다.
동영상#
아래 동영상은 위에서 설명한 단계를 시연합니다:
Scopes#
Google 서비스에는 하나 이상의 접근 스코프가 있습니다. 스코프는 사용자가 수행할 수 있는 작업을 제한합니다. 모든 서비스의 스코프 목록은 OAuth 2.0 Scopes for Google APIs를 참조하세요.
n8n은 모든 스코프를 지원하지는 않습니다. 일반 Google OAuth2 API 자격증명을 생성할 때 아래 지원되는 스코프 목록에서 스코프를 입력할 수 있습니다. n8n이 아직 지원하지 않는 스코프를 입력하면 작동하지 않습니다.
지원되는 스코프
| 서비스 | 사용 가능한 스코프 |
|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Gmail | <ul><li>`https://www.googleapis.com/auth/gmail.labels`</li><li>`https://www.googleapis.com/auth/gmail.addons.current.action.compose`</li><li>`https://www.googleapis.com/auth/gmail.addons.current.message.action`</li><li>`https://mail.google.com/`</li><li>`https://www.googleapis.com/auth/gmail.modify`</li><li>`https://www.googleapis.com/auth/gmail.compose`</li></ul> |
| Google Ads | <ul><li>`https://www.googleapis.com/auth/adwords`</li></ul> |
| Google Analytics | <ul><li>`https://www.googleapis.com/auth/analytics`</li><li>`https://www.googleapis.com/auth/analytics.readonly`</li></ul> |
| Google BigQuery | <ul><li>`https://www.googleapis.com/auth/bigquery`</li></ul> |
| Google Books | <ul><li>`https://www.googleapis.com/auth/books`</li></ul> |
| Google Calendar | <ul><li>`https://www.googleapis.com/auth/calendar`</li><li>`https://www.googleapis.com/auth/calendar.events`</li></ul> |
| Google Cloud<br> Natural Language | <ul><li>`https://www.googleapis.com/auth/cloud-language`</li><li>`https://www.googleapis.com/auth/cloud-platform`</li></ul> |
| Google Cloud<br>Storage | <ul><li>`https://www.googleapis.com/auth/cloud-platform`</li><li>`https://www.googleapis.com/auth/cloud-platform.read-only`</li><li>`https://www.googleapis.com/auth/devstorage.full_control`</li><li>`https://www.googleapis.com/auth/devstorage.read_only`</li><li>`https://www.googleapis.com/auth/devstorage.read_write`</li></ul> |
| Google Contacts | <ul><li>`https://www.googleapis.com/auth/contacts`</li></ul> |
| Google Docs | <ul><li>`https://www.googleapis.com/auth/documents`</li><li>`https://www.googleapis.com/auth/drive`</li><li>`https://www.googleapis.com/auth/drive.file`</li></ul> |
| Google Drive | <ul><li>`https://www.googleapis.com/auth/drive`</li><li>`https://www.googleapis.com/auth/drive.appdata`</li><li>`https://www.googleapis.com/auth/drive.photos.readonly`</li></ul> |
| Google Firebase<br>Cloud Firestore | <ul><li>`https://www.googleapis.com/auth/datastore`</li><li>`https://www.googleapis.com/auth/firebase`</li></ul> |
| Google Firebase<br>Realtime Database | <ul><li>`https://www.googleapis.com/auth/userinfo.email`</li><li>`https://www.googleapis.com/auth/firebase.database`</li><li>`https://www.googleapis.com/auth/firebase`</li></ul> |
| Google Perspective | <ul><li>`https://www.googleapis.com/auth/userinfo.email`</li></ul> |
| Google Sheets | <ul><li>`https://www.googleapis.com/auth/drive.file`</li><li>`https://www.googleapis.com/auth/spreadsheets`</li></ul> |
| Google Slide | <ul><li>`https://www.googleapis.com/auth/drive.file`</li><li>`https://www.googleapis.com/auth/presentations`</li></ul> |
| Google Tasks | <ul><li>`https://www.googleapis.com/auth/tasks`</li></ul> |
| Google Translate | <ul><li>`https://www.googleapis.com/auth/cloud-translation`</li></ul> |
| GSuite Admin | <ul><li>`https://www.googleapis.com/auth/admin.directory.group`</li><li>`https://www.googleapis.com/auth/admin.directory.user`</li><li>`https://www.googleapis.com/auth/admin.directory.domain.readonly`</li><li>`https://www.googleapis.com/auth/admin.directory.userschema.readonly`</li></ul> |
문제 해결#
Google hasn't verified this app#
OAuth 인증 방식을 사용하는 경우 Google이 이 앱을 확인하지 않았습니다라는 경고가 표시될 수 있습니다. 이를 방지하려면:
- 앱의 사용자 유형이 내부인 경우, 인증하려는 계정과 동일한 계정에서 OAuth 자격증명을 생성하세요.
- 앱의 사용자 유형이 외부인 경우, 앱의 테스터 목록에 이메일을 추가할 수 있습니다: 대상 페이지로 이동하여 로그인하는 이메일을 테스트 사용자 목록에 추가하세요.
다른 계정(개발자 또는 제3자)이 생성한 자격증명을 사용해야 하는 경우, Google Cloud 문서 | 승인 오류: Google이 이 앱을 확인하지 않았습니다의 안내를 따르세요.
Google Cloud app becoming unauthorized#
게시 상태가 테스트로 설정되고 사용자 유형이 외부로 설정된 Google Cloud 앱의 경우, 동의 및 토큰은 7일 후에 만료됩니다. 자세한 내용은 Google Cloud Platform Console 도움말 | OAuth 동의 화면 설정을 참고하세요. 이 문제를 해결하려면 n8n 자격증명 모달에서 앱을 다시 연결하세요.
