Update workflow docs (#593)

Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
This commit is contained in:
mintlify[bot]
2024-07-11 13:31:58 -07:00
committed by GitHub
parent 102d73b60e
commit 0ba1e51c3c

View File

@@ -31,7 +31,7 @@ Workflow parameters are specific parameters youre going to be passing into th
| --- | --- | --- | --- | --- |
| key | String | yes | alibaba_url | unique key corresponding to a specific parameter |
| parameter_type | Enum | yes | workflow | The type of parameter for the workflow. Meant to indicate whether this parameter is being passed in via the run workflow endpoint (workflow), or whether a parameter is the output of a different workflow step (output). Can be workflow , context, aws_secret, or output |
| workflow_parameter_type | Enum | no? | string | The actual type of the parameter, meant to be used for type-safety reasons.<br/>Supported types:<br/>STRING = "string"<br/>INTEGER = "integer"<br/>FLOAT = "float"<br/>BOOLEAN = "boolean"<br/>JSON = "json” |
| workflow_parameter_type | Enum | no? | string | The actual type of the parameter, meant to be used for type-safety reasons.<br/>Supported types:<br/>STRING = "string"<br/>INTEGER = "integer"<br/>FLOAT = "float"<br/>BOOLEAN = "boolean"<br/>JSON = "json”<br/>FILE_URL = "file_url” |
| description | string | yes | Alibaba product URL for checking the price of the product | Description of the parameter |
## Blocks
@@ -100,7 +100,11 @@ Iterate over something such as a CSV or the output of a previous block. The bloc
```
### CodeBlock
This block executes user-defined code within our execution environment. Its able to take parameters as input and transform them based on a certain specification
This block executes user-defined Python code within our execution environment. Its able to take parameters as input and transform them based on a certain specification.
In addition to running simple code snippets, CodeBlock allows you to:
- execute asynchronous code
- control your browser page inside Skyvern
**Example Block**
@@ -118,6 +122,23 @@ This block executes user-defined code within our execution environment. Its a
output_parameter_key: price_diff_percentage
```
**Example Block with Browser Control**
```json
- block_type: code
label: get_tab_details
code: |
print("Getting tab details")
result = {
"url": skyvern_page.url,
"title": await skyvern_page.title()
}
print("Got details:", result)
print("Now I want to see a cat")
await skyvern_page.goto("https://cataas.com/cat")
```
### TextPromptBlock
Do a custom OpenAI query as a part of your workflow
@@ -144,9 +165,9 @@ Do a custom OpenAI query as a part of your workflow
Persists files inside S3
```
- block_type: upload_to_s3
label: upload_downloaded_files_to_s3
path: SKYVERN_DOWNLOAD_DIRECTORY
- block_type: upload_to_s3
label: upload_downloaded_files_to_s3
path: SKYVERN_DOWNLOAD_DIRECTORY
```
### SendEmailBlock
@@ -154,23 +175,36 @@ Persists files inside S3
Sends an email with some data
```
- block_type: send_email
label: send_email
smtp_host_secret_parameter_key: smtp_host
smtp_port_secret_parameter_key: smtp_port
smtp_username_secret_parameter_key: smtp_username
smtp_password_secret_parameter_key: smtp_password
sender: hello@skyvern.com
recipients:
- founders@skyvern.com
subject: Skyvern - Downloaded Invoices Demo
body: website_url
file_attachments:
- SKYVERN_DOWNLOAD_DIRECTORY
- block_type: send_email
label: send_email
smtp_host_secret_parameter_key: smtp_host
smtp_port_secret_parameter_key: smtp_port
smtp_username_secret_parameter_key: smtp_username
smtp_password_secret_parameter_key: smtp_password
sender: hello@skyvern.com
recipients:
- founders@skyvern.com
subject: Skyvern - Downloaded Invoices Demo
body: website_url
file_attachments:
- SKYVERN_DOWNLOAD_DIRECTORY
```
### FileParserBlock
Downloads and parses a file to be used within other workflow blocks.
**Supported types:** csv
```
- block_type: file_url_parser
label: csv_parser
file_type: csv
file_url: <csv_file_url>
```
## Managing Credentials
## Managing Credentials and Sensitive Information
This is something the Skyvern team will need to set you up with today. If you're interested, please [book a call with Suchintan](https://meetings.hubspot.com/suchintan)