N
Novu•8mo ago
saxenaritank

Facing issue with Slack Integration

Hi tried and i am not getting any error but i am also not getting any message from novu to my Slack export const Slack = async (Msg, res) => { try { const novu = new Novu(NOVU_API_KEY); await novu.subscribers.identify('6677', { firstName: 'testname', }); const provider = new SlackProvider({ applicationId: process.env.slack_app_id, clientID: process.env.slack_client_id, secretKey: process.env.slack_client_secret, }); const trigger = novu.trigger('slack-chat-demo', { to: { subscriberId: '5566' }, payload: { chatMsg: 'working fine' } }); res.status(200).json(circularJson.stringify(trigger)); return res.status; } catch (error) { res.status(500).json(circularJson.stringify({ message: error.message })) } }
28 Replies
Prosper
Prosper•8mo ago
You need to set credentials for the subscriber as well. I can see that missing in your code.
Prosper
Prosper•8mo ago
Please can you follow this guide as well https://docs.novu.co/channels-and-providers/chat/slack
Novu
Slack - Novu
Learn about how to use Slack provider for chat notifications
saxenaritank
saxenaritank•8mo ago
Hi , I tried understanding the documentation provided . I am not able to sort out the error can you you please provide me with some code that is missing or anything that can provide me bit of more information
Novu_Bot
Novu_Bot•8mo ago
@saxenaritank, you just advanced to level 1!
Prosper
Prosper•8mo ago
You need to be able to set your incoming slack channel webhook url with the subscriberId value of your subscriber with this code before you call the trigger part of the code:
import { Novu, ChatProviderIdEnum } from '@novu/node';

await novu.subscribers.setCredentials('subscriberId', ChatProviderIdEnum., {
webhookUrl: 'incoming_webhook.url',
});
import { Novu, ChatProviderIdEnum } from '@novu/node';

await novu.subscribers.setCredentials('subscriberId', ChatProviderIdEnum., {
webhookUrl: 'incoming_webhook.url',
});
saxenaritank
saxenaritank•8mo ago
Hey um, I tried but i'm not able to understand it, is it possible for a video demo or call where u can walk me through it? Sorry for the inconvinece caused. 😢
Prosper
Prosper•8mo ago
@sumitsaurabh927 is releasing a guide and demo app that will make this easy for you to follow this week
N01R
N01R•8mo ago
Yea even im facing issue with this. It would be great to have a demo app and how to create and setup the slack app for novu
sumitsaurabh927
sumitsaurabh927•8mo ago
https://docs.novu.co/guides/slack-guide Freshly added ✨ I've to update it to use Novu's recommended way of handling auth but let me know if it helps! 🙂
Novu
How to use Novu to send notifications to a Slack channel - Novu
Learn to send Slack notifications swiftly with Novu
sumitsaurabh927
sumitsaurabh927•8mo ago
Also letting you know @saxenaritank
saxenaritank
saxenaritank•8mo ago
Hey , Can you tell me , If i can send the emails dynamically to novu digest , instead of setting a template
sumitsaurabh927
sumitsaurabh927•8mo ago
What do you mean dynamically?
saxenaritank
saxenaritank•8mo ago
Means i want to set up extrnal email templated instead of setting up on Novu
sumitsaurabh927
sumitsaurabh927•8mo ago
I'm not sure how that would work. Do you have any ideas @Support ?
saxenaritank
saxenaritank•7mo ago
HI @sumitsaurabh927 , I have a issue that the emails and other notification from the novu is getting delayed on my apps like slack and teams . Like i am getting the validation and reset password emails after 5-8 minutes and slack notifications takes longer than 15 minutes . Whats the issue for that ? is it the increased number of subscriber inside the novu ?
Prosper
Prosper•7mo ago
@Zac Clifton any insights here?
Zac Clifton
Zac Clifton•7mo ago
Can you tell us the transaction id's of your triggers so we can trace it?
saxenaritank
saxenaritank•7mo ago
hi @Zac Clifton can you tell me where i can get the transaction id ?
Zac Clifton
Zac Clifton•7mo ago
@Pawan Jain can you help me let op how to find the transactionid?
Pawan Jain
Pawan Jain•7mo ago
Sure @saxenaritank You can get transactionId from activity feed page
saxenaritank
saxenaritank•7mo ago
HI @sumitsaurabh927 After novu deployment on kubernates, I am getting this error , Mixed Content: The page at 'https://novu-n8ncrcl.nanoheal.work/auth/signup' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://novu-api-n8ncrcl.nanoheal.work/v1/auth/register'. This request has been blocked; the content must be served over HTTPS. Can you please help me resolve the error please ?
Novu Manage Platform
Novu Manage Platform
sumitsaurabh927
sumitsaurabh927•7mo ago
Can you share more details?
saxenaritank
saxenaritank•7mo ago
HI @sumitsaurabh927 , So after successful kubernates deployment of novu , I am not able to sign up or proceed , It gives Network error , and while using github signup option , I get { "message": "GitHub auth is not configured, please provide GITHUB_OAUTH_CLIENT_ID and GITHUB_OAUTH_CLIENT_SECRET as env variables", "error": "Bad Request", "statusCode": 400 } as the response I found out this is because the request is being sent to XMLHTTp from https , so i guess there is the CORS issue . SO is there any way this can be resolved ? Like on main novu server file on novu github repo ?
Novu_Bot
Novu_Bot•7mo ago
@saxenaritank, you just advanced to level 2!
sumitsaurabh927
sumitsaurabh927•7mo ago
Hey @saxenaritank at the moment, we don't support Kubernetes deployment officially. Can @Support tackle this?
saxenaritank
saxenaritank•7mo ago
then is there any other way ? As i got the novu code from the repo !!! so i can build the image . Still is there anyway inside the code to reolve this issue ?
Pawan Jain
Pawan Jain•7mo ago
@saxenaritank As Sumit shared above Kubernetes support is not included in community support. it is part of our commercial self host plan 1. checkout this post for Cors error:- https://discord.com/channels/895029566685462578/1179019993426444298/1179717825175232532 2. In self host, Github login is not supported. Only email + password based signup is available in self host
Linear
Linear•7mo ago
Issue DVRL-122 created.
DVRL-122 - document that github login is not available in self host
only email + password based login is allowed
Status
Triage
DevRel