subscriber does not have a configured channel

16 Replies
N01R
N01R15mo ago
So i got this as my issue
N01R
N01R15mo ago
No description
sumitsaurabh927
sumitsaurabh927OP15mo ago
@N01R can you share your workflow?
N01R
N01R15mo ago
No description
N01R
N01R15mo ago
the overides are null
sumitsaurabh927
sumitsaurabh927OP15mo ago
your payload is empty. Can you do one thing: create a new workflow just for chat (discord) and follow the guide (https://docs.novu.co/channels-and-providers/chat/discord) to see if it works
Novu
Discord - Novu
Learn about how to use Discord provider for chat notifications
N01R
N01R15mo ago
aite sure
Novu_Bot
Novu_Bot15mo ago
@N01R, you just advanced to level 1!
Prosper
Prosper15mo ago
Just to be super sure, have you also added it as a provider and made it active from the Integrations store? @N01R
No description
N01R
N01R15mo ago
yea thats already done
N01R
N01R15mo ago
No description
N01R
N01R15mo ago
I have written it like so as an API call export const Discord = async (req,res) => { const novu = new Novu(NOVU_API_KEY); try { const subscriber = await novu.subscribers.setCredentials('48', 'discord-uJ2XtmqCp', { webhookUrl: '<Discord Webhook>', }); res.status(200).json(circularJson.stringify(subscriber)); return res.status; } catch (error) { res.status(500).json(circularJson.stringify({ message: error.message })); }
}
sumitsaurabh927
sumitsaurabh927OP15mo ago
try this:
import { Novu, ChatProviderIdEnum } from '@novu/node';

export const chat = async(chatMsg) =>{

const novu = new Novu('apiKey');

await novu.subscribers.identify('subId', {
firstName: 'testname',
});

await novu.subscribers.setCredentials('cred', ChatProviderIdEnum.Discord, {
webhookUrl: 'url',
});

await novu.trigger('discord-chat-demo', {
to: {
subscriberId: 'subId'
},
payload: {
chatMsg: chatMsg
}
});
}
import { Novu, ChatProviderIdEnum } from '@novu/node';

export const chat = async(chatMsg) =>{

const novu = new Novu('apiKey');

await novu.subscribers.identify('subId', {
firstName: 'testname',
});

await novu.subscribers.setCredentials('cred', ChatProviderIdEnum.Discord, {
webhookUrl: 'url',
});

await novu.trigger('discord-chat-demo', {
to: {
subscriberId: 'subId'
},
payload: {
chatMsg: chatMsg
}
});
}
And configure your workflow to use the chatMsg variable
Prosper
Prosper15mo ago
From your screenshot, it shows disabled at the top right. Any reason why? @N01R
sumitsaurabh927
sumitsaurabh927OP15mo ago
You're not creating a sub here
N01R
N01R15mo ago
oh no i changed it aite lemme try this Ye it works thanks a lot!!1
Want results from more Discord servers?
Add your server