Use Case: Adding Users through Zapier

Using Softr API and Zapier to add user accounts.

Option 1: Using Zapier's Softr app

Let's see how you can use the API to add users via Zapier. In this example, we are going to sync a Softr App with Google Sheets using Zapier's Softr app (this is solely for demonstration purposes, and we don't recommend storing user data on Google Sheets or similar sources). Let's proceed.

💡
Zapier's Softr app is currently in beta stage, and you can access it via the following invite: https://zapier.com/developer/public-invite/148391/e483570d289c54541baaa7850f794b63/

Step 1: Setting the Trigger

First of all, we're going to create a spreadsheets with Name, Email, and Password columns to store user data.

Users sheets
Users sheets

Further on, we'll create a Zap on Zapier and set the trigger for each new row creation in our Google sheet. See below.

Setting the trigger
Setting the trigger

Next, we'll test the trigger and proceed to configuring the Action to define what's going to happen when the initial event is triggered.

Step 2: Configuring the Action

In the Action search bar enter "softr" and select the Softr app.

Locating the Softr app
Locating the Softr app

Next, we are going to select the Action Event. In our case, we need to choose "Create a user."

Choosing the Create User action event
Choosing the Create User action event

Further on, we need to link our Softr account (by entering the API key, we generated previously), then add the Application domain, map the Email, Name, and Password fields. We can also set to generate a Magic Link, but we are going to set it to False in our case. See below.

Connecting account and domain and mapping fields
Connecting account and domain and mapping fields

That's it. Now, as soon as you activate your Zap, all the new users added to your spreadsheet, will be added to your selected Softr app as well.

Option 2: Using custom webhook

In this use case, we are going to add users to a Softr app using Zapier's Custom Webhook instead of the Zapier Softr app. So, the first step (Setting the Trigger) is going to be similar to that of Option 1.

Users data
Users data

So, let's start with Step 2, where we are going to set up the Action.

Step 2: Configuring the Action

In the Action search bar enter "webhook" and select Webhooks by Zapier (please note that this is a paid feature).

Selecting “Webhooks by Zapier”
Selecting “Webhooks by Zapier”

In the following screen, we need to select POST as the Action event since we need to create a user using the POST request as described above.

In the next screen, we need to fill in all the necessary details based on the create user endpoint. Thus, we need to set the URL to "https://studio-api.softr.io/v1/api/users", set the Payload Type to "json", and map the data as shown below.

URL, Payload Type, and Data Mapping
URL, Payload Type, and Data Mapping

The following configs can be left intact, and we just need to add the headers using our API key and domain as shown below.

Headers configured
Headers configured

Step 3: Testing the Action

That's it. Now, we just need to hit Continue and test the action. As you can see below, as soon as we do the test, the user we had added earlier on Google Sheets is added to our Softr app. So, as soon as you make sure it's working correctly, you can turn on the Zap to start the automation.

Testing the action
Testing the action

Deleting a User

The delete request can be implemented in a similar way through a custom webhook.

Did this answer your question?
😞
😐
🤩

Last updated on December 6, 2022