Slack notifications of new signups
Post in a slack channel when you have a new signup
This guide will teach you how to automatically post a message into a slack channel of your choice with details of a new signup to your dapp.
Prerequisites
- Completed the serverless webhooks guide
- A Slack account
- A Dynamic account
Post a message to Slack
As long as you have completed the serverless webhook guide, you’ll know how to access the email of a user within your serverless function. Now we have the email, we can post a message to Slack. To do this we’ll need to create a Slack app and set it up to post messages using incoming webhooks.
This guide will get you set up, and once you’ve completed it you will end up with a webhook URL, that’s all you need.
It’s time to write the code to send our Slack message. We can do this with anything like Axios or Request, but here we will use the Slack/webhook library to make things even easier.
Test it out
As per the serverless webhook guide, we can test this out using:
We can then deploy using serverless deploy
, and you’re good to go!
Was this page helpful?