2 points by rossmccrann 56 days ago edited 6 days ago | embed

Edit/Run in Windmill
Flow rendered
Input schema of the flow

Upon new user signup, check for existence in postgres, hash password, add record to postgres and airtable, send an email to new user.


  • name(optional) (string)

  • email(optional) (string)

  • password(optional) (string)

2 Steps

  • 1
    Upon a new user sign up activated via webhook, check if the user email is currently present in the postgres database. If so return an empty array, ending the flow. If not, activate the flow by returning the user's email.

  • 2

    For loop over all the elements of the list returned as a result of step 1:

    4 Steps

    • 1
      Hash the new user password with a random salt using bcrypt and return the hashed password.

    • 2
      Connect the input from the flow as well as the hashed password from the previous step and insert a new row into the postgresql database.

    • 3
      Create a new record in an Airtable table. The airtable API requires the following: apiKey: keyXXXXXXXXXXXXXX, baseId: appXXXXXXXXXXXXXX, tableName: 'some table name'. These can be obtained from Airtable online. Additionally, the script requires an object containing the columns and values needed for the Airtable table. In this case {'email': email, 'password': password, 'name': name}

    • 4
      Sends a welcome email to the new users email via SMTP. Connects the input from the flow to be used as the destination email and uses the user's name in the welcome message.