Made for DSGT by John Ramberger
This program is built using NodeJS in JavaScript
In order to run the app, you must have NodeJS and NPM setup on your machine. To test this, enter npm --v
into a console (CMD, PowerShell, VSCode Terminal, etc.). If you get a version back such as 8.9.0
then you should be good.
If you don't have NPM installed, I would just google how to install it.
Just follow the steps below:
- Download this repository to your local machine (either download the zip or clone the repository).
- Open the root folder with all of the files (you should see a file named
bulkemail.js
) - Create a file called
.env
and enter your PRIVATE api key from Knock asKNOCK_API_KEY
. Your file should look like this (replaceexample_api_key
with your key):
KNOCK_API_KEY=example_api_key
- Place your
.CSV
file into this folder. The name of the file does NOT matter, just make sure the CSV has a row at the top with the column labels and there exists at least aemail
andfullname
column. Yes, the file must be in CSV format and yes, it can have more than those 2 columns. - Open a console (same way as before) in the folder. You'll know if it worked if it has the path to the repository in the starting line. Ex:
C:\Users\USER\Documents\GitHub\DSGT-Mailing-List-Knock>
. If you don't know how to do this, check this link out. - Run the command
npm install
. This will install all the dependencies that the script needs to run.
- Run the command
npm run start
. This will start the program :D. - Just follow the prompts and answer according to the question. If it asks
Would you like to add or remove users? (add, remove)
respond with eitheradd
orremove
and nothing else. - Once you see
DONE!
, the program is over and all of the users have been added/removed to Knock.
- Run the command
npm run trigger
. This will start the program :D. - Just follow the prompts and answer according to the question. If it asks
What Knock workflow would you like to trigger? (enter the key to the workflow)
respond with the workflow key such astest-workflow
and nothing else. - Once you see
DONE!
, the program is over and the workflow has been triggered. Check through knock to see its status.
From here, you're done, but if you have another file or changed your mind and want to remove the users, simply start from step 7
and start the app again.
If you closed the console, follow steps 2 and 5
, but you shouldn't need to install again.