Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e0d6035485 | |||
| d917618e67 | |||
| 8fcd0fbf77 | |||
| 31bd0ad0bd |
@@ -33,6 +33,13 @@ services:
|
|||||||
GOOGLE_CLIENT_EMAIL: ${GOOGLE_CLIENT_EMAIL}
|
GOOGLE_CLIENT_EMAIL: ${GOOGLE_CLIENT_EMAIL}
|
||||||
GOOGLE_SHEET_ID: ${GOOGLE_SHEET_ID}
|
GOOGLE_SHEET_ID: ${GOOGLE_SHEET_ID}
|
||||||
GOOGLE_PRIVATE_KEY: ${GOOGLE_PRIVATE_KEY}
|
GOOGLE_PRIVATE_KEY: ${GOOGLE_PRIVATE_KEY}
|
||||||
|
# Bot de WhatsApp. Sin estas cuatro el .env de produccion no llega al
|
||||||
|
# contenedor: los envios avisan que falta el token y el webhook contesta
|
||||||
|
# 403 porque no puede validar la firma. Ver docs/whatsapp.md.
|
||||||
|
WHATSAPP_PHONE_NUMBER_ID: ${WHATSAPP_PHONE_NUMBER_ID}
|
||||||
|
WHATSAPP_TOKEN: ${WHATSAPP_TOKEN}
|
||||||
|
WHATSAPP_VERIFY_TOKEN: ${WHATSAPP_VERIFY_TOKEN}
|
||||||
|
WHATSAPP_APP_SECRET: ${WHATSAPP_APP_SECRET}
|
||||||
ports:
|
ports:
|
||||||
- "3004:3000"
|
- "3004:3000"
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -35,7 +35,9 @@ puede confiar en el payload).
|
|||||||
Para el token definitivo: Business Settings → System Users → crear usuario → Generate Token
|
Para el token definitivo: Business Settings → System Users → crear usuario → Generate Token
|
||||||
con permisos `whatsapp_business_messaging` y `whatsapp_business_management`.
|
con permisos `whatsapp_business_messaging` y `whatsapp_business_management`.
|
||||||
4. **App → Settings → Basic → App Secret** → `WHATSAPP_APP_SECRET`.
|
4. **App → Settings → Basic → App Secret** → `WHATSAPP_APP_SECRET`.
|
||||||
5. Cargar las 4 variables en el `.env` de producción y redeployar.
|
5. Cargar las 4 variables en el `.env` de producción (`/home/proyecto/taller_automotriz/.env`,
|
||||||
|
al lado del `docker-compose.yml`, que es de donde compose las interpola) y levantar de nuevo
|
||||||
|
con `docker compose up -d`. Un `git push` no alcanza: el `.env` no está en el repo.
|
||||||
6. **WhatsApp → Configuration → Webhook**:
|
6. **WhatsApp → Configuration → Webhook**:
|
||||||
- Callback URL: `https://taller.beldo.duckdns.org/api/whatsapp/webhook`
|
- Callback URL: `https://taller.beldo.duckdns.org/api/whatsapp/webhook`
|
||||||
- Verify token: el mismo `WHATSAPP_VERIFY_TOKEN`
|
- Verify token: el mismo `WHATSAPP_VERIFY_TOKEN`
|
||||||
|
|||||||
+2
-2
@@ -14,8 +14,8 @@ const geistMono = localFont({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: "Taller MG",
|
title: "Taller Beldor",
|
||||||
description: "Sistema de turnos - Taller MG",
|
description: "Sistema de turnos - Taller Beldor",
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function RootLayout({
|
export default function RootLayout({
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ async function guardar(
|
|||||||
return resp;
|
return resp;
|
||||||
}
|
}
|
||||||
|
|
||||||
const BIENVENIDA = "¡Hola! 👋 Soy el asistente del *Taller MG*. Te ayudo a sacar un turno.";
|
const BIENVENIDA = "¡Hola! 👋 Soy el asistente del *Taller Beldor*. Te ayudo a sacar un turno.";
|
||||||
|
|
||||||
// ── Entrada principal ──
|
// ── Entrada principal ──
|
||||||
export async function procesarMensaje(telefonoRaw: string, textoRaw: string): Promise<RespuestaBot[]> {
|
export async function procesarMensaje(telefonoRaw: string, textoRaw: string): Promise<RespuestaBot[]> {
|
||||||
|
|||||||
Reference in New Issue
Block a user