top of page
NIGHT FULL OF CROWED STARS.jpg
Search

Telangana Training Glimpses

We have successfully completed the induction training of the Talents of Telangana State.



 
 
 

Comments


Contact Details

Address

Anmol Pride, 1st Floor, C.S. No.270,

Behind RBL Bank,

Varsha Park Society, 

Baner Road , Pune Maharashtra, India, Pincode – 411045 

Email

Phone

8799978054

Social Media

  • Facebook
  • LinkedIn

Copyright © 2024 SakshamGram All Rights Reserved.

bottom of page
// Function to send chat messages to n8n webhook function sendMessageToN8N(message, userId, chatId) { console.log("Preparing to send message to n8n:", message, userId, chatId); // Debug log fetch("http://localhost:5678/webhook-test/wix-chat", { // REPLACE with your actual public n8n URL method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ message: message, userId: userId, chatId: chatId }) }) .then(response => response.json()) .then(data => console.log("Message sent successfully to n8n:", data)) .catch(error => console.error("Error sending message to n8n:", error)); } // Ensure Wix Chat is ready before running $w.onReady(() => { console.log("Wix Chat Integration Initialized"); // Debug log $w("#chatbox1").onMessage((message) => { if (message && message.text) { console.log("Received message from Wix Chat:", message.text); // Debug log sendMessageToN8N(message.text, message.senderId, message.chatroomId); } else { console.error("Invalid message format:", message); } }); });