🔷 Google Workspace
Endpoints: 79 | Auth: Service Account + Domain Delegation | Status: 🟢 Ativo
Service Account
| Atributo | Valor |
|---|---|
| stack-dss-automation@fourth-webbing-459322-c8.iam.gserviceaccount.com | |
| Client ID | 115741416758627943169 |
| Project | fourth-webbing-459322-c8 |
| Delegation | ✅ Ativo |
| Subject | davesena@dsscapital.com.br |
Scopes Configurados
https://www.googleapis.com/auth/drivehttps://www.googleapis.com/auth/gmail.readonlyhttps://www.googleapis.com/auth/gmail.modifyhttps://www.googleapis.com/auth/spreadsheetshttps://www.googleapis.com/auth/documentshttps://www.googleapis.com/auth/calendarhttps://www.googleapis.com/auth/contacts
APIs Disponíveis
Google Drive
| Endpoint | Método | Descrição |
|---|---|---|
/google-drive/files | GET | Listar arquivos |
/google-drive/files/{id} | GET | Detalhes do arquivo |
/google-drive/content/{id} | GET | Conteúdo do arquivo |
/google-drive/download/{id} | GET | Download do arquivo |
/google-drive/upload | POST | Upload de arquivo |
/google-drive/create-folder | POST | Criar pasta |
/google-drive/move | POST | Mover arquivo |
/google-drive/delete/{id} | DELETE | Deletar arquivo |
Google Sheets
| Endpoint | Método | Descrição |
|---|---|---|
/google-sheets/read/{id} | GET | Ler planilha |
/google-sheets/write/{id} | POST | Escrever dados |
/google-sheets/append/{id} | POST | Adicionar linhas |
/google-sheets/create | POST | Criar planilha |
Google Docs
| Endpoint | Método | Descrição |
|---|---|---|
/google-docs/read/{id} | GET | Ler documento |
/google-docs/create | POST | Criar documento |
/google-docs/update/{id} | POST | Atualizar documento |
Google Calendar
| Endpoint | Método | Descrição |
|---|---|---|
/google-calendar/events | GET | Listar eventos |
/google-calendar/event/{id} | GET | Detalhes do evento |
/google-calendar/create | POST | Criar evento |
/google-calendar/update/{id} | PUT | Atualizar evento |
Gmail
| Endpoint | Método | Descrição |
|---|---|---|
/gmail-api/messages | GET | Listar mensagens |
/gmail-api/message/{id} | GET | Ler mensagem |
/gmail-api/send | POST | Enviar email |
/gmail-api/labels | GET | Listar labels |
Exemplos de Uso
Listar Arquivos no Drive
curl -s https://porteiro.dsscapital.com.br/google-drive/files
Buscar Arquivo por Nome
curl -s "https://porteiro.dsscapital.com.br/google-drive/files?q=name%20contains%20'relatorio'"
Ler Planilha
curl -s https://porteiro.dsscapital.com.br/google-sheets/read/SPREADSHEET_ID?range=A1:D10
Upload de Arquivo
curl -X POST https://porteiro.dsscapital.com.br/google-drive/upload \
-H "Content-Type: application/json" \
-d '{
"name": "documento.txt",
"content": "base64_encoded_content",
"mimeType": "text/plain",
"folderId": "FOLDER_ID"
}'
Diretiva de Pastas
Estrutura organizada no Google Drive:
📁 Ecossistema DSS (11jiDlWOB2VHo_eYRrT2WNLa3QfoIcoc6)
├── 📁 01_ESTRATEGIA
├── 📁 02_OPERACOES
├── 📁 03_TECNOLOGIA
├── 📁 04_FINANCEIRO
├── 📁 05_JURIDICO
├── 📁 06_CLIENTES
├── 📁 07_COMUNICACAO
└── 📁 08_LOGS_SISTEMA
Ver mais em Diretiva de Pastas.