npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

n8n-nodes-schia

v0.1.15

Published

n8n community node for Schia scheduling system integration

Readme

n8n-nodes-schia

npm version License: MIT

Este é um node customizado para n8n que permite integração completa com o sistema de agendamentos Schia.

n8n é uma plataforma de automação de workflows com licença fair-code.

📋 Índice

🚀 Instalação

Instalação via npm (Recomendado)

npm install -g n8n-nodes-schia

Após a instalação, reinicie o n8n:

# Se usar pm2
pm2 restart n8n

# Se usar systemctl
systemctl restart n8n

# Se executar manualmente
n8n start

Para mais detalhes, consulte o guia de instalação completo.

🔧 Operações

Este node oferece 6 operações principais:

1. Buscar Cliente por WhatsApp

Busca informações de um cliente pelo número de telefone do WhatsApp.

Parâmetros:

  • phoneNumber (obrigatório): Número de telefone formatado
  • tenantId (obrigatório): ID do tenant/instância
  • allowInternational (opcional): Permitir números internacionais

2. Cadastrar Cliente

Cadastra um novo cliente no sistema.

Parâmetros:

  • name (obrigatório): Nome do cliente
  • phone (obrigatório): Telefone do cliente
  • email (opcional): Email do cliente

3. Cadastrar Agendamento

Cria um novo agendamento para um cliente.

Parâmetros:

  • clientId (obrigatório): ID do cliente
  • serviceId (obrigatório): ID do serviço
  • date (obrigatório): Data (YYYY-MM-DD)
  • time (obrigatório): Horário (HH:MM)

4. Buscar Agendamentos Futuros

Busca todos os agendamentos futuros de um cliente.

Parâmetros:

  • clientId (obrigatório): ID do cliente
  • dateRequest (obrigatório): Data da requisição (ISO format)

5. Buscar Todos os Serviços

Retorna a lista de todos os serviços disponíveis.

Parâmetros: Nenhum

6. Deletar Agendamento

Deleta um agendamento existente.

Parâmetros:

  • appointmentId (obrigatório): ID do agendamento

🔐 Credenciais

Configuração

  1. No n8n, vá em CredentialsNew
  2. Procure por Schia API
  3. Configure:
    • Base URL: https://schia.com.br (ou sua URL customizada)
    • API Token: Seu token Bearer de autenticação

Obtendo o Token

Entre em contato com o suporte da Schia para obter seu token de API.

✅ Compatibilidade

  • n8n: Versão 1.0.0 ou superior
  • Node.js: Versão 18.x ou superior
  • API Schia: Todas as versões atuais

Testado com:

  • n8n v1.0.0+
  • Node.js v18.x, v20.x

💡 Exemplos de Uso

Exemplo 1: Workflow de Agendamento Completo

1. Webhook (recebe dados do cliente)
   ↓
2. Schia - Buscar Cliente por WhatsApp
   ↓
3. IF (cliente existe?)
   ├─ Sim → Continua
   └─ Não → Schia - Cadastrar Cliente
   ↓
4. Schia - Buscar Todos os Serviços
   ↓
5. Code (processar e validar dados)
   ↓
6. Schia - Cadastrar Agendamento
   ↓
7. Enviar confirmação (email/SMS/WhatsApp)

Exemplo 2: Consulta de Agendamentos

1. Schedule Trigger (diariamente às 8h)
   ↓
2. Schia - Buscar Todos os Clientes
   ↓
3. Loop (para cada cliente)
   ├─ Schia - Buscar Agendamentos Futuros
   └─ Enviar lembrete se tiver agendamento hoje

Exemplo 3: Cancelamento de Agendamento

1. Webhook (recebe solicitação de cancelamento)
   ↓
2. Schia - Buscar Cliente por WhatsApp
   ↓
3. Schia - Buscar Agendamentos Futuros
   ↓
4. Code (validar se pode cancelar)
   ↓
5. Schia - Deletar Agendamento
   ↓
6. Enviar confirmação de cancelamento

📚 Recursos

🐛 Troubleshooting

Node não aparece no n8n

# Verifique se está instalado
npm list -g n8n-nodes-schia

# Reinstale se necessário
npm install -g n8n-nodes-schia --force

# Reinicie o n8n
pm2 restart n8n

Erro de autenticação

  • Verifique se o token está correto
  • Verifique se a Base URL está correta
  • Teste o endpoint manualmente com curl

Erro "Cannot find module"

# Limpe o cache
npm cache clean --force

# Reinstale
npm install -g n8n-nodes-schia@latest

# Reinicie o n8n
pm2 restart n8n

📝 Changelog

v0.1.1 (2025-10-31)

  • ✅ Corrigida estrutura de diretórios do build
  • ✅ Adicionado suporte completo para todas as rotas da API
  • ✅ Melhorias na documentação

v0.1.0 (2025-10-31)

  • 🎉 Versão inicial
  • ✅ 6 operações principais implementadas
  • ✅ Autenticação via Bearer Token
  • ✅ Suporte completo para API Schia

📄 Licença

MIT

👨‍💻 Autor

Schia Corporation

🤝 Contribuindo

Contribuições são bem-vindas! Sinta-se à vontade para abrir issues ou pull requests.

⭐ Suporte

Se este node foi útil para você, considere dar uma estrela no repositório!


Feito com ❤️ para a comunidade n8n