workflow doc overhaul (#2473)
This commit is contained in:
12
fern/workflows/consistent-workflows.mdx
Normal file
12
fern/workflows/consistent-workflows.mdx
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
title: Make Workflows Consistent And Reliable
|
||||
slug: workflows/consistent-workflows
|
||||
---
|
||||
|
||||
Documentation is coming soon.
|
||||
|
||||
## Persist Browser Profile
|
||||
|
||||
## Cached Workflow Runs
|
||||
|
||||
## Use Browser Session To Workflows In Sequence
|
||||
@@ -4,8 +4,7 @@ subtitle: Workflows -- chaining multiple tasks together
|
||||
slug: workflows/introduction
|
||||
---
|
||||
|
||||
|
||||
Workflows represent chaining multiple blocks together. Imagine calling multiple tasks in a row, doing conditional logic, extracting data to a CSV, etc. All of these ideas will be supported within our workflows feature.
|
||||
Skyvern's workflow consists of a sequence of workflow blocks. A workflow block usually represents a specific task you can perform.
|
||||
|
||||
Building blocks supported today:
|
||||
- NavigationBlock: Skyvern navigates through the websites to take actions.
|
||||
|
||||
43
fern/workflows/manage-workflows.mdx
Normal file
43
fern/workflows/manage-workflows.mdx
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
title: Manage Workflows
|
||||
subtitle: Create and edit workflows. Maximize the power of workflow automations in the browser.
|
||||
slug: workflows/manage-workflows
|
||||
---
|
||||
|
||||
Skyvern's workflow consists of a sequence of workflow blocks. A workflow block usually represents a specific unit of task you can perform. We have [a library of blocks](/workflows/workflow-blocks-details) that you can use to build your workflow.
|
||||
|
||||
You can build and manage workflows using the [Skyvern Workflow UI](https://app.skyvern.com/workflows).
|
||||
|
||||
You can also manage them via [Workflow APIs](/api-reference/api-reference/workflows/get-workflows) if you want to do it programmatically.
|
||||
|
||||
### Create and edit workflows
|
||||
#### Add a workflow block
|
||||
|
||||
Click "+" button to add a new block. There's a library of blocks that you can use to build your workflow. See details of how to use each block [here](/workflows/workflow-blocks-details).
|
||||
|
||||
<Warning>The workflow is not auto saved. Don't forget to click the "Save" button on the top after editing your workflow.</Warning>
|
||||
|
||||

|
||||
|
||||
#### Delete a workflow block
|
||||
|
||||
Click the ellipsis ("...") button and "Delete Block" on the top right corner of the block to delete it.
|
||||
|
||||

|
||||
|
||||
### Export, Import & Delete Workflows
|
||||
These actions can be done on [Skyvern's Workflows](https://app.skyvern.com/workflows) page.
|
||||
|
||||
You can export and save a workflow definition in the format of a YAML or JSON file. You can also import a workflow definition from a YAML or JSON file.
|
||||
|
||||
If you want the workflow to be deleted from your workflow list, use the "Delete Workflow" button.
|
||||
|
||||

|
||||
|
||||
|
||||
### Workflow Version Control
|
||||
Version control is a common feature in any workflow builder. This feature is not supported in the UI yet but is coming soon!
|
||||
|
||||
To achieve version control today, you can clone a workflow and give the cloned workflow a new name to manage different versions.
|
||||
|
||||

|
||||
17
fern/workflows/run-workflows.mdx
Normal file
17
fern/workflows/run-workflows.mdx
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
title: Run Workflows
|
||||
slug: workflows/run-workflows
|
||||
---
|
||||
|
||||
|
||||
## Run workflows
|
||||
|
||||
You can run a workflow by clicking the "Run" button on the top right corner of the workflow editor.
|
||||
|
||||

|
||||
|
||||
Find the API doc [here](/api-reference/api-reference/agent/run-workflow)
|
||||
|
||||
### Parameters
|
||||
|
||||
### Webhook
|
||||
@@ -36,8 +36,6 @@ With these registered as parameters, the user doesn’t have to change the value
|
||||
|
||||
<img src="../images/what_is_a_parameter/p.5.png"/>
|
||||
|
||||
<img src="../images/what_is_a_parameter/p.6.png"/>
|
||||
|
||||
**Step 4.** Input the parameter. In this case, we are using the website_URL parameter in the URL of the task block (this is considered a “parameterized field”). For other parameters, you might need to link it in the parameters drop down. **Make sure you read the “Using Parameters” section—this is critical!**
|
||||
|
||||
<img src="../images/what_is_a_parameter/p.7.png"/>
|
||||
|
||||
58
fern/workflows/workflow-blocks-details.mdx
Normal file
58
fern/workflows/workflow-blocks-details.mdx
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
title: Workflow Blocks
|
||||
description: What are workflow blocks and how to use them
|
||||
slug: workflows/workflow-blocks-details
|
||||
---
|
||||
|
||||
## Navigation Block
|
||||
This block takes actions with a given navigation goal.
|
||||
|
||||
## Action Block
|
||||
Similar to the navigation block, but this block takes ONLY one action.
|
||||
|
||||
## Extract Block
|
||||
This block extracts information from the website. You can define the data extraction schema with this block. No other actions will be taken.
|
||||
|
||||
## Login Block
|
||||
This block can support most password required login tasks in a website, integrated with [Skyvern Credentials](/credentials/introduction) to make sure your password is never sent to an LLM.
|
||||
|
||||
When a website has uncommon login requirements, you should update the default prompt in the block to provide more instructions.
|
||||
|
||||
## Validation Block
|
||||
Like having an assertion in a test, this block validates the state of the workflow. It terminates the workflow if the validation fails.
|
||||
|
||||
## Task Block
|
||||
This block navigates through the websites to take actions and/or extract information.
|
||||
|
||||
## ForLoopBlock
|
||||
This block supports loop in the workflow.
|
||||
|
||||
## Url Block
|
||||
This block navigates to a given URL.
|
||||
|
||||
## Code Block
|
||||
This block allows you to write any custom python and playwright script to interact with the browser. For Skyvern Cloud, it's an invite only feature.
|
||||
|
||||
## TextPromptBlock
|
||||
This block is a text only prompt block.
|
||||
|
||||
## SendEmailBlock
|
||||
This block sends an email.
|
||||
|
||||
## FileDownloadBlock
|
||||
This block downloads a file from the website.
|
||||
|
||||
## FileParserBlock
|
||||
This block parses a file from the website.
|
||||
|
||||
## PDFParserBlock
|
||||
This block parses a PDF file from the website.
|
||||
|
||||
## FileUploadBlock
|
||||
This block uploads all the downloaded files to a desired destination. Currently only AWS S3 is supported. Please contact support@skyvern.com if you need more integrations.
|
||||
|
||||
## WaitBlock
|
||||
This block waits for a given amount of time.
|
||||
|
||||
## NavigationV2Block (TaskV2Block)
|
||||
The advanced version of the NavigationBlock, powered by the Skyvern 2.0 engine. Designed for complicated goals.
|
||||
65
fern/workflows/workflow-parameters.mdx
Normal file
65
fern/workflows/workflow-parameters.mdx
Normal file
@@ -0,0 +1,65 @@
|
||||
---
|
||||
title: Workflow Parameters
|
||||
description: What are workflow parameters and how to use them
|
||||
slug: workflows/workflow-parameters
|
||||
---
|
||||
|
||||
## What is a Parameter?
|
||||
|
||||
Parameters allow you to replace specific values with placeholders that can be customized run by run.
|
||||
|
||||
If I have a series of task blocks in a workflow that go to Sephora, search for a specific black mascara, add 100 to my cart and purchase, I would have to go in and manually change those items every time if I wanted to do so for a different website, a different product, and different quantity. For those three values, instead of putting in the fixed Sephora URL, product number, and quantity, I can create placeholders for those string value inputs.
|
||||
|
||||
* So, instead of “www.sephora.com” the placeholder parameter would be “website_URL”
|
||||
* Instead of “ID 123456”, “product_ID”
|
||||
* And instead of “100”, “quantity”
|
||||
|
||||
With these registered as parameters, the user doesn’t have to change the values in each node if they want to change the site, product, or quantity, they only have to write them in after pressing “run”. In this case, the “Sephora Purchase Acquisition” becomes a template for more general “Purchase Acquisitions” that can be customized more easily without tampering with the inner workings of the workflow.
|
||||
|
||||
## Adding a Parameter
|
||||
|
||||
**Step 1.** To create a placeholder value, you must first create one using the “parameters” dropdown in the Workflow Editor
|
||||
|
||||
<img src="../images/what_is_a_parameter/p.1.png"/>
|
||||
|
||||
**Step 2.** Add a workflow parameter
|
||||
|
||||
<img src="../images/what_is_a_parameter/p.2.png"/>
|
||||
|
||||
<img src="../images/what_is_a_parameter/p.3.png"/>
|
||||
|
||||
**Step 3.** Add a key that will act as the name for the parameter. You can also include a description or set a default value if you wish. Note that a default value pre-populates the run parameter, but can be overrode
|
||||
|
||||
<img src="../images/what_is_a_parameter/p.4.png"/>
|
||||
|
||||
<img src="../images/what_is_a_parameter/p.5.png"/>
|
||||
|
||||
**Step 4.** Input the parameter. In this case, we are using the website_URL parameter in the URL of the navigation block (this is considered a "parameterized field"). Skyvern uses [JINJA syntax](https://jinja.palletsprojects.com/en/stable/templates/) so you see `{{website_URL}}` after picking the parameter. You can also type the reference to website_URL with double curly braces around. **Make sure you read the “Using Parameters” section—this is critical!**
|
||||
|
||||
<img src="../images/what_is_a_parameter/add_parameter_jinja_syntax.png"/>
|
||||
|
||||
**Step 5.** Press "Run" after you are done configuring your workflow and input values for any parameters you have linked throughout your workflow. Note that if you set a default value, it will automatically populate here.
|
||||
|
||||
<img src="../images/what_is_a_parameter/run_workflow.png"/>
|
||||
|
||||
## Credential Parameters
|
||||
Credential parameter can be an input for running a workflow.
|
||||
<img src="../images/what_is_a_parameter/add_credential_parameter.png"/>
|
||||
|
||||
You can also choose a credential parameter for a login block.
|
||||
<img src="../images/what_is_a_parameter/login_credential_parameter.png"/>
|
||||
|
||||
Pick the credential to use when running the workflow when you have defined a credential parameter in the workflow.
|
||||
<img src="../images/what_is_a_parameter/run_workflow_with_credential.png"/>
|
||||
|
||||
## Reserved Parameters
|
||||
There are some parameters that are reserved by Skyvern and cannot be used as a parameter key/name:
|
||||
- `{{current_value}}`: this is a reserved parameter within the scope of a for loop block. It represents the current value that the loop is iterating over.
|
||||
|
||||
## Block Output Parameters
|
||||
Any block name ({{your_block_name}} or {{your_block_name_output}}) can be referenced as a parameter by a later block, with the exception of referencing a block within a for loop from outside of the for loop block.
|
||||
|
||||
## Referencing A Parameter
|
||||
- Any parameter can be referenced in [JINJA syntax](https://jinja.palletsprojects.com/en/stable/templates/).
|
||||
- Parameters can be referenced almost anywhere where you can type or whenever you see a "+" sign to pick a parameter.
|
||||
- An earlier block is not allowed to reference any block that will be executed later.
|
||||
Reference in New Issue
Block a user