diff --git a/fern/docs.yml b/fern/docs.yml index 17cca4e5..a33d17af 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -88,18 +88,34 @@ navigation: path: running-tasks/api-spec.mdx - section: Workflows contents: - - page: Introduction - path: workflows/introduction.mdx - - page: Creating Workflows - path: workflows/creating-workflows.mdx - - page: Getting Existing Workflows - path: workflows/getting-workflows.mdx + - page: Manage Workflows + path: workflows/manage-workflows.mdx + - page: Workflow Blocks + path: workflows/workflow-blocks-details.mdx + - page: Workflow Parameters + path: workflows/workflow-parameters.mdx + - page: Run Workflows + path: workflows/run-workflows.mdx + - page: Make Workflows Consistent And Reliable + path: workflows/consistent-workflows.mdx - page: Running Workflows path: workflows/running-workflows.mdx + hidden: true + - page: Introduction + path: workflows/introduction.mdx + hidden: true - page: Workflow Blocks path: workflows/workflow-blocks.mdx + hidden: true + - page: Creating Workflows + path: workflows/creating-workflows.mdx + hidden: true + - page: Getting Existing Workflows + path: workflows/getting-workflows.mdx + hidden: true - page: What the heck is a parameter? path: workflows/what-is-a-parameter.mdx + hidden: true - section: Credentials contents: - page: Introduction diff --git a/fern/images/what_is_a_parameter/add_credential_parameter.png b/fern/images/what_is_a_parameter/add_credential_parameter.png new file mode 100644 index 00000000..caeadffe Binary files /dev/null and b/fern/images/what_is_a_parameter/add_credential_parameter.png differ diff --git a/fern/images/what_is_a_parameter/add_parameter_jinja_syntax.png b/fern/images/what_is_a_parameter/add_parameter_jinja_syntax.png new file mode 100644 index 00000000..0de4a122 Binary files /dev/null and b/fern/images/what_is_a_parameter/add_parameter_jinja_syntax.png differ diff --git a/fern/images/what_is_a_parameter/login_credential_parameter.png b/fern/images/what_is_a_parameter/login_credential_parameter.png new file mode 100644 index 00000000..6e598b3a Binary files /dev/null and b/fern/images/what_is_a_parameter/login_credential_parameter.png differ diff --git a/fern/images/what_is_a_parameter/p.1.png b/fern/images/what_is_a_parameter/p.1.png index f65fb7d3..798d72fe 100644 Binary files a/fern/images/what_is_a_parameter/p.1.png and b/fern/images/what_is_a_parameter/p.1.png differ diff --git a/fern/images/what_is_a_parameter/p.2.png b/fern/images/what_is_a_parameter/p.2.png index 287cf50e..c7ed5659 100644 Binary files a/fern/images/what_is_a_parameter/p.2.png and b/fern/images/what_is_a_parameter/p.2.png differ diff --git a/fern/images/what_is_a_parameter/p.3.png b/fern/images/what_is_a_parameter/p.3.png index 8a38df03..f85c6c43 100644 Binary files a/fern/images/what_is_a_parameter/p.3.png and b/fern/images/what_is_a_parameter/p.3.png differ diff --git a/fern/images/what_is_a_parameter/p.4.png b/fern/images/what_is_a_parameter/p.4.png index eec455d7..52cda390 100644 Binary files a/fern/images/what_is_a_parameter/p.4.png and b/fern/images/what_is_a_parameter/p.4.png differ diff --git a/fern/images/what_is_a_parameter/p.5.png b/fern/images/what_is_a_parameter/p.5.png index c6ac953d..59bfb27a 100644 Binary files a/fern/images/what_is_a_parameter/p.5.png and b/fern/images/what_is_a_parameter/p.5.png differ diff --git a/fern/images/what_is_a_parameter/run_workflow.png b/fern/images/what_is_a_parameter/run_workflow.png new file mode 100644 index 00000000..7f712885 Binary files /dev/null and b/fern/images/what_is_a_parameter/run_workflow.png differ diff --git a/fern/images/what_is_a_parameter/run_workflow_with_credential.png b/fern/images/what_is_a_parameter/run_workflow_with_credential.png new file mode 100644 index 00000000..2665b1c9 Binary files /dev/null and b/fern/images/what_is_a_parameter/run_workflow_with_credential.png differ diff --git a/fern/images/workflows/clone-workflow.png b/fern/images/workflows/clone-workflow.png new file mode 100644 index 00000000..ea28cc19 Binary files /dev/null and b/fern/images/workflows/clone-workflow.png differ diff --git a/fern/images/workflows/create-workflow.png b/fern/images/workflows/create-workflow.png new file mode 100644 index 00000000..164abd27 Binary files /dev/null and b/fern/images/workflows/create-workflow.png differ diff --git a/fern/images/workflows/delete-block.png b/fern/images/workflows/delete-block.png new file mode 100644 index 00000000..da9f5d87 Binary files /dev/null and b/fern/images/workflows/delete-block.png differ diff --git a/fern/images/workflows/download-workflow.png b/fern/images/workflows/download-workflow.png new file mode 100644 index 00000000..dcaef95d Binary files /dev/null and b/fern/images/workflows/download-workflow.png differ diff --git a/fern/images/workflows/run-workflow.png b/fern/images/workflows/run-workflow.png new file mode 100644 index 00000000..18e9cb3e Binary files /dev/null and b/fern/images/workflows/run-workflow.png differ diff --git a/fern/workflows/consistent-workflows.mdx b/fern/workflows/consistent-workflows.mdx new file mode 100644 index 00000000..0241882f --- /dev/null +++ b/fern/workflows/consistent-workflows.mdx @@ -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 \ No newline at end of file diff --git a/fern/workflows/introduction.mdx b/fern/workflows/introduction.mdx index 277a0961..2a94f0ae 100644 --- a/fern/workflows/introduction.mdx +++ b/fern/workflows/introduction.mdx @@ -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. diff --git a/fern/workflows/manage-workflows.mdx b/fern/workflows/manage-workflows.mdx new file mode 100644 index 00000000..28872998 --- /dev/null +++ b/fern/workflows/manage-workflows.mdx @@ -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). + +The workflow is not auto saved. Don't forget to click the "Save" button on the top after editing your workflow. + +![image](../images/workflows/create-workflow.png) + +#### Delete a workflow block + +Click the ellipsis ("...") button and "Delete Block" on the top right corner of the block to delete it. + +![image](../images/workflows/delete-block.png) + +### 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. + +![image](../images/workflows/download-workflow.png) + + +### 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. + +![image](../images/workflows/clone-workflow.png) \ No newline at end of file diff --git a/fern/workflows/run-workflows.mdx b/fern/workflows/run-workflows.mdx new file mode 100644 index 00000000..28e86b6d --- /dev/null +++ b/fern/workflows/run-workflows.mdx @@ -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. + +![image](../images/workflows/run-workflow.png) + +Find the API doc [here](/api-reference/api-reference/agent/run-workflow) + +### Parameters + +### Webhook diff --git a/fern/workflows/what-is-a-parameter.mdx b/fern/workflows/what-is-a-parameter.mdx index c3283046..e95e0c1f 100644 --- a/fern/workflows/what-is-a-parameter.mdx +++ b/fern/workflows/what-is-a-parameter.mdx @@ -36,8 +36,6 @@ With these registered as parameters, the user doesn’t have to change the value - - **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!** diff --git a/fern/workflows/workflow-blocks-details.mdx b/fern/workflows/workflow-blocks-details.mdx new file mode 100644 index 00000000..294606b6 --- /dev/null +++ b/fern/workflows/workflow-blocks-details.mdx @@ -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. \ No newline at end of file diff --git a/fern/workflows/workflow-parameters.mdx b/fern/workflows/workflow-parameters.mdx new file mode 100644 index 00000000..4cfa53ba --- /dev/null +++ b/fern/workflows/workflow-parameters.mdx @@ -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 + + + +**Step 2.** Add a workflow parameter + + + + + +**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 + + + + + +**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!** + + + +**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. + + + +## Credential Parameters +Credential parameter can be an input for running a workflow. + + +You can also choose a credential parameter for a login block. + + +Pick the credential to use when running the workflow when you have defined a credential parameter in the workflow. + + +## 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. \ No newline at end of file