Automating processes saves a lot of time and can help you focus on the real work or on the growth of your business.
Today we’ll build a script to send a slack message when new user signup for your website.
There are no prerequisites for this tutorial. However, you can check these useful docs.
We want to receive messages when a user sign-ups. We’ll use Form Trigger to build a simple form that accepts emails and Full Name. We’ll then verify the email and send a message on a Slack channel.
Add it as a new Trigger.
Once you’ve done, we can now configure the inputs. The first input will be the email input.
The second input will be the name input.
Now, turn on the Trigger and visit the page at the address in the module to make sure everything is working.
WayScript provides a simple module to verify emails in many ways: you can verify the format or even make sure the email exists.
Add it as a new step.
Now, we’ll provide variables in the input and select Email Format for the input.
Sending Slack message
Before sending the message to Slack, we must do a comparison. We must be sure that the Email Format equals “Valid”.
Add If/Else conditionals as a new step.
Your input will look like this.
As you’ve surely noticed, we have two branches: the If branch and the Else branch. If the condition is met, the script will execute the workflow in the If branch. If it’s not the case, it will follow the workflow of the Else branch.
Then, we’ll add the Slack module in the If branch.
Now you can configure and write the message you wish to send. I advise you to dedicate a channel for this kind of scripts. ;)
Your workflow should look like this.
Questions about this script or anything else? Join our discord. We're always around to help. If you want to work the full script template, just find it here.
Top comments (0)