Open MilSim.io
C2 Overview

Automation Flows

Configure repeatable actions for profile, rank, event, and application changes.

An automation flow listens for one C2 event and runs its enabled steps in order. Start with one safe action and a test profile; a flow can send Discord messages or change member data without a human review step.

Before you create a flow

You need the community_automation community feature. C2 routes use these permissions:

TaskPermission
Open the flow listautomation:read
Create a flowautomation:create
Edit a flowautomation:update
Delete a flowautomation:delete
Read its execution logautomation-logs:read

Also make sure the target exists before selecting it: Discord channel, Discord member/role, rank, unit, position, C2 role, qualification, or award. A flow cannot use a target that the selected community does not provide.

Create a flow

  1. Open Automation and select Create Flow.
  2. Enter a clear Name, an optional description, and select an Event type.
  3. Leave Enabled off while you finish the first test, if appropriate.
  4. Add at least one step and choose its Action type.
  5. Complete the configuration required by that action.
  6. Optionally add conditions to restrict when the flow runs.
  7. Select Create Flow. C2 returns to the flow list after a successful save.

The create button stays unavailable until a name, event type, action type, valid conditions, and valid action configurations are present. A 402 feature limit reached response means the community feature limit blocked the save; it is not a missing staff permission.

Available triggers

The API currently exposes these trigger choices:

  • COMMUNITY_PROFILE_CREATED
  • COMMUNITY_PROFILE_UPDATED
  • COMMUNITY_RANKS_CREATED
  • COMMUNITY_RANKS_UPDATED
  • COMMUNITY_EVENTS_CREATED
  • COMMUNITY_EVENTS_UPDATED
  • COMMUNITY_APPLICATION_SUBMISSION_CREATED
  • COMMUNITY_APPLICATION_SUBMISSION_UPDATED

Choose the smallest trigger that matches the outcome. For example, onboarding normally starts with COMMUNITY_PROFILE_CREATED; an applicant-review notification normally starts with COMMUNITY_APPLICATION_SUBMISSION_CREATED.

Add conditions

Turn on conditions only when the trigger alone is too broad. The visual builder can combine rules using all or any logic and supports EQ, NEQ, IN, NOT_IN, EXISTS, NOT_EXISTS, CONTAINS, NOT_CONTAINS, GT, GTE, LT, and LTE.

Conditions can use top-level event data (eventType, action, entityType, entityId, communityId, triggeredBy, occurredAt) and event-specific payload fields. Check the generated preview/validation before saving. An invalid condition blocks the save rather than silently broadening the flow.

Configure a step

Steps run in their displayed order. Use the up/down controls to reorder, Add step to add one, and the bin control to remove one. C2 always retains at least one step.

Action familyAvailable actionsResult
Discord messageDISCORD_DM, DISCORD_CHANNEL_MESSAGESends a direct or channel message. Messages may include event placeholders.
Discord accountDISCORD_ADD_ROLE, DISCORD_REMOVE_ROLE, DISCORD_UPDATE_USERNAMEChanges the selected Discord member or role.
Primary profile assignmentPROFILE_SET_RANK, PROFILE_SET_POSITION, PROFILE_SET_UNITSets one rank, position, or unit.
Profile membershipPROFILE_ADD_ROLES, PROFILE_REMOVE_ROLES, PROFILE_ADD_QUALIFICATIONS, PROFILE_REMOVE_QUALIFICATIONS, PROFILE_ADD_AWARDS, PROFILE_REMOVE_AWARDS, PROFILE_ADD_UNITS, PROFILE_REMOVE_UNITS, PROFILE_ADD_POSITIONS, PROFILE_REMOVE_POSITIONSAdds or removes the selected C2 assignments.

For message steps, use plain text first. Add variables only after a test confirms the output. The event object provides top-level values such as ${eventType}, ${entityType}, ${entityId}, ${communityId}, ${triggeredBy}, ${action}, and ${occurredAt}. Payload values vary by trigger, so do not copy a profile-only value into a rank or event flow.

Edit, disable, or delete a flow

Open a flow and select Edit. You can change the event type, enabled toggle, condition, steps, order, and configuration, then select Save. Cancel abandons the unsaved edit state.

Use the Enabled toggle to stop a flow without deleting its configuration. Select the delete control from the list only when you no longer need the flow; it opens a confirmation dialog and is destructive.

Test and recover safely

  1. Keep the flow disabled while building it.
  2. Create a test profile or test event that matches the intended trigger.
  3. Enable the flow and trigger it once.
  4. Confirm the resulting profile change or Discord message.
  5. Open Automation → Logs and check every step.

If a test fails, correct the named step or missing target, then trigger a new test. Do not keep retriggering a live workflow: repeated messages or assignments are possible outcomes.

Access and technical reference

The flow controller is feature-gated with community_automation, and standard flow operations derive their automation:* permission from the HTTP action. C2 gets trigger options from /community/:communityId/automation/flows/events and action types from /community/:communityId/automation/actions/types.

The action-types controller currently has no CommunityPermissionCheck annotation. Test whether a read-only staff account can retrieve configuration options before treating that endpoint as access-controlled.

Copyright © 2026