# Bettermode

Bettermode in ZBrain Flow is a community platform for building and managing online communities. It allows you to create and organize discussion boards, gather feedback, and foster engagement among community members. By integrating Bettermode into your ZBrain Flow, you can streamline how you interact with your community, automate community updates, and manage posts or discussions efficiently.

#### **How to Integrate Bettermode with ZBrain Flow?** <a href="#how-to-integrate-bettermode-with-zbrain-flow" id="how-to-integrate-bettermode-with-zbrain-flow"></a>

1. **Click the “+” Button in the Flow**\
   Open your ZBrain Flow and select the plus sign (**+**) to add a new step.
2. **Search for “Bettermode”**\
   Type **“Bettermode”** in the search bar to view the available tasks.
3. **Choose the Desired Task**\
   Select the specific Bettermode task you want to include in your Flow.

* Tasks you can perform on Bettermode are as follows:
  * **Create Discussion Post:** Creates a new discussion post in a specified Bettermode space, allowing you to share announcements, updates, or topics for open-ended discussion.
  * **Create Question Post:** Creates a new question post in a specified Bettermode space, enabling you to pose questions and gather answers or feedback from community members.
  * **Assign Badge to Member:** Assigns an existing badge to a Bettermode member based on their email address, recognizing achievements or contributions within the community.
  * **Revoke Badge from Member:** Removes a previously assigned badge from a Bettermode member, updating their badge status based on new criteria or changes in the community.
  * **Custom API Call:** Sends a tailored request to Bettermode’s API endpoints, offering greater control and flexibility for advanced or specialized use cases beyond the standard actions.

#### **Create Discussion Post** <a href="#create-discussion-post" id="create-discussion-post"></a>

Creates a new discussion post in a specified Bettermode space, allowing you to share announcements, updates, or topics for open-ended discussion.

#### **How to Configure the “Create Discussion Post” Action in Bettermode Using ZBrain Flow?** <a href="#how-to-configure-the-create-discussion-post-action-in-bettermode-using-zbrain-flow" id="how-to-configure-the-create-discussion-post-action-in-bettermode-using-zbrain-flow"></a>

**Step 1: Add the “Create Discussion Post” Step**

1. **Insert a New Step**
   * In your flow, click the **+** button to add a new step.
2. **Search for “Bettermode”**
   * Type **“Bettermode”** in the search bar and select **Create Discussion Post** from the available actions.

**Step 2: Create or Select a Bettermode Connection**

1. **Access the Connections Page**
   * In ZBrain Flow, go to **Connection** select existing connection or **Create Connection**
2. **Enter Bettermode Credentials**
   * **Connection Name**
     * A label you assign to identify this connection in your ZBrain Flow easily.
     * For example, “Bettermode” or “My Bettermode Community.”
   * **Region**
     * The geographic location where your Bettermode community is hosted.
     * Select the appropriate region if your Bettermode instance is tied to a specific data center or country.
   * **BetterMode Domain**
     * The base URL (domain) of your Bettermode community.
     * For example, `community.example.com` if that’s where your members access the community.
   * **Email**
     * The **email address** associated with your Bettermode account that has permission to manage or create content.
     * Ensure this account has the necessary privileges to perform actions like creating posts, topics, etc.
   * **Password**
     * The **password** for the Bettermode account is specified above.
     * Used to authenticate with Bettermode’s API and permit ZBrain Flow to perform actions on your behalf.
3. **Save the Connection**
   * Click **Save** to finalize your Bettermode connection. You’ll then be able to use it for Bettermode-related actions.

**Step 3. Configure the “Create Discussion Post” Action**

1. **Space**
   * Specify the **space** (community area or group) in which you want to create the discussion post.
   * This can be a space name or an ID, depending on how Bettermode identifies spaces.
2. **Title**
   * Provide the **title** of your discussion post. This is the main heading or subject that members will see.
3. **Content**
   * Enter the **body** or **content** of the discussion post. You can include text, links, or other relevant information.
4. **Tags** (Optional)
   * Add any **tags** that you want associated with this discussion post. Tags help categorize and filter content within your community.
5. **Locked** (Toggle)
   * Enable this if you want to **lock** the discussion, preventing further replies or edits by regular members.

**Step 4: Save and Test**

1. **Save Your Configuration**
   * Once you’ve filled in all necessary fields, click **Save** or **Done**.
2. **Run the Flow**
   * Trigger the flow to confirm that the “Create Discussion Post” action is successful.
3. **Verify in Bettermode**
   * Log in to your Bettermode community and check the specified space to ensure the new discussion post has been created with the correct title, content, and settings.

#### **Create Question Post** <a href="#create-question-post" id="create-question-post"></a>

Creates a new question post in a specified Bettermode space, enabling you to pose questions and gather answers or feedback from community members.

#### **How to Configure the “Create Question Post” Action in Bettermode Using ZBrain Flow?** <a href="#how-to-configure-the-create-question-post-action-in-bettermode-using-zbrain-flow" id="how-to-configure-the-create-question-post-action-in-bettermode-using-zbrain-flow"></a>

**Step 1: Add the “Create Question Post” Step**

1. **Insert a New Step**
   * In your flow, click the **+** button to add a new step.
2. **Search for “Bettermode”**
   * Type **“Bettermode”** in the search bar and select **Create Question Post** from the available actions.

**Step 2: Create or Select a Bettermode Connection**

1. **Access the Connections Page**
   * In ZBrain Flow, go to **Connection** select existing connection or **Create Connection**
2. **Enter Bettermode Credentials**
   * **Connection Name**
     * A label you assign to identify this connection in your ZBrain Flow easily.
     * For example, “Bettermode” or “My Bettermode Community.”
   * **Region**
     * The geographic location where your Bettermode community is hosted.
     * Select the appropriate region if your Bettermode instance is tied to a specific data center or country.
   * **BetterMode Domain**
     * The base URL (domain) of your Bettermode community.
     * For example, `community.example.com` if that’s where your members access the community.
   * **Email**
     * The **email address** associated with your Bettermode account that has permission to manage or create content.
     * Ensure this account has the necessary privileges to perform actions like creating posts, topics, etc.
   * **Password**
     * The **password** for the Bettermode account is specified above.
     * Used to authenticate with Bettermode’s API and permit ZBrain Flow to perform actions on your behalf.
3. **Save the Connection**
   * Click **Save** to finalize your Bettermode connection. You’ll then be able to use it for Bettermode-related actions.

**Step 3: Configure the “Create Question Post” Action**

1. **Space**
   * Specify the **space** (community area or group) in which you want to create the question.
   * This could be a space name or ID, depending on how Bettermode identifies spaces.
2. **Title**
   * Provide a **title** for your question. This will appear as the main subject that members see.
3. **Content**
   * Enter the **body** or **description** of your question.
   * Include context or additional details to help community members understand what you’re asking.
4. **Tags** (Optional)
   * Add any **tags** to categorize your question, making it easier for users to find relevant discussions.
5. **Locked** (Toggle)
   * Enable this if you want to **lock** the question, preventing further replies or edits by regular members.

**Step 4: Save and Test**

1. **Save Your Configuration**
   * After entering all required fields, click **Save** or **Done**.
2. **Run the Flow**
   * Trigger the flow to confirm that the “Create Question Post” action is successful.
3. **Verify in Bettermode**
   * Log in to your Bettermode community and check the specified space to ensure the new question has been posted with the correct title, content, and settings.

#### **Assign Badge to Member** <a href="#assign-badge-to-member" id="assign-badge-to-member"></a>

Assigns an existing badge to a Bettermode member based on their email address, recognizing achievements or contributions within the community.

#### **How to Configure the “Assign Badge to Member” Action in Bettermode Using ZBrain Flow?** <a href="#how-to-configure-the-assign-badge-to-member-action-in-bettermode-using-zbrain-flow" id="how-to-configure-the-assign-badge-to-member-action-in-bettermode-using-zbrain-flow"></a>

**Step 1: Add the “Assign Badge to Member” Step**

1. **Insert a New Step**
   * In your flow, click the **+** button to add a new step.
2. **Search for “Bettermode”**
   * Type **“Bettermode”** in the search bar and select **Assign Badge to Member** from the available actions.

**Step 2: Create or Select a Bettermode Connection**

1. **Access the Connections Page**
   * In ZBrain Flow, go to **Connection** select existing connection or **Create Connection**
2. **Enter Bettermode Credentials**
   * **Connection Name**
     * A label you assign to identify this connection in your ZBrain Flow easily.
     * For example, “Bettermode” or “My Bettermode Community.”
   * **Region**
     * The geographic location where your Bettermode community is hosted.
     * Select the appropriate region if your Bettermode instance is tied to a specific data center or country.
   * **BetterMode Domain**
     * The base URL (domain) of your Bettermode community.
     * For example, `community.example.com` if that’s where your members access the community.
   * **Email**
     * The **email address** associated with your Bettermode account that has permission to manage or create content.
     * Ensure this account has the necessary privileges to perform actions like creating posts, topics, etc.
   * **Password**
     * The **password** for the Bettermode account is specified above.
     * Used to authenticate with Bettermode’s API and permit ZBrain Flow to perform actions on your behalf.
3. **Save the Connection**
   * Click **Save** to finalize your Bettermode connection. You’ll then be able to use it for Bettermode-related actions.

**Step 3: Configure the “Assign Badge to Member” Action**

1. **Badge**
   * Select or enter the **name/ID** of the badge you want to assign.
   * This badge should already exist in your Bettermode community.
2. **Email**
   * Provide the **email address** of the member to whom you want to assign the badge.
   * Ensure the member’s email matches what is registered in Bettermode.

**Step 4: Save and Test**

1. **Save Your Configuration**
   * After specifying the badge and member’s email, click **Save** or **Done**.
2. **Run the Flow**
   * Trigger your flow to confirm that the “Assign Badge to Member” action is successful.
3. **Verify in Bettermode**
   * Log in to your Bettermode community and check the member’s profile to ensure the badge has been assigned correctly.

#### **Revoke Badge from Member** <a href="#revoke-badge-from-member" id="revoke-badge-from-member"></a>

Removes a previously assigned badge from a Bettermode member, updating their badge status based on new criteria or changes in the community.

#### **How to Configure the “Revoke Badge from Member” Action in Bettermode Using ZBrain Flow?** <a href="#how-to-configure-the-revoke-badge-from-member-action-in-bettermode-using-zbrain-flow" id="how-to-configure-the-revoke-badge-from-member-action-in-bettermode-using-zbrain-flow"></a>

**Step 1: Add the “Revoke Badge from Member” Step**

1. **Insert a New Step**
   * In your flow, click the **+** button to add a new step.
2. **Search for “Bettermode”**
   * Type **“Bettermode”** in the search bar and select **Revoke Badge from Member** from the available actions.

**Step 2: Create or Select a Bettermode Connection**

1. **Access the Connections Page**
   * In ZBrain Flow, go to **Connection**, select existing connection or **Create Connection**
2. **Enter Bettermode Credentials**
   * **Connection Name**
     * A label you assign to identify this connection in your ZBrain Flow easily.
     * For example, “Bettermode” or “My Bettermode Community.”
   * **Region**
     * The geographic location where your Bettermode community is hosted.
     * Select the appropriate region if your Bettermode instance is tied to a specific data center or country.
   * **BetterMode Domain**
     * The base URL (domain) of your Bettermode community.
     * For example, `community.example.com` if that’s where your members access the community.
   * **Email**
     * The **email address** associated with your Bettermode account that has permission to manage or create content.
     * Ensure this account has the necessary privileges to perform actions like creating posts, topics, etc.
   * **Password**
     * The **password** for the Bettermode account is specified above.
     * Used to authenticate with Bettermode’s API and permit ZBrain Flow to perform actions on your behalf.
3. **Save the Connection**
   * Click **Save** to finalize your Bettermode connection. You’ll then be able to use it for Bettermode-related actions.

**Step 3: Configure the “Revoke Badge from Member” Action**

1. **Badge**
   * Select or enter the **name/ID** of the badge you want to remove.
   * This badge must already exist in your Bettermode community.
2. **Email**
   * Provide the **email address** of the member from whom you want to revoke the badge.
   * Ensure the member’s email matches what is registered in Bettermode.

**Step 4: Save and Test**

1. **Save Your Configuration**
   * After specifying the badge and the member’s email, click **Save** or **Done**.
2. **Run the Flow**
   * Trigger your flow to confirm that the “Revoke Badge from Member” action is successful.
3. **Verify in Bettermode**
   * Log in to your Bettermode community and check the member’s profile to ensure the badge has been removed.

#### **Custom API Call** <a href="#custom-api-call" id="custom-api-call"></a>

Sends a tailored request to Bettermode’s API endpoints, offering greater control and flexibility for advanced or specialized use cases beyond the standard actions.

#### **How to Configure the “Custom API Call” Action with Bettermode in ZBrain Flow?** <a href="#how-to-configure-the-custom-api-call-action-with-bettermode-in-zbrain-flow" id="how-to-configure-the-custom-api-call-action-with-bettermode-in-zbrain-flow"></a>

**Step 1: Add the “Custom API Call” Step**

1. **Insert a New Step**
   * In your flow, click the **+** button to add a new step.
2. **Search for “Bettermode”**
   * Type **“Bettermode”** in the search bar and select **Custom API Call** from the available actions.

**Step 2: Create or Select a Bettermode Connection**

1. **Access the Connections Page**
   * In ZBrain Flow, go to **Connection**, select existing connection or **Create Connection**
2. **Enter Bettermode Credentials**
   * **Connection Name**
     * A label you assign to identify this connection in your ZBrain Flow easily.
     * For example, “Bettermode” or “My Bettermode Community.”
   * **Region**
     * The geographic location where your Bettermode community is hosted.
     * Select the appropriate region if your Bettermode instance is tied to a specific data center or country.
   * **BetterMode Domain**
     * The base URL (domain) of your Bettermode community.
     * For example, `community.example.com` if that’s where your members access the community.
   * **Email**
     * The **email address** associated with your Bettermode account that has permission to manage or create content.
     * Ensure this account has the necessary privileges to perform actions like creating posts, topics, etc.
   * **Password**
     * The **password** for the Bettermode account is specified above.
     * Used to authenticate with Bettermode’s API and permit ZBrain Flow to perform actions on your behalf.
3. **Save the Connection**
   * Click **Save** to finalize your Bettermode connection. You’ll then be able to use it for Bettermode-related actions.

**Step 3: Configure the Request Details**

1. **Method**
   * Choose the **HTTP method** (GET, POST, PUT, PATCH, DELETE) based on your desired action.
   * Refer to Bettermode’s API documentation for the correct method and endpoint.
2. **Headers**
   * Your **Authorization** header (with login credentials) is typically handled automatically by the connection.
   * Add any additional headers if required by your specific endpoint (e.g., `Content-Type: application/json`).
3. **Query Parameters** (Optional)
   * If your endpoint requires query parameters (e.g., `?page=2` or `?status=active`), add them here.
   * Click **Add Item** to include each key-value pair.
4. **Body** (Optional or Required)
   * For **POST**, **PUT**, or **PATCH** requests, provide the **JSON body** in this field.
   * Include any fields or data structures needed per the Bettermode API documentation.
5. **No Error on Failure** (Toggle)
   * Enable this if you want the flow to continue even if the API call returns an error.
6. **Timeout (in seconds)** (Optional)
   * Specify how long the step should wait before timing out. If left blank, ZBrain Flow uses a default timeout.

**Step 4: Save and Test**

1. **Save Your Configuration**
   * After entering all required details, click **Save** or **Done**.
2. **Run the Flow**
   * Trigger your flow to confirm that the “Custom API Call” step communicates properly with Bettermode.
3. **Inspect the Output**
   * Check the response to ensure the call returned the expected data or performed the desired action.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zbrain.ai/zbrain-documentation/zbrain-builder/flows/flow-components/bettermode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
