@rolealpha/n8n-nodes-rolealpha 0.7.0 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +73 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -180,11 +180,79 @@ draft, and a second use finds none. Whether the person may decide is checked whe
180
180
  confirm, not when the mail was sent, so a link of somebody who left the role does nothing.
181
181
  Opening a link only shows a confirm page; mail scanners that open links decide nothing.
182
182
 
183
- Two ready workflows are in [`examples/`](examples): import
184
- `workflows-follow-the-organisation.json` and `approve-workflow-drafts.json`, create a data table
185
- `rolealpha_snapshot` with the text columns `uuid, entity_type, name, custom_id, fingerprint,
186
- fields, edges, seen_at`, fill in **Settings** and the credentials, and give a step in roleALPHA
187
- (the governing step, e.g. `automation:workflow-changes`) a deciding role.
183
+ ### Setting it up
184
+
185
+ Two ready workflows are in [`examples/`](examples). Installing the package does not set them
186
+ up: n8n runs no code of a community package at install, so the data table and the credentials
187
+ have to be created once by hand.
188
+
189
+ 1. **Create the data table.** In n8n open the project the workflows will live in (e.g.
190
+ *Personal*), go to the tab *Data tables*, create a table named `rolealpha_snapshot` and add
191
+ these columns, all of type **String**:
192
+
193
+ | Column | Holds |
194
+ |---|---|
195
+ | `uuid` | UUID of the entity (key of the row) |
196
+ | `entity_type` | `process`, `role`, `agent` … |
197
+ | `name` | Name at the last run |
198
+ | `custom_id` | Custom ID, may be empty |
199
+ | `fingerprint` | Hash over name, custom ID, attributes and edges |
200
+ | `fields` | JSON: a short hash per attribute |
201
+ | `edges` | JSON: the edges as `TYPE>uuid` / `TYPE<uuid` |
202
+ | `seen_at` | Time of the run that stored the row |
203
+
204
+ The name must be exactly `rolealpha_snapshot`; the example finds the table by name. Without
205
+ it, *Read snapshot* fails and nothing is detected.
206
+ 2. **Create the credentials** (see [Credentials](#credentials)):
207
+ - **MCP OAuth2** for roleALPHA. It must read the whole organisation, not just one agent.
208
+ - **n8n API** with an API key from *Settings → n8n API*. When `/api` is not reachable from
209
+ outside, use `http://localhost:5678/api/v1` as base URL.
210
+ - **Approval Seal API** with a random key of at least 32 characters. It signs the approval
211
+ links; keep it secret, anybody with it can make links.
212
+ - A chat model (e.g. **Anthropic**) and **SMTP** for the approval e-mails.
213
+ 3. **Import both workflows**, `workflows-follow-the-organisation.json` and
214
+ `approve-workflow-drafts.json`, and pick the credentials on every node that asks for one.
215
+ 4. **Fill in Settings** in both workflows: `endpointUrl` and `organisation` of roleALPHA,
216
+ `governingStep`, and in the first one `n8nUrl`, `approvalUrl` (`<n8nUrl>/webhook/rolealpha-workflow-approval`)
217
+ and `mailFrom`.
218
+ 5. **Set up the governing step in roleALPHA**, as described in the next section. Without it
219
+ nobody may approve, and every draft stays a draft.
220
+ 6. **Activate** *Approve workflow drafts* first, then *Workflows follow the organisation*. The
221
+ first run only fills the data table and reports nothing; changes are reported from the
222
+ second run on.
223
+
224
+ ### The governing step in roleALPHA
225
+
226
+ Who may approve a workflow change is not set in n8n but in roleALPHA, on one step. The
227
+ workflows find it by its custom ID (`governingStep` in Settings) and ask roleALPHA for its
228
+ deciding role on every mail and on every click.
229
+
230
+ 1. **Create the step.** Add a process entity (entity type *Value Creation*) with:
231
+
232
+ | Field | Value |
233
+ |---|---|
234
+ | Name | e.g. *Workflow-Änderungen freigeben* |
235
+ | Custom ID | `automation:workflow-changes`, exactly as in `governingStep` |
236
+ | Subtype | `gate` (a decision by a person) |
237
+ | Frequency | `event_driven` |
238
+ | Description | What is decided: drafts of the Workflow Builder, applied only after approval |
239
+ | Criteria | What the approver checks, e.g. the draft fits the change, uses only existing credentials, holds no names, addresses or IDs, touches no other workflows |
240
+
241
+ 2. **Name the deciding role.** Draw `DECIDES_ON` from the role that decides to the step
242
+ (source = role, target = step), e.g. from *IT-Administration*. Get Decider reads
243
+ `DECIDES_ON` first and falls back to `ACCOUNTABLE_FOR`; drawing both, from the same role,
244
+ is clearest. More than one deciding role is allowed.
245
+ 3. **Fill the role with people.** Each person who fills the role (`EXECUTES` from person to
246
+ role) needs an e-mail address in roleALPHA. Every one of them gets their own mail with
247
+ their own links; the first who confirms decides, and the others' links then do nothing.
248
+ Agents that fill the role get no mail and can never approve.
249
+ 4. **Approve the drafts in roleALPHA.** Writes through MCP are drafts; the step and its edges
250
+ count only after a person approves them there.
251
+
252
+ Changing who approves later needs no change in n8n: give the role to someone else, or point
253
+ `DECIDES_ON` at another role. The next mail goes to the new holders, and links of someone who
254
+ no longer fills the role do nothing. A person who fills two deciding roles of the step gets
255
+ one mail per role.
188
256
 
189
257
  ## Nodes
190
258
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolealpha/n8n-nodes-rolealpha",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "n8n nodes for running AI agents whose roles, duties, deciders and guardrails live in roleALPHA",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",