Skip to main content

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!

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

 

 


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? 


@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.

 

 


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. 


@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

 


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. 


@alec123 

Yes, Webhooks app Zap actions:

 

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


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":  o { "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":  f { "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.


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! -- 

 

 


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. 🙂