Two-way user sync

@yannick Actually, the auto-generation part is already possible. It’s the invitation part that is still manual (which can be done via 3rd party/Airtable automation), Is that what you’re asking?

hoooOOOO :star_struck: Really @austinyang ?

I already create my contacts in Airtable.
So, the ideal solution for me, is that Softr creates a Magic Link automatically and adds it to Airtable’s record.

Then I can use it freely…

@yannick if you sync users in Softr to your source & select “Generate magic link” as default authentication method. Any contact you added to the connected User table will also be created in Softr with magic link generated.

But 2 notes:

  • If these users already exist in Softr before the connection, no magic link will be created automatically.
  • You also have to map the magic link field for the link to be synced to Airtable
  • Syncing doesn’t happen immediately whenever you add a new user from the source. We have a few trigger loci in place to make sure we sync the data when they’re needed (e.g. when the user tries to log in). If you want to trigger the sync, you can enter the Users section of your app.

Alternatively, you can also manually add a user from Softr side, the user record will also sync back to your source right away.

Would curious to learn what your ideal flow is for your new user invitation — e.g. do you add them manually? Do they sign up on their own? Should they ideally be invited right away or only on your command?..etc.

Thanks!

Hi Austin. I’m using this as well (see post above), since Softr lacks a native email verification for sign up. This does indeed work, however the magic link does not get created until you reenter Softer’s user section again. For this to be useful, the magic link should also be generated AT THE SAME TIME as the new user and synced with that user in Airtable when it does.

1 Like

Thank you @austinyang
I’ve corrected my authentication method as you suggest.

But as I read in the end of your reply and in @Ben’s post, I think I would still need something to automatically launch the magic-link generation.

The idea being to not go through Softr’s user interface :sweat_smile:

It is best practice to never us two way sync as it destoys the sign up workflow. You should never use it in any instance as there is no benefit and only downside potential.
I am dealing with these issues currently.

unfortunately that was what I found as well. I currently just have an account creation workflow that will generate an account via api call in airtable, makes account + sends email from airtable. Sync sounded great, but without the ability to edit email addresses + conditionally sync, it is more headache than help :pensive:

Hi @yannick and @austinyang. This is why I requested email verification should builders want to use Softr’s blocks to sign up users more securely :wink: :wink:. Unfortunately, it’s been ignored for a long time.

If you don’t mind, I’d be interested to know what your onboarding process (workflow) is like @yannick?

Hi @Ben

First of all, I’d like you to know that I’ve spoken to Jakub about this subject :wink:

My process is quite simple: users are created and configured in Airtable and then I send MagicLink to the new users.

Except that each time I have to go to the user management page for the sync to take place and for the system to generate the MagicLinks. Only THEN are the e-mails sent.

Can’t wait for the process to be more integrated :wink:

y

1 Like

Right. The more integrated the better. Are you manually entering them into Airtable or is there another process/workflow that goes into getting users into your Airtable?

Manual

1 Like

Thumbs up for the initiative! It would significantly boost user growth and streamline the process. I’m considering running a computer with a tab set to auto-refresh every few minutes. However, I’m sure there are more efficient strategies out there. Does anyone have suggestions or better solutions? I’m eager to improve this approach and welcome all ideas!"

+1 for more automation here @Jakub

Here’s our use case:

We have a Management Console, built in Softr, which our internal staff use to administer multiple Client Portals (also built in Softr :grinning:). In the Management Console, for each client, there is a Table block populated from the AirTable Users table, conditional filtered using the Client field. A staff member can only see client info for clients they manage. They use an Add button to add a new user, passing the Client as a hidden field value. This populates a new record into the AirTable Users table, which is sync’d to the Client Portal app in Softr (it’s a single Client Portal app, which switches content based on the client’s ‘logged in user’s Client’ value). This is all great so far :slightly_smiling_face:

The problem is that the user table in Softr isn’t aware that the new record has been added in AirTable, so it doesn’t sync. So the user is in AirTable, not Softr, and the Magic Link has not been populated. So our staff member, looking at their client’s users table block in the Management Console, sees her new user added to the Table block, but no Magic Link populated. So she can’t send it to the client.

We then have to request another team member to open Softr and trigger a synch in the User tab. We have multiple staff managing multiple clients, and we don’t want to give them access to Softr, just the Management Console.

Solutions could be -

  • triggers on the AirTable Users table
  • periodic sync of the Softr Users table
  • frequent polling by Softr of the AirTable users table to check for differences
  • something else :thinking:

I’ll finish with a question - is there a way to externally trigger a Softr users table sync? If there is, I could fire that from AirTable users table add / update record triggers.

Many thanks,

Nik

Hi @NikW, thank you so much for extensive use case description. We’re investigating “periodic sync of the Softr Users table”. Until then, is it possible for you to trigger user creation via Softr API upon Airtable user creation? API Setup and Endpoints – Softr Help Docs

Hi @Jakub

No problem, and thank you. The API call option could work, I’m looking into it.

I’ll let you know how it goes.

Nik

@Jakub In my scenario, I am triggering user creation via Softr’s API.

Unfortunately Softrs API does not let me pass other custom fields (e.g. company_id). Instead, I have to first create the user via Softr’s api, wait for the record to show up in my user table, and then update the empty fields. It then takes an indeterminate amount of time for Softr to realize this has happened and make the fields available in the logged_in_user variable. So either way I proceed I seem to be subject to Softrs refresh frequency, which I have no way to influence.

This is using Google Sheets.

To summarize,

Option 1: add user record to table, wait for Softr to fetch

We have to wait an indeterminate amount of time for Softr to fetch the data. During this time the user cannot log in. We have no way of knowing when Softr has fetched the record, to perform follow up actions (e.g. send a welcome email).

When Softr does fetch the data, it also fetches all custom fields (good).

Option 2: use Softrs API

The user is able to log in immediately, and we can perform follow up actions. This can work for single tenant scenarios where the users email can act as the data filter. Multi-tenant scenarios require some other identifier, e.g. domain or company_id.

Noted that Softr does give us the option to filter on domain, but this is unfortunately not a good substitute for company_id when users can have a variety of email addresses.

As an interim solution, wouldn’t just work fine if we give sync API endpoint similar to all APIs ?

1 Like

Could you describe what the sync API does? Is it this:

window.dispatchEvent(new CustomEvent('reload-block-list'))

@Jonathon in this case, when user is added into Gsheet or Airtable then zap or make can be triggered that calls our sync API

Is there any way to trigger the sync api without make/zapier? E.g. just some standalone code / perhaps an API endpoint?

Otherwise, if you are suggesting I could poke Softr to fetch an updated dataset on demand, then it sounds like that could work.