mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
2016c35157
Generated-By: mintlify-agent Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
40 lines
1.9 KiB
Plaintext
40 lines
1.9 KiB
Plaintext
---
|
|
title: "Create a custom workflow"
|
|
description: "Create a custom Mintlify workflow with a schedule or push trigger, context repositories, and an agent prompt to automate recurring documentation tasks."
|
|
keywords: ["automation", "automate", "cron", "agent"]
|
|
---
|
|
|
|
import GitlabWorkflowSetup from '/snippets/gitlab-workflow-setup.mdx';
|
|
|
|
## Prerequisites
|
|
|
|
- A Mintlify project connected to a GitHub or GitLab repository
|
|
- For GitHub: the [Mintlify GitHub App](/deploy/github) installed on every repository you plan to use in the workflow
|
|
- For GitLab: a connected GitLab account (see [GitLab setup](#gitlab-setup) below)
|
|
|
|
## Create a custom workflow
|
|
|
|
<Note>
|
|
The agent runs in an isolated sandbox with restricted internet access. The agent cannot install additional packages or tools at runtime. Prompts that reference unavailable tools may produce unexpected results or fail.
|
|
</Note>
|
|
|
|
1. Open the [Workflows](https://dashboard.mintlify.com/products/workflows?tab=workflows) page in your dashboard.
|
|
2. Click **Create a custom workflow**.
|
|
3. Configure the workflow name, when it runs, instructions, and how it makes updates.
|
|
4. Click **Create workflow**.
|
|
|
|
## Best practices
|
|
|
|
Effective workflow instructions focus on a single task and define a clear, verifiable outcome. Workflows have some variance because agents are nondeterministic, but consistent instructions produce consistent results.
|
|
|
|
- **Describe the outcome.** Tell the agent what the result should look like. Describe what done looks like.
|
|
- **Write a procedure.** Give the agent a step-by-step guide to follow.
|
|
- **Specify context.** Reference the files, directories, or repositories the agent should use.
|
|
- **Keep scope narrow.** Split complex tasks across multiple workflows rather than combining them into one prompt.
|
|
|
|
<Tip>
|
|
Review the output of your custom workflows to ensure they are working as expected. Update your instructions to improve the results.
|
|
</Tip>
|
|
|
|
<GitlabWorkflowSetup />
|