May 28, 2022 11:23 PM
I am completely out of my depth here, so I apologize for dumbing what I’m doing down. Also, talk to me like I’m a child when explaining what’s going on :grinning_face_with_big_eyes:
I have built a simple website with Webflow and use Wized as the backend. Wized uses Airtable as the database. One of the functions of my website is that it gives the user a unique email address where they can send messages. I want this unique address to be created by Airtable.
I’m assuming i use the first and last name tables with this formula {first} & {last} to get the first and last name into a new cell. Now i have two questions:
how would i add to this first and last name the “@mydomain.com” part of the email? i know this is something super simple, but just can’t seem to find the right one
more importantly, how would i get airtable to check the same column for duplicate email addresses before creating this one? and if it encounters a duplicate, get it to ad a number (1, 2, 3…) to the end of the “firstlast” part before the domain? i can’t do this manually every time because the email will be displayed to the user in the user dashboard on the website
May 29, 2022 12:51 AM
In a formula field, doing the following should get you what you want:
{first} & {last} & “@mydomain.com”
Hmm, I think I would handle this with two tables:
Holding Table
Emails
We would create a new record in Holding Table
that contains the first section of the user’s email (i.e. {first} & {last}
), and have an automation that triggers from that. The automation would do a “Find Records” action on the Emails
table for any emails that contained that combination of {first} & {last}
, and append the number of records it found to that name before creating it in the Emails
table if anything was found.
This means that, in a scenario where you have an email in your system with the address BobMortim@mydomain.com
, and a new user signs up with the first and last name combination of BobMort
, the new user would end up with BobMort1@mydomain.com
as their email due to the text BobMort
being found within the email address BobMortim@mydomain.com
, and I’m not sure if you’re okay with that
I’ve created a version of the above here. To view the setup (formulas, automations etc), duplicate the base by clicking the title of the base at the top of the screen, then the three horizontal dots on the right, and then the “Duplicate Base” button.
May 29, 2022 11:05 AM
Adam’s basis system should work. I suggest a few variations.