DEV Community

Derrick Sherrill for WayScript

Posted on

Automate Sending New Emails to Contacts Added by RocketReach

Introduction

Today, we'll learn how to use RocketReach to research someone's email by using his name and company name stored in a Google Sheet and send an email using Sendgrid.

Prerequisites

No Prerequisites but some content you might find useful :

Workflow

Our workflow will look like this :

  • Get the name and the company name of the new row added
  • Make a request with RocketReach to retrieve the work email
  • Send an email using Sendgrid

Add the Google Sheet Trigger

The Google Sheet contains information such as name and company name.

We want the script to run every time a new row is added. We'll add Google Sheet as Trigger. Set the mode to read and choose the sheet.

We'll use column_A for name and column_B for the company name.

image for tutorial

RocketReach

With RocketReach module, we can easily find profiles for professionals. Lookup for a profile here will require name and company name.

image for tutorial

We will work with Profile output. It contains the work email we are searching for.

Sendgrid

To make it easier to send mail, we'll use the SendGrid module. Add it as a new step and let's configure it.

image for tutorial

Configure it to Simple email mode and add the email you want to use to send mails. For the recipient and the message, we have Profile.email and Profile.name variables.

Final Step

Now that's everything is build, switch on the Trigger. Now, if a new row is added, Wayscript will automatically run your script.

image for tutorial

Conclusion

Questions about this script or anything else? Join our Discord. We're always around to help. If you want to work with the full script template, just find it here.

Top comments (0)