Adding Members Automatically With Seamlessly
Set up two Seamlessly workflows that add each new customer to your App's Access Groups and remove them when they cancel, using the Snippet Generator.
Add and Remove Members From Seamlessly
If you sell or enroll people through Seamlessly, two Seamlessly workflows can manage their access for you. One adds each new customer to your App's Access Groups when they buy or join. The other takes a group away when they cancel or are refunded. This page sets up both, start to finish.
The same steps work in HighLevel and other apps built on HighLevel.
For how automatic adds and removals work in general, see Adding and Removing Members Automatically. For every field and response, see the Member Management API Reference.
Before You Start
- You're an App Admin in your ThoughtFlow App. Only App Admins can create API keys.
- Your Access Groups exist. See Access Groups.
- You can build workflows in Seamlessly.
Create an API Key
Generate a key
In your App, go to App Settings > API Keys and click Generate Key. Name it so you'll know where it's used, such as Seamlessly. Leave Access Management checked and click Generate Key.
Copy it
Click Copy Key and keep the key somewhere safe until you paste it into Seamlessly. It's shown only once. Check "I have copied this key. I understand it will not be shown again." and click Done.
Your API key works like a password. Use this key only in Seamlessly, so you can revoke it without breaking your other tools. See API Keys.
Build the Add Request in ThoughtFlow
On the API Keys page, scroll to Snippet Generator:
- In Action, choose Add to Access Group.
- In Platform, choose Seamlessly.
- Leave Role on Member, and Reference By on Group ID.
- Under Access Groups, check the groups each new customer should get.
The card shows the Method, URL, Header 1, Header 2 and Body, each with Copy. The body already uses Seamlessly's contact email field, {{contact.email}}, so you don't replace the email.
Keep this page open while you build the workflow.
Build the Add Workflow in Seamlessly
Create the workflow
In Seamlessly, go to Automation, then Workflows, and create a new workflow from scratch.
Add a trigger
Add a trigger for whatever marks someone as enrolled, such as a purchase, a tag added or a form submitted.
Add the Webhook action
Click + and add the Webhook action, also called Custom Webhook.
Paste the method, URL and headers
Copy each value from the Snippet Generator card into the action:
Method: POST
URL: https://app.thoughtflow.ai/api/v1/access/grant
Header name: Authorization
Header value: Bearer YOUR_API_KEY
Header name: Content-Type
Header value: application/json
Replace YOUR_API_KEY with the key you copied. Keep the word Bearer and the space after it.
Paste the body
Choose the raw JSON option and paste the Body from the card. It looks like this, with your own group's ID:
{
"email": "{{contact.email}}",
"access_group_id": "7b1c9a52-0000-4000-8000-000000000000"
}
If Seamlessly sends its own welcome message, add "send_invitation": false so your App doesn't send an invitation email too.
Save and publish
Save the action, then publish the workflow.
Build the Removal Workflow
Build a second workflow the same way, with these changes:
Build the removal request
In the Snippet Generator, choose Remove from Access Group in Action, keep Seamlessly in Platform, and check the groups to take away. You get one card for each group, because each request removes one group.
Use an ending trigger
In Seamlessly, create a new workflow with a trigger for whatever ends access, such as a cancellation, a refund or a tag removed.
Add one Webhook action for each card
Add a Webhook action for each card, and paste its values the same way. The URL is the remove address:
URL: https://app.thoughtflow.ai/api/v1/access/revoke
Replace YOUR_API_KEY in each one.
Save and publish
Save the actions, then publish the workflow.
Removing a group doesn't remove the person from your App. They keep your Open tools and anything their other groups give them.
Test Both Workflows
Run the add
Trigger the add workflow for a test contact with your own email address, using a test Access Group.
Check your App
In your App, click Members in the top navigation. Find yourself and click your name to see your Access Groups.
Run the removal
Trigger the removal workflow for the same contact, then check that the group is gone.
If nothing changed, look at Last Used for the key on the API Keys page. If it still says Never Used, no request with that key has reached your App. For error codes, see Troubleshooting.