This article shows how to format first and last names using Zapier.
Zapier is a tool that allows you to integrate 500+ different apps together, including Teachable. To learn more about that, check out our article on Integrating Zapier with Teachable. You can integrate Zapier on our Basic plan and up.
Formatting First and Last Names in Zapier
Some applications require both a first and last name. However, Teachable only stores full names for users. This is because not all countries/cultures have first and last names. Some have more, some have less. As a result, we only store a full name to account for that.
If you are trying to setup a Zap in Zapier for an application that has a First and Last Name field, you can use Zapier’s Formatter Tool as an intermediary for splitting up the name.
One example of this would be integrating Teachable with MailChimp. Once you have the general zap set up (a trigger and an action), follow these steps:
- In between your trigger and action, click the + button and then choose Action.
- Now, type “Formatter” into the Choose an Action App search bar.
- Once you’ve selected Formatter, choose Text and click Save + Continue.
- Next, select the Split Text from the Transform drop-down menu.
- From the Input drop-down menu, choose User - Name. Because we are splitting on the first space, you don’t need to put anything else for the Separator and Segment Index.
- Click Continue to proceed.
- From here you will be prompted to test out the splitting process using the data from your Teachable Trigger. Click Create & Continue to see the results.
- The next step is to split out the last name. To do this, create a second Text Action (just like before, click the + icon beneath the Formatter Action and add a new formatter Action). You will now have two Formatter actions.
- This time, however, choose Replace from the Transform drop-down menu. Then, from the Input drop-down menu, select the User-Name from your very first action step. For the Find text field, choose Output from Step 2 (the first formatter action).
NOTE: When you add the Output from Step 2 to the Find field, press the space bar to add an extra space at the end. This will help remove any spaces that might appear at the beginning of the last name.
- Because we want to effectively remove the first name from the User - Name attribute, you can leave the Replace field blank and click Continue.
- As before, you will be prompted to test out your settings on the User data from the Step 1 trigger. Continue through that to check that everything is working fine.
- Now, when you go to set up the Action in Zapier, you will be able to use the values from the formatter actions by clicking the appropriate Text action, and then the output.