Novu Node Setup
Hi @all, i am new to Novu, and i want to setup novu with express, i followed the step mentioned in the quickstart for express, but after i ran the npx novu studio command it opens the studio with onboarding page, and if i hit the test workflow option there, it says api key not found, but i have included the api key the env file, please anyone help me, will mean a lot, i am stuck from past 2 days
8 Replies
@Sachin Goyal
Can you please check if env variables are loaded correctly before
@Pawan Jain in this file we have to load the env variable? and if yess can you pleas tell how.
Also i have few doubts regarding Novu if we can connect on a call please
make sure you have this .env variable in .env file
NOVU_SECRET_KEY
use dotenv
before these lines so that NOVU_SECRET_KEY
env variable is loaded before app.use( "/api/novu", serve({ workflows: [testWorkflow] }) );
>> Also i have few doubts regarding Novu
Feel free to share all your questions here@Pawan Jain , so my first doubt is like can we create a separate node js app for creating whatever workflows we have? and make an api for trigger function to be used in the react app?
@Pawan Jain also when we run the npx run novu dev command it opens up a studio and there we have to manually sync the worflows to be visible in the novu dashboard. So can this manual sync process be avoided?
@Pawan Jain see i have dotenv, but still gettign api key not found issue in novu studio
@Sachin Goyal, you just advanced to level 1!
@Sachin Goyal
so my first doubt is like can we create a separate node js app for creating whatever workflows we have? and make an api for trigger function to be used in the react app?yes you can create separate app for this.
also when we run the npx run novu dev command it opens up a studio and there we have to manually sync the worflows to be visible in the novu dashboard. So can this manual sync process be avoidedYou can use CLI method https://docs.novu.co/deployment/cli
see i have dotenv, but still getting api key not found issue in novu studioCan you please check if
NOVU_SECRET_KEY
value is valid and the same as you see Secret Key
value here https://dashboard.novu.co/api-keys
Try adding console.log(process.env.NOVU_SECRET_KEY)
statement after dotenv to check if env variable is loadedHi @Pawan Jain , while triggering the workflow it says api key not found but i have that in .env file