Pular para o conteúdo principal

🔷 Google Workspace

Endpoints: 79 | Auth: Service Account + Domain Delegation | Status: 🟢 Ativo

Service Account

AtributoValor
Emailstack-dss-automation@fourth-webbing-459322-c8.iam.gserviceaccount.com
Client ID115741416758627943169
Projectfourth-webbing-459322-c8
Delegation✅ Ativo
Subjectdavesena@dsscapital.com.br

Scopes Configurados

  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/gmail.readonly
  • https://www.googleapis.com/auth/gmail.modify
  • https://www.googleapis.com/auth/spreadsheets
  • https://www.googleapis.com/auth/documents
  • https://www.googleapis.com/auth/calendar
  • https://www.googleapis.com/auth/contacts

APIs Disponíveis

Google Drive

EndpointMétodoDescrição
/google-drive/filesGETListar arquivos
/google-drive/files/{id}GETDetalhes do arquivo
/google-drive/content/{id}GETConteúdo do arquivo
/google-drive/download/{id}GETDownload do arquivo
/google-drive/uploadPOSTUpload de arquivo
/google-drive/create-folderPOSTCriar pasta
/google-drive/movePOSTMover arquivo
/google-drive/delete/{id}DELETEDeletar arquivo

Google Sheets

EndpointMétodoDescrição
/google-sheets/read/{id}GETLer planilha
/google-sheets/write/{id}POSTEscrever dados
/google-sheets/append/{id}POSTAdicionar linhas
/google-sheets/createPOSTCriar planilha

Google Docs

EndpointMétodoDescrição
/google-docs/read/{id}GETLer documento
/google-docs/createPOSTCriar documento
/google-docs/update/{id}POSTAtualizar documento

Google Calendar

EndpointMétodoDescrição
/google-calendar/eventsGETListar eventos
/google-calendar/event/{id}GETDetalhes do evento
/google-calendar/createPOSTCriar evento
/google-calendar/update/{id}PUTAtualizar evento

Gmail

EndpointMétodoDescrição
/gmail-api/messagesGETListar mensagens
/gmail-api/message/{id}GETLer mensagem
/gmail-api/sendPOSTEnviar email
/gmail-api/labelsGETListar 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.