Text Message and Email Notifications when a user Joins Chat
Tags: javascript, tutorial, webdev, html
Published: 2022-11-12 20:45:19

In this guide we will go through the process of setting up an email and SMS notification whenever a user joins Dead Simple Chat, Chat Room.

this blog was originally published on the DeadSimpleChat Blog: https://deadsimplechat.com/blog/get-text-message-or-email-notification-when-user-joins-chat/
We will use Zapier and Webhooks feature from Dead Simple Chat to allow this functionality.

> New to DeadSimpleChat? It's a turn key chat that you can easily add to your website or App —without any complicated code. For Virtual / Live events, SaaS App, Social Platform, Education, Gaming, Finance [ Sign Up for Free](https://deadsimplechat.com/getstarted)

Here are the Steps:

1. Go to https://www.zapier.com and signup for an account
2. Click on "Create Zap Button"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ni3ddpr0rh614klmsbn6.png)

3. Select "Webhook:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wj842xwlhv70w1sth6gy.png)

4. Select the option "Catch a Hook"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/55jyt0muao3pqsqawve8.png)

5. Copy the Webhook URL


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tgda8xjk52umdagok3us.png)

6. Go to https://deadsimplechat.com/login and login to your dashboard and Turn On Webhooks


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rofyive2uadj2zvugme7.png)

7. Paste the Webhooks URL  and Turn on the "User Joined Chat Room" webhook and press the save button


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2x8wz1hh846ltvrwsur7.png)

8. Now Join a Chat Room, this will trigger the Webhook and then go back to Zapier and click on the "Test Trigger" button, this should load the Webhook data. Once it is loaded click continue button


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/htf85rhiqf9ew58ij2dy.png)

9. Now Select Email by Zapier

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rqzkhvt9u5tkapq23kyd.png)

10. Select Send and Outbound Mail and click Continue

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/15h15t9wl1mcz8cqqjl0.png)

11. Under the "to" field type in the email address where you would like to receive the notification when a new user joins the chat room


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/29xcmrcqoltmys5s46pt.png)

12. Enter the Subject and Body of the Email. You can also Populate the Subject and Body with the values received from the Webhook. The Webhook data will contain the details about the user who has joined the chat room including the username, profile picture of the user etc. which you can populate in the Subject and Body

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4g5d0ev5lewezmdwbmoa.png)

10. Once Done Click Test and Continue and Publish the Zap. That's it!

## Send Text Message Notification
11. To Send a Text Message Notification as well, instead of Pressing Publish Zap press the "+" button


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8cnu3iwpc8t3tw03w6im.png)

13. Search "SMS" and Select SMS by Zapier
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2hzvi8aj69ezpquznr9g.png)

14. Select Choose and Event, "Send SMS"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j4258x5patu90sr9ywsp.png)
15. Enter your Phone number and Confirm the PIN

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5cibq856kl433g19qlxu.png)

16. Type in the Message body, you can also populate the field from the Webhook to dynamically specify the username of the user who has joined the chat room


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zhej8nkj2mejjz68f0v9.png)

17. Click Continue and Test and Continue and Publish the Zap


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fhdldpwunp398rue3aii.png)

That's it! We have now setup a Zap to Automatically Send an Email or SMS notification whenever a user joins the chat room.