Automation Flows
Automation flows help your team save time and stay consistent.
Think of each flow as:
- When this happens (an event trigger),
- Do this automatically (one or more actions).
What A Flow Looks Like
A flow has two parts:
- Trigger event: the thing that starts the flow.
- Actions: the tasks C2 runs in order.
Example in plain English:
- When a new profile is created,
- send a welcome DM,
- assign a starter rank,
- and notify staff in a channel.
Build Your First Flow
Prerequisites
- You can access the Automation area.
- You know what result you want before creating the flow.
- You have the Discord channels/roles and C2 profile values ready.
Steps
- Open Automation -> Create Flow.
- Enter a clear flow name.
- Choose the trigger event.
- Add actions in the exact order you want them to run.
- Configure each action.
- Save and enable the flow.
- Run a test with one safe profile or one test event.
Flow Fields Explained
| Field | What It Means | Example |
|---|---|---|
Name | Staff-facing flow name. Keep it short and clear. | New Member Onboarding |
Description | Optional context for other admins. | Runs starter setup for all new signups |
Event Type | The trigger that starts this flow. | COMMUNITY_PROFILE_CREATED |
Enabled | Turns the flow on or off. | On for live, Off while editing |
Steps | The ordered action list. | DM first, profile updates second, staff alert last |
Supported Trigger Events
Use these event names when selecting a trigger:
| Event | In Plain English |
|---|---|
COMMUNITY_PROFILE_CREATED | A new person profile is created (new signup/onboarding). |
COMMUNITY_PROFILE_UPDATED | An existing profile is updated. |
COMMUNITY_RANKS_CREATED | A new rank is created in your rank list. |
COMMUNITY_RANKS_UPDATED | A rank entry is edited. |
COMMUNITY_EVENTS_CREATED | A new event is created. |
COMMUNITY_EVENTS_UPDATED | An existing event is edited. |
Supported Actions (Current Set)
| Action | What It Does | Example Use |
|---|---|---|
DISCORD_DM | Sends a direct message. | Welcome message to a new member. |
DISCORD_CHANNEL_MESSAGE | Posts in a Discord channel. | Notify staff that a new profile joined. |
DISCORD_ADD_ROLE | Adds a Discord role. | Give Recruit Discord role on signup. |
PROFILE_SET_RANK | Sets one profile rank. | Set rank to Recruit. |
PROFILE_SET_POSITION | Sets one primary position. | Set position to Rifleman (Trainee). |
PROFILE_SET_UNIT | Sets one primary unit. | Set unit to Intake Platoon. |
PROFILE_ADD_ROLES | Adds one or more C2 roles. | Add New Member access role. |
PROFILE_REMOVE_ROLES | Removes one or more C2 roles. | Remove Pending Review role after approval. |
PROFILE_ADD_QUALIFICATIONS | Adds qualifications. | Add Basic Training after onboarding. |
PROFILE_REMOVE_QUALIFICATIONS | Removes qualifications. | Remove outdated qualification tags. |
PROFILE_ADD_AWARDS | Adds awards. | Add Campaign Ribbon. |
PROFILE_REMOVE_AWARDS | Removes awards. | Remove mistaken award assignment. |
PROFILE_ADD_UNITS | Adds profile-to-unit assignments. | Add person to Reserve Company. |
PROFILE_REMOVE_UNITS | Removes unit assignments. | Remove person from previous unit on transfer. |
PROFILE_ADD_POSITIONS | Adds additional positions. | Add Radio Operator as secondary duty. |
PROFILE_REMOVE_POSITIONS | Removes positions. | Remove old duty position after reassignment. |
Discord Messaging And Variables
Discord message actions (DISCORD_DM and DISCORD_CHANNEL_MESSAGE) can use variables so each message automatically includes live event details.
You can think of variables as placeholders:
- You write
${alias}in the message template. - C2 replaces it with the real value when the flow runs.
Message Actions And Fields
| Action | Main Fields You Set | What It Does |
|---|---|---|
DISCORD_CHANNEL_MESSAGE | channel, message | Posts a formatted message to a channel. |
DISCORD_DM | target, message | Sends a formatted direct message to one target user. |
How To Add Variables To A Message
- Choose your trigger event first (for example
COMMUNITY_PROFILE_CREATED). - Add a Discord messaging action (
DISCORD_DMorDISCORD_CHANNEL_MESSAGE). - Write your message using plain text plus variables like
${alias}. - Save and run a test so you can confirm the final output looks right.
Common Variables (All Automation Events)
These are available for every automation trigger:
| Variable | What It Means |
|---|---|
${eventType} | The trigger event type that fired the flow. |
${entityType} | The type of record that changed. |
${entityId} | The ID of the changed record. |
${communityId} | The community ID where this happened. |
${triggeredBy} | Who triggered the change. |
${action} | The action that occurred. |
${occurredAt} | When the event happened. |
${resource} | The event resource payload. |
Important:
- First-level fields from the event resource are also available as top-level variables.
- Nested paths are not supported.
${rank.name}will not resolve. - Use first-level variables only, such as
${rank}.
Community Profile Event Variables
For COMMUNITY_PROFILE_CREATED and COMMUNITY_PROFILE_UPDATED, available first-level variables include:
${id}, ${createdAt}, ${updatedAt}, ${createdBy}, ${updatedBy}, ${community}${alias}, ${avatar}, ${background}, ${meta}${rank}, ${roles}, ${qualifications}, ${positions}, ${units}, ${awards}${position}, ${unit}, ${statusId}, ${status}
Community Rank Event Variables
For COMMUNITY_RANKS_CREATED and COMMUNITY_RANKS_UPDATED, available first-level variables include:
${id}, ${createdAt}, ${updatedAt}, ${createdBy}, ${updatedBy}, ${community}${position}, ${folder}, ${folderId}${name}, ${description}, ${abbreviation}, ${profiles}, ${image}
Community Event Variables
For COMMUNITY_EVENTS_CREATED and COMMUNITY_EVENTS_UPDATED, available first-level variables include:
${id}, ${createdAt}, ${updatedAt}, ${createdBy}, ${updatedBy}, ${community}${name}, ${description}, ${image}, ${meta}${dateTime}, ${locked}, ${lockedAt}${discordChannel}, ${discordMessage}, ${discordPingable}${draft}${recurrenceType}, ${recurrenceDayOfWeek}, ${recurrenceDayOfMonth}, ${recurrenceEnd}, ${recurrenceActive}, ${recurrenceSeriesId}, ${recurrenceNextInstanceAt}, ${recurrenceLastResult}, ${recurrenceLastError}
Copy/Paste Message Templates
New profile created:
"New profile: ${alias} | Status: ${statusId} | Rank: ${rank} | Profile ID: ${entityId}"
Rank updated:
"Rank updated: ${name} (${abbreviation}) at position ${position}"
Event created:
"Event: ${name} | Starts: ${dateTime} | Draft: ${draft}"
Profile updated:
"Profile updated: ${alias} | Updated: ${updatedAt}"
Recipe 1: New Person Signup Onboarding (Recommended)
This is the most useful starter flow for most communities.
Trigger
COMMUNITY_PROFILE_CREATED
Action Order Example
DISCORD_DMPROFILE_SET_RANKPROFILE_SET_UNITPROFILE_SET_POSITIONPROFILE_ADD_ROLESDISCORD_CHANNEL_MESSAGE
Example Outcome
When a new person signs up:
- they get a welcome DM,
- they are placed into your intake rank/unit/position,
- they receive your starter C2 role,
- and staff are notified in your onboarding channel.
Suggested Message Example (DM)
Welcome ${alias}. Your profile has been created in community ${communityId}. Please complete onboarding and attend the next training event.
Suggested Staff Channel Message
New profile created: ${alias} | Status: ${statusId} | Rank: ${rank} | Profile ID: ${entityId}
Recipe 2: Event Creation Announcement
Trigger
COMMUNITY_EVENTS_CREATED
Action Order Example
DISCORD_CHANNEL_MESSAGE
Example Outcome
Every new event automatically posts to your #operations channel with a short summary so staff do not miss it.
Recipe 3: Profile Update Routing
Trigger
COMMUNITY_PROFILE_UPDATED
Action Ideas
- Post a staff update when important profile changes happen.
- Add or remove C2 roles as part of your review lifecycle.
- Add/remove units or positions if your process uses staged assignment.
Example Outcome
Staff no longer need to manually send "profile updated" messages or repeat the same assignment steps.
Recipe 4: Rank List Governance Alert
Trigger
COMMUNITY_RANKS_CREATEDorCOMMUNITY_RANKS_UPDATED
Action Order Example
DISCORD_CHANNEL_MESSAGE
Example Outcome
When someone changes rank definitions, your admin channel is notified so leadership can quickly confirm it was intentional.
Good Practices
- Keep flows small and focused.
- Use clear names so other staff know what each flow does.
- Put actions in the safest order:
- notify or log,
- then assignment changes,
- then secondary updates.
- Test with one profile first before enabling community-wide.
- Review automation logs regularly.
Common Issues
- Action order is wrong, so messages go out before assignments are complete.
- Flow is saved but not enabled.
- Discord target (role/channel) is outdated.
- A flow tries to do too much at once and becomes hard to troubleshoot.