How-To·7 min read

Automatically Add and Remove Slack Channel Members From a Google Group

SyncMyGroup team · September 17, 2026

Some Slack channels are meant for a specific set of people. #finance-close should contain the finance team. #eng-leads should contain engineering managers. #customer-acme should contain the account team for Acme and nobody else. In each case, the list of people already exists somewhere — usually a Google Group — and the Slack channel is a copy that someone has to maintain.

Adding people to channels is easy and Slack has several ways to do it. Removing people is where things fall apart. This post covers what Slack does on its own, where it stops, and how to make a channel's membership follow a Google Group in both directions.

What Slack does natively (as of 2026)

Slack has three built-in ways to put people into channels automatically. All three are about joining.

Workspace default channels. Admins can set channels that every new member joins when they join the workspace (or, on Enterprise plans, the organization). This fires once, at join time. It doesn't know about teams or Google Groups, and on Enterprise only public channels shared across the org qualify.

User group default channels. When you create or edit a Slack user group, you can choose up to 100 default channels, and Slack's help center says members are added to them automatically. That's useful: if @finance is kept in sync, its members land in #finance-close. Slack's documentation describes the adding side; it doesn't describe removing people from those channels when they leave the user group, so test that behaviour in your workspace before you rely on it for access control.

Enterprise IdP group channels. On Enterprise plans, org owners and admins can connect identity provider groups to channels so their members are added automatically. Slack's help center notes these act as default channels for the group, and that members can leave them at any time.

And one thing that does remove people: deactivation. When an admin deactivates a Slack account, Slack removes the person from all channels. That handles leavers who are fully deprovisioned from Slack. It doesn't handle the much more common case of someone who is still employed but no longer belongs in a channel — they changed teams, the project ended, the customer churned.

Why removal matters more than addition

If someone isn't added to a channel, they notice and ask. If someone isn't removed, nobody notices. Over a year, that asymmetry turns every hand-maintained channel into a superset of the people who should be there.

For most channels that's just noise. For some it's a real problem:

  • Private channels with sensitive content — compensation, legal, M&A, security incidents.
  • Customer-specific channels, especially shared ones, where the wrong internal person can see a customer's data.
  • Channels used as an audience — announcements meant for managers only, or on-call coordination channels where extra members create confusion.

For those, the channel should exactly match a defined group, and that means removals have to be automatic.

Option 1: Script it with the Slack API

The relevant Slack Web API methods are conversations.members (list current members), conversations.invite (add users), and conversations.kick (remove a user). The logic:

google = expand_nested(directory_members("finance@acme.com"))   # set of emails
wanted = {slack_id_for(e) for e in google} - {None}
current = set(slack_paginate("conversations.members", channel=CHANNEL_ID))

to_add = wanted - current
to_remove = current - wanted - PERMANENT - {BOT_USER_ID}

if to_add:
    slack("conversations.invite", channel=CHANNEL_ID, users=",".join(to_add))
for uid in to_remove:
    slack("conversations.kick", channel=CHANNEL_ID, user=uid)

Things to handle:

  • The bot has to be a member of the channel to invite or remove people, and of any private channel to see it at all. Exclude the bot's own user ID from removals.
  • Email lookups. users.lookupByEmail matches on the Slack account's email. Aliases and secondary addresses won't match.
  • Nested groups. The Google Directory API returns sub-groups as members of type GROUP; expand them recursively.
  • Guests and Slack Connect members. Decide whether external people in a shared channel are in scope. Usually they shouldn't be touched by an internal-group sync.
  • Who can remove members. Workspace settings can restrict who is allowed to remove people from channels; your token needs to be allowed to.
  • Paging and rate limits for large channels.

It's a few hundred lines once it's robust, plus a place to run it and someone to own it.

Option 2: A purpose-built sync

SyncMyGroup keeps Slack channel membership in sync with a Google Group, adding and removing users automatically. Setup:

  1. Connect Google Workspace and Slack at app.syncmygroup.com.
  2. Create a sync with finance@acme.com as the source and #finance-close as the destination. The same Google Group can also drive the @finance user group, so the handle and the channel never disagree.
  3. Nested groups are supported for Google, so a parent group's sub-groups are included.
  4. Permanent users. Keep the CFO, an auditor, or an integration's user in the channel regardless of the Google roster.
  5. Filters and exclusions. Exclude groups and users that the sync shouldn't manage, such as external members or service accounts.
  6. Preview. Before the first run, you see who will be invited and who will be removed. This is the step to linger on: the removals list is the audit you never had time to do.
  7. Notifications. Run @SyncMyGroups subscribe <team> in an admin channel to get a message for every add and remove. For a sensitive private channel, that's a running log of who had access and when, alongside SyncMyGroup's audit logs.

Sync can also run the other way. If a channel is the real source of truth — a project channel people join and leave themselves — you can sync Slack → Google to keep a matching mailing list for calendar invites and document sharing.

Choosing between a user group, a channel, or both

You want to...Sync into
Let people @mention the team from anywhereSlack user group
Give the team a place to talk, and control who can read itSlack channel
Both, from one rosterBoth, from the same Google Group

The detailed trade-offs are in Slack user group vs channel. If your Google Groups are nested several levels deep, read nested Google Groups in Slack before you map parent groups to channels.

Patterns that work

One channel, one group. Don't drive a channel from several unrelated groups unless you've thought hard about it. If #eng-leads needs managers from three departments, create eng-leads@ in Google with those groups nested inside, and sync that.

Sync private channels first. They're where wrong membership costs the most, and they're the hardest to audit by hand because non-members can't see them.

Leave social channels alone. #random, #pets, interest channels — let people join and leave. Automation belongs on channels whose membership means something.

Tell people before turning it on. If people used to add colleagues to #finance-close by hand, they'll be surprised when the sync removes them. Post a pinned message explaining that membership follows finance@ and how to request changes.

Keep shared channels in mind. For Slack Connect channels with customers or partners, scope the sync to your internal people and leave external members to the channel's managers.

Rollout

  1. List channels where membership should match a group. Start with private ones.
  2. Pair each with a Google Group, creating groups where needed.
  3. Add permanent users for people who must always be present.
  4. Preview each sync and review removals with the channel owner.
  5. Turn on notifications, then activate.
  6. Revisit the list each quarter as teams change — or check the recommended actions SyncMyGroup builds from a diff of your groups.

For the onboarding side of the same problem — getting new hires into the right channels on day one — see Employee onboarding: get new hires into the right groups on day one.

Pricing

Free up to 5 users with every integration. Starter is $2 per user per month for unlimited users, with API access and reporting (pricing). No Slack Enterprise plan is required for channel sync.

FAQ

Can Slack remove people from a channel when they leave a Google Group?

Not natively for most workspaces. Slack's default channels and user group default channels add people. Slack removes people from all channels when their account is deactivated, but not when they leave a team. Removing people when group membership changes takes a script or a sync tool.

Does this work with private channels?

Yes, as long as the app or bot doing the sync is a member of the private channel. That's a Slack requirement for reading members and inviting or removing people.

What about guests and Slack Connect members?

Keep them out of scope. Guests can't be added to Slack user groups at all, and external members in shared channels are usually managed by the channel owner. Use exclusions so the sync never touches them.

Will people be able to leave a synced channel?

They can leave, but a sync that adds everyone in the source group will add them back on the next run. If someone genuinely shouldn't be in the channel, change the Google Group or add an exclusion.


See which channels have drifted: connect Google and Slack at app.syncmygroup.com and look at the preview, or book a walkthrough.

Start syncing your favorite tools today

Free up to 5 users with all integrations. $2 per user per month when you grow.