Skip to main content
Best answer

Importing Contacts From Viral Loops To SendGrid


Hey Community,

 

I wanted to reach out for help here. I am looking to setup a simple Zap, but am a bit confused. I am setting up to launch a campaign on Viral Loops (https://viral-loops.com/templates/startup-prelaunch) and want to make sure if anyone signs up they can be automatically added to my SendGrid audience list. 

To my understanding the form on my website will need to be a Viral Loops form, so I would then need a zap for when a new participant is added to the Viral Loops campaign to be imported to SendGrid. I signed up for free trials on both, before committing to paying for premium as I want to make sure these platforms have this ability. 

When testing, I had no issue connecting the apps to Zapier, but I do not see a zap option to add users to audience list.

Please let me know if you have worked with these apps in the past and can help me out, thanks!

Best answer by nicksimardBest answer by nicksimard

Hi Alec!

As you’ve discovered, the SendGrid integration doesn’t have the action you need. That’s where Troy’s suggestion comes in. We can use Webhooks by Zapier to accomplish this.

I’ll try to break this down.

Get the Details from SendGrid

When you go here, you’ll see this:

I find checking the CURL tab gives you the easiest info to digest.

What to Add in Zapier

Looking at that screenshot, here’s how it corresponds to what you’ll do in Zapier (make sure you use a Custom Request in the Webhooks by Zapier step):

How to Get the Data

The code in that Data box is JSON, which you can get by clicking on this (from this page):

 

BUT, that gives you way more than you’ll likely need. If all you need is the email address, you can use this:

{ "contacts":  [ { "email": ""  } ]
 

In between the “ “ for email you’ll map the field from Viral Loops that has the email address:

 

If you needed something like a first name, you’ll add it under email address, like this:

{ "contacts":  [ { "email": "",

"first_name": ""  } ]

API Key in SendGrid

To create your API key in SendGrid, go here: https://app.sendgrid.com/settings/api_keys

I’d suggest giving it restricted access, to only what you need in order to add a contact. That’s this:

Wrapping Up

Whew, ok. That might seem like a lot, but if you follow it step-by-step you should be good to go 🙂 If you run into any problems please don’t hesitate to ask.

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

11 replies

Troy Tessalone
Forum|alt.badge.img+14

Hi @alec123 

Good question.

You’ll have to use the SendGrid API: https://docs.sendgrid.com/api-reference/contacts/add-or-update-a-contact

App APIs can be used in Zaps with the Webhooks app as an action step: https://zapier.com/apps/webhook/help

 

 


  • Author
  • Beginner
  • 4 replies
  • April 25, 2022

Thanks Troy.

 

To clarify -- I would not need Zapier to pull email form fills into SendGrid, instead Zapier would be needed if I wanted a specific action in Viral Loops to trigger an email in SendGrid? 


Troy Tessalone
Forum|alt.badge.img+14

@alec123

When testing, I had no issue connecting the apps to Zapier, but I do not see a zap option to add users to audience list.

Please clarify with what app you are expecting to see this action.

 

 


  • Author
  • Beginner
  • 4 replies
  • April 25, 2022

I was under the impression for when the trigger “New Participant” from Viral Loops was fired, I would be able to select an action in SendGrid along the lines of “Add User To Audience List”, but that option did not appear. The only action I see, is the one you screenshotted above. However, I do not want to trigger a send email, I just want to make sure these users are added to my SendGrid database. 


Troy Tessalone
Forum|alt.badge.img+14

@alec123

You’ll have to use the SendGrid API: https://docs.sendgrid.com/api-reference/contacts/add-or-update-a-contact

App APIs can be used in Zaps with the Webhooks app as an action step: https://zapier.com/apps/webhook/help

 


  • Author
  • Beginner
  • 4 replies
  • April 25, 2022

Where do I use the SendGrid API, sorry I do not have a technical background so I am still a little confused. Are you meaning that I can setup the SendGrid API via a zap with the Webhooks app? Thanks for the quick responses, I appreciate it. 


Troy Tessalone
Forum|alt.badge.img+14

@alec123 

Yes, Webhooks app Zap actions:

 

If you need help, consider hiring a Zapier Expert: https://zapier.com/experts


nicksimard
Forum|alt.badge.img+11
  • Zapier Staff
  • 2115 replies
  • Answer
  • May 2, 2022

Hi Alec!

As you’ve discovered, the SendGrid integration doesn’t have the action you need. That’s where Troy’s suggestion comes in. We can use Webhooks by Zapier to accomplish this.

I’ll try to break this down.

Get the Details from SendGrid

When you go here, you’ll see this:

I find checking the CURL tab gives you the easiest info to digest.

What to Add in Zapier

Looking at that screenshot, here’s how it corresponds to what you’ll do in Zapier (make sure you use a Custom Request in the Webhooks by Zapier step):

How to Get the Data

The code in that Data box is JSON, which you can get by clicking on this (from this page):

 

BUT, that gives you way more than you’ll likely need. If all you need is the email address, you can use this:

{ "contacts":  [ { "email": ""  } ]
 

In between the “ “ for email you’ll map the field from Viral Loops that has the email address:

 

If you needed something like a first name, you’ll add it under email address, like this:

{ "contacts":  [ { "email": "",

"first_name": ""  } ]

API Key in SendGrid

To create your API key in SendGrid, go here: https://app.sendgrid.com/settings/api_keys

I’d suggest giving it restricted access, to only what you need in order to add a contact. That’s this:

Wrapping Up

Whew, ok. That might seem like a lot, but if you follow it step-by-step you should be good to go 🙂 If you run into any problems please don’t hesitate to ask.


  • Author
  • Beginner
  • 4 replies
  • May 4, 2022

Ok, appreciate the step-by-step. I am going to try this and then reach out with any questions, thanks so much!


Alec here again (just under marketing email), I went to set this up and received the following, also in the data section is that where I would put which specific contacts list they would put the new users, ie. putting them into a “Viral Loops User List” in SendGrid, thanks! -- 

 

 


jesse
Forum|alt.badge.img+9
  • Architect
  • 1348 replies
  • May 18, 2022

Hey @echotrademarketing, welcome back but sorry to hear you’re running into another issue! There are many things that could be causing that error with your Webhooks step and the fastest way to identify what that is, is to reach out to our support team. They have access to your account and webhook logs and should be able to immediately pinpoint the issue for you. 🙂