10.1 Create a new WordPress user from Workflow
Last updated
Last updated
Let's see how to create a new WordPress user directly from a workflow. There are 2 ways to do this.
Install our pre-built snapshot: You need to install our membership snapshot using this link: membership snapshot. When you install this snapshot, you will get a workflow folder named Membership Website Workflows (WP). Inside this folder, you will find a few workflows, including one named Create a new WordPress user. In the Settings->Custom Value section, you will find a custom value named membership_wp_website_link. You must update the value of this 'custom value' to your website URL. You need to set your workflow trigger to control when the new WordPress user will be created. you can follow the screenshot in the next section.
Create a workflow for this: Create a workflow, configure the trigger, set the webhook with the POST method, set the destination URL to your website link, and add a custom data parameter lcw_create_wp_user with the value 1. Please follow the 2 screenshots:
Screenshot 1: The Workflow
Screenshot 2: The webhook settings
The webhook: you need to set up a webhook that sends the data of a contact to your website. In this webhook, set the METHOD to POST, the URL to your website URL(you can directly paste your website URL, we recommend creating a custom value and adding the custom value instead of the direct URL), and finally the custom data parameter lcw_create_wp_user with the value 1. This will create a new user in WP with the following data
username: Email Address
email: Email Address
password: GHL contact ID
Now, you can send login credentials to your customers; however, we strongly recommend providing them with an auto-login link that redirects to a password reset page. The auto-login feature is explained in detail in Article 10.2.