Help

The Community will be undergoing maintenance from Friday February 21 - Friday, February 28 and will be "read only" during this time. To learn more, check out our Announcements blog post.

Re: Send email to admin when user first logs in.

Solved
Jump to Solution
183 0
cancel
Showing results for 
Search instead for 
Did you mean: 
RedwolfSports
5 - Automation Enthusiast
5 - Automation Enthusiast

I am using airtable with softr for a client portal, and I and trying to configure and automation to send and an email to the portal admin alerting them that a user has logged in for the first time. I have a "users" table in airtable which maps to the "users" table in softr. I have last modified turned "on" in air table. Softr maintains it's own "last seen" field which I have mapped into a matching date field in air table. 

The basic logic is that the "last seen" field is empty until a user logs in. So I would think that I would just need to trigger when the "last seen" is part of the "last modified" history? But this alone would result in an email going out every time the last seen field changes which would be every time the user logs in.

I only care about the FIRST time, so I would need a way to check if the "last seen" field was previously empty, then compare it to the current field contents. I just do not understand where I would get the "previous" value from?

I am open to doing this automation within airtable or zapier. Any help would be appreciated.

1 Solution

Accepted Solutions
Mike_AutomaticN
10 - Mercury
10 - Mercury

Hey @RedwolfSports!

Rather than using "When a record is updated" trigger, you will want to use "When a record matches conditions".
Condition should be: When Last Seen field is not empty. This will occur only once on the User's lifecycle and will therefore trigger the automation only once (when the user first logs in).

EXTRA. If you'd also like to keep the date in which the user first logged in, you can probably get this done with an extra helper field.

Current schema:
1. Last Modified field
2. Last Seen field.

New Helper field:
3. First Log In field.
Set an automation that will trigger when user record matches the condition where Last seen is not empty AND First Log In field is empty .

The immediately following action block on your automation should be an Update Record action.
Select the Users table, and select the Record ID of the record which triggered the automation.
Map the value from Last Seen to First Log In field.

In this way, you'll be able to have all 3 data points, and First Log In field will not be continuously updated with every login, given that the second condition (... AND First Log In is empty) would not be met with new logins. 

Please let me know if this meets your needs!

Mike, Consultant @ Automatic Nation

See Solution in Thread

3 Replies 3
Mike_AutomaticN
10 - Mercury
10 - Mercury

Hey @RedwolfSports!

Rather than using "When a record is updated" trigger, you will want to use "When a record matches conditions".
Condition should be: When Last Seen field is not empty. This will occur only once on the User's lifecycle and will therefore trigger the automation only once (when the user first logs in).

EXTRA. If you'd also like to keep the date in which the user first logged in, you can probably get this done with an extra helper field.

Current schema:
1. Last Modified field
2. Last Seen field.

New Helper field:
3. First Log In field.
Set an automation that will trigger when user record matches the condition where Last seen is not empty AND First Log In field is empty .

The immediately following action block on your automation should be an Update Record action.
Select the Users table, and select the Record ID of the record which triggered the automation.
Map the value from Last Seen to First Log In field.

In this way, you'll be able to have all 3 data points, and First Log In field will not be continuously updated with every login, given that the second condition (... AND First Log In is empty) would not be met with new logins. 

Please let me know if this meets your needs!

Mike, Consultant @ Automatic Nation

RedwolfSports
5 - Automation Enthusiast
5 - Automation Enthusiast

Thank You! This worked Brilliantly!