Skip to content

Create automation-examples.mdx#140

Open
rtfc1 wants to merge 1 commit intomainfrom
rtfc1-automations-examples
Open

Create automation-examples.mdx#140
rtfc1 wants to merge 1 commit intomainfrom
rtfc1-automations-examples

Conversation

@rtfc1
Copy link
Contributor

@rtfc1 rtfc1 commented Mar 9, 2026

New page on example automations

Summary by CodeRabbit

  • Documentation
    • Added automation examples guide featuring ready-to-use patterns for common operational tasks: employee onboarding, offboarding, access cleanup, infrastructure requests, and compliance checks. Includes setup steps, testing guidance, and implementation details for each scenario.

New page on example automations
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 9, 2026

📝 Walkthrough

Walkthrough

A new MDX documentation page is added detailing end-to-end automation patterns and examples, including employee onboarding, offboarding, access cleanup, infrastructure provisioning, and compliance checks, with step-by-step build guidance for each pattern.

Changes

Cohort / File(s) Summary
Documentation
product/admin/automation-examples.mdx
New MDX page documenting automation patterns with multiple ready-to-use walkthroughs (onboarding, offboarding, access cleanup, provisioning, compliance checks) and an "Other automation patterns" section. Includes use cases, build steps, triggers, conditions, actions, prerequisites, setup instructions, testing guidance, and rationale notes for each pattern.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A carrot-filled guide now hops into place,
With patterns and workflows, each one with grace!
From onboarding to offboard, compliance so tight,
Our automation examples shine clear and bright! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and lacks specificity about the actual content being added. 'Create automation-examples.mdx' is merely a filename reference without conveying the meaningful documentation about automation patterns. Consider a more descriptive title such as 'Add automation patterns documentation with end-to-end examples' to better communicate the actual value and content of the changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch rtfc1-automations-examples

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@product/admin/automation-examples.mdx`:
- Line 221: The "Wait for Duration" guidance is incorrect because setting the
wait to the longest option (e.g., 7 days) keeps shorter requests alive until the
max; update the docs to recommend instead: read the form's selected duration and
either set the wait dynamically to that value, use branching (evaluate the form
value and route to different flows with 1/3/7-day Wait steps), or create
separate automations per duration, and add a clear note under the "Wait for
Duration" step explaining that step conditions cannot shorten an already-running
wait and therefore do not solve this problem.
- Around line 208-219: The examples assume the Call Function step is named
"provision" but never instruct the reader to name it, causing ctx.provision.*
lookups to fail; fix by adding an explicit instruction to name the Call Function
step "provision" before the Send Slack Message example or, alternatively, update
the Slack template examples to reference a generic step name placeholder (e.g.,
ctx.<stepName>.environment_type and ctx.<stepName>.environment_url) and show
that users must replace <stepName> with the actual Call Function step name they
choose; ensure the doc edits reference the Call Function step and the template
variables ctx.provision.* (or ctx.<stepName>.*) so readers know to match names
exactly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4d137910-b949-4f5e-aba4-2859a5748a25

📥 Commits

Reviewing files that changed from the base of the PR and between 98e2707 and 2ea7332.

📒 Files selected for processing (1)
  • product/admin/automation-examples.mdx

Comment on lines +208 to +219
4. Add a **Call Function** step. Select your provisioning function. Pass the form inputs as parameters:
```
environment_type: ctx.trigger.form_fields.environment_type
requested_by: ctx.trigger.user.email
```

5. Add a **Send Slack Message** step. Notify the requester using the function's output:
```
Your {{ ctx.provision.environment_type }} environment is ready!
URL: {{ ctx.provision.environment_url }}
This environment will be automatically deprovisioned in {{ ctx.trigger.form_fields.duration }}.
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Name the Function step before using ctx.provision.*.

These output references only work if the Call Function step is explicitly named provision. As written, readers can follow the setup exactly and still end up with broken template variables in the Slack message.

Suggested doc fix
-4. Add a **Call Function** step. Select your provisioning function. Pass the form inputs as parameters:
+4. Add a **Call Function** step and name it `provision`. Select your provisioning function. Pass the form inputs as parameters:

If you don't want to prescribe the step name, change the later examples to use whatever step name the user is told to assign.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
4. Add a **Call Function** step. Select your provisioning function. Pass the form inputs as parameters:
```
environment_type: ctx.trigger.form_fields.environment_type
requested_by: ctx.trigger.user.email
```
5. Add a **Send Slack Message** step. Notify the requester using the function's output:
```
Your {{ ctx.provision.environment_type }} environment is ready!
URL: {{ ctx.provision.environment_url }}
This environment will be automatically deprovisioned in {{ ctx.trigger.form_fields.duration }}.
```
4. Add a **Call Function** step and name it `provision`. Select your provisioning function. Pass the form inputs as parameters:
🧰 Tools
🪛 GitHub Check: Mintlify Validation (conductorone) - vale-spellcheck

[warning] 210-210: product/admin/automation-examples.mdx#L210
Did you really mean 'environment_type'?


[warning] 211-211: product/admin/automation-examples.mdx#L211
Did you really mean 'requested_by'?


[warning] 218-218: product/admin/automation-examples.mdx#L218
Did you really mean 'deprovisioned'?

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@product/admin/automation-examples.mdx` around lines 208 - 219, The examples
assume the Call Function step is named "provision" but never instruct the reader
to name it, causing ctx.provision.* lookups to fail; fix by adding an explicit
instruction to name the Call Function step "provision" before the Send Slack
Message example or, alternatively, update the Slack template examples to
reference a generic step name placeholder (e.g., ctx.<stepName>.environment_type
and ctx.<stepName>.environment_url) and show that users must replace <stepName>
with the actual Call Function step name they choose; ensure the doc edits
reference the Call Function step and the template variables ctx.provision.* (or
ctx.<stepName>.*) so readers know to match names exactly.

This environment will be automatically deprovisioned in {{ ctx.trigger.form_fields.duration }}.
```

6. Add a **Wait for Duration** step. The duration should match the value from the form. (Note: if the form offers fixed options like 1/3/7 days, you can set the wait duration to match the longest option and use step conditions, or create separate automations per duration.)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

The longest-wait workaround deprovisions short requests too late.

Step conditions can skip later actions, but they can't shorten a Wait for Duration step that's already set to the maximum. With 1/3/7-day options, this pattern would keep 1-day and 3-day environments alive until day 7.

Suggested doc fix
-6. Add a **Wait for Duration** step. The duration should match the value from the form. (Note: if the form offers fixed options like 1/3/7 days, you can set the wait duration to match the longest option and use step conditions, or create separate automations per duration.)
+6. Add a **Wait for Duration** step. The duration should match the value from the form. If dynamic wait durations aren't supported in your environment, use separate conditional branches (for example, one wait step per duration option) or create separate automations per duration.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
6. Add a **Wait for Duration** step. The duration should match the value from the form. (Note: if the form offers fixed options like 1/3/7 days, you can set the wait duration to match the longest option and use step conditions, or create separate automations per duration.)
6. Add a **Wait for Duration** step. The duration should match the value from the form. If dynamic wait durations aren't supported in your environment, use separate conditional branches (for example, one wait step per duration option) or create separate automations per duration.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@product/admin/automation-examples.mdx` at line 221, The "Wait for Duration"
guidance is incorrect because setting the wait to the longest option (e.g., 7
days) keeps shorter requests alive until the max; update the docs to recommend
instead: read the form's selected duration and either set the wait dynamically
to that value, use branching (evaluate the form value and route to different
flows with 1/3/7-day Wait steps), or create separate automations per duration,
and add a clear note under the "Wait for Duration" step explaining that step
conditions cannot shorten an already-running wait and therefore do not solve
this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant