Rohit Ravikoti
Novvum
Published in
4 min readJan 11, 2017

--

Update: Scaphold no longer exists. Check out appsync or Graph.cool

Add every new Scaphold.io user to a mailchimp email list using Zapier

At novvum, we work with Scaphold and Zapier quite often.

Zapier has a simple and intuitive interface for creating some very powerful integrations with thousands of APIs. Scaphold.io lets you build your own api in minutes! Wouldn’t it be awesome if you could integrate your Scaphold app with Zapier?

Let’s get started!

In this example, we will add every new user in Scaphold to a mailchimp email list with zapier.

Setting up the webhook:

Create a new zap in zapier.

For the trigger, select “Webhooks” > “Catch Hook”. Click continue on the “Pick off a Child Key” option. Zapier now generates a custom webhook URL.

Now, go to your scaphold app and make sure to have an “email” field in the User type.

Go to the “Logic” tab on the left panel and press the + button on the top right which opens up a panel to create you custom business logic. Enter “createUser” for the “Mutation Event” field, and copy over the webhook url generated by zapier into the “URI” field:

Click “Create”.

Now, we need to test out our Zapier webhook. To do this, we need to go back to zapier and click the “Ok, I did this” button and it’ll start listening for a call to the endpoint it generated.

Back in Scaphold, we need to create a new test user. Go to the “Explorer” tab on the left and select the “User” type on the top right. Press the “+” button and create a dummy user (make sure to include an email!).

As soon as you press “Create” to add a new user, Zapier should receive the call. You can see what data it received by clicking on “view your hook”:

Click Continue.

Great! You’re all setup to receive a user’s email every time a new one gets created.

Setting up Mailchimp:

For the next action, select “MailChimp” > “Add/Update Subscriber”:

Next, follow the directions to link your mailchimp account.

Once you’re done connecting the account, we can configure the mailchimp settings. Most of the fields in this section are self-explanatory, so let’s focus on the subscriber email field since that’s where we need to put our retrieved data. Click the button on the right of the field:

In the dropdown, under the “Catch Hook” section, you will see the the dummy data we created in Scaphold earlier. Click the email field.

Fill out the rest of the fields and click Continue > Create & Continue. Zapier will test the action and try to add the user to your mailing list:

There you have it, you are now automatically adding new mailchimp subscribers from new users in Scaphold!

This was only one way to integrate Scaphold with Zapier. I will make another post soon and show you how to run queries and mutations on your Scaphold app from Zapier for more complex workflows.

--

--

Rohit Ravikoti
Novvum
Editor for

Co-founder of Novvum, a software agency specializing in GraphQL and JavaScript, and daily meditator.