# Assign and remove Discord roles from HubSpot workflows

URL: https://conncord.com/docs/hubspot/assign-remove-roles

Last updated: 2026-10-14

Use Conncord's Assign and Unassign Discord Role actions to give or remove Discord roles when HubSpot contacts change, like when a deal closes.

The **Assign Discord Role** and **Unassign Discord Role** actions give a Discord role to a contact's Discord account, or take it away, whenever a HubSpot workflow reaches them. Use them to unlock customer channels when a deal closes, mark VIPs, or remove access when a subscription ends. They work on every Conncord plan.

  Using Attio? See [Assign and remove Discord roles from Attio
  workflows](https://conncord.com/docs/attio/assign-remove-roles).

## Before you begin

- [Connect HubSpot](https://conncord.com/docs/hubspot/connect) and [add the Conncord bot to your Discord server](https://conncord.com/docs/discord-setup).
- Move the **Conncord** role above the roles you want to manage. See [Let Conncord assign a role](https://conncord.com/docs/discord-setup#let-conncord-assign-a-role).
- The contacts need a **Conncord Discord ID**. Contacts get one when they join through your invite link, Layover or the welcome message. See [Link Discord members to HubSpot contacts](https://conncord.com/docs/hubspot/link-members).

### Create a contact-based workflow

In HubSpot, go to **Automation → Workflows** and create a **contact-based** workflow, or open one. Set any enrollment trigger, for example "Lifecycle stage is Customer".

The role actions read the Discord ID from the enrolled record, so use them in contact-based workflows.

### Add the Conncord action

Click **+** to add an action. Find **Conncord** under the integrated apps in the action list and choose **Assign Discord Role** or **Unassign Discord Role**.

![Conncord actions in the HubSpot workflow action list](https://conncord.com/docs/hubspot/action-picker.png)

### Pick the role and the Discord ID

- **Target record:** leave it as **Enrolled contact**.
- **Role:** the Discord role to assign or remove. The list shows only roles Conncord can manage.
- **Contact's Discord ID:** choose the contact property **Conncord Discord ID**.

![The Assign Discord Role action](https://conncord.com/docs/hubspot/assign-role-action.png)

### Save and turn on the workflow

Review and turn on the workflow. Each time a contact reaches the action, Conncord assigns or removes the role.

**Don't see the role you need?:**
  Conncord can only manage roles below its own role in your server's role list,
  so roles above it are hidden. In Discord, go to **Server Settings → Roles** and
  drag **Conncord** above the role. Roles managed by Discord or another app
  (bot roles, Server Booster) can't be assigned by anyone.

## Examples

| Trigger | Action |
| :-- | :-- |
| Lifecycle stage becomes Customer | Assign **Customer** |
| Deal closed won, then a delay of 30 days | Remove **Trial** |
| Subscription canceled | Remove **Pro Member** |
| Attended a webinar | Assign **Webinar Alumni** |

## If the action fails

The action shows as failed in the workflow history with a message that says how to fix it, and the workflow keeps going. The most common causes:

- The contact has no **Conncord Discord ID** ([DISCORD_ID_MISSING](https://conncord.com/docs/workflow-errors#discord-id-missing)).
- The member left your server ([MEMBER_NOT_IN_SERVER](https://conncord.com/docs/workflow-errors#member-not-in-server)).
- The role sits above Conncord's role ([ROLE_ABOVE_BOT](https://conncord.com/docs/workflow-errors#role-above-bot)).

Branch on the `errorCode` output to handle failures. After you fix the problem, re-enroll the contact.

Each role change uses one action from your plan. If the member already had the role (or didn't have it, for a removal), the action succeeds without using one. See [Plans and billing](https://conncord.com/docs/plans-and-billing#what-counts-as-an-action).