Let’s say that you’ve built your email mailing list, full of potential clients. Before sending messages to them, you might not want to waste money on emails that’ll never reach your potential customer due to the address being invalid.
With Wayscript, you can verify email easily and increase your chances to hit valid email addresses.
Let’s build a script that integrates Google Sheet, SendGrid, and Verify Emails module.
For this post, here is some useful documentation to help you better understand the workflow.
- Working with Google Sheet Trigger
- Working with Verify Email
- Working with conditions
- Working with SendGrid
Google Sheet Trigger
Every time a row will be added to a Google spreadsheet, the script will run. To make this, we’ll use Google Sheet Trigger. Add the trigger.
The next step is the configuration. You’ll need to connect with your Google Sheet account, choose the mode, and the spreadsheet.
You’ll notice new items in the configuration panel. We’ll replace columns names with suitable variables names. The sheet I am using for this example looks like this.
Only column B will be useful here. Let's name it email in the configuration.
The trigger is ready now.
Email verification can be achieved easily using the Verify Email module provided by Wayscript. When given an email address, you’ll get useful information such as for example Email format to check if the email syntax is right and SMTP test to check if the email really exists.
We have the information we need. Let’s send a mail with SendGrid based on conditions.
The next step is to send an email to the email address. Before doing that, let’s be sure we are not sending emails to an invalid email address.
We will need a If condition and make sure Email_format equal to Valid and SMTP_Test equal to Passed. Add If as a new step and we'll write the conditions.
Under the If branch, add the SendGrid module.
Add your account and important information.
Under the Else, we’ll add the Write Log module to print the email address if it’s not valid.
If you are confused, here is how your workflow will look like.
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)