Workflow Blocks
Individual Blocks within Skyvern
TaskBlock
The magic block. Skyvern navigates through the websites to take actions and/or extract information.
Example block:
Inputs:
- URL (often required): Skyvern Agent’s starting point. Ideally the website you’d like to automate.
- In the workflows interface, if this input is left blank it will continue where the previous node left off. The idea of a navigation goal is to set or reset where the agent starts off.
- If you’re logging in to a site using the first task block, you would want to leave URL blank for the second block so that it can continue after logging in
- Navigation Goal (often required): details where Skyvern is going and what Skyvern is doing. Clear Navigation Goals will be a single goal, broken down into steps. Avoid supplying multiple goals. You need to specify when the goal is complete, using “COMPLETE”, or when to abandon that goal, using “TERMINATE”
- The navigation goal is not used to load the URL. Asking Skyvern to “go to website A” in this field will not have the intended effect
- Terminations result in Skyvern explaining why it stopped navigating
- This field can be omitted if you only want Skyvern to extract data without navigating anywhere else
- Data Extraction Goal (optional): aside from where Skyvern is going and what Skyvern is doing, is there anything that Skyvern is extracting and returning back? A good data extraction goal is specific about what Skyvern is returning to the user
- Note that data extractions only happen after Skyvern is finished navigating
- Extracted Information Schema (optional): if you have a data extraction goal, some users need it formatted in a certain way for internal purposes. Navigation payload accepts JSON formatted specifications for how the data should be returned
- Max Steps Override (optional): some users want to cap cost through the number of steps the task can take
- Max Retries (optional): the number of times a step can be retried if it fails
- Complete on Download (optional): Allows Skyvern to complete the task after a file has been downloaded
- File Suffix (optional): an identifier attached to the downloaded file
- TOTP URL and TOTP Identifier (optional): if you have an internal system where you can store the 2FA TOTP code, this URL calls on this storage space. The identifier allows you to link the code to the task, this is critical if you are running multiple tasks concurrently. Contact us if you would like to set up 2FA retreival in your workflows.
- Parameters (optional): parameters are self-defined placeholders that are specified run-to-run. They can either be workflow parameters, passed in via an API call, or output parameters, extracted from a previous task block. If specified, they are used by Skyvern to assist in the navigation, to fill out forms or further influence what actions to take on a website.
ForLoopBlock
Iterate over something such as a CSV or the output of a previous block. The blocks nested under loop_blocks
are the blocks that will be repeated for each entry in the
Inputs:
- Loop Value (required): This is the value that the loop will iterate over. For instance, if you have for every invoice ID, do X, invoice ID would be the value for this input.
- Please contact us if you would like to add a loop block. Since we’re in beta, the loop value needs to be parameterized from the backend.
- Another block nested within the loop (required)
CodeBlock
This block executes user-defined Python code within our execution environment. It’s 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
Example Block with Browser Control
Inputs:
- Code (required): Insert your custom Python code so that you can define your own custom block.
TextPromptBlock
Do a custom OpenAI query as a part of your workflow
Inputs:
- Prompt (required): Write a natural language prompt to be sent to the LLM to generate a text response
- JSON Schema (optional): Craft a JSON input that structures the LLM output for use in another programming task
DownloadToS3Block / UploadToS3Block
Persists files inside S3
- Since we’re in beta, this feature is unavailable right now, contact us if you would like to use it.
SendEmailBlock
Sends an email with some data
Inputs:
- Recipients (required): a list of people who will receive the email separated by commas
- Subject/Body (optional): the header and body of an email
- File attachments (optional): since we’re still in beta, you will need to contact us to upload attachments to the email
FileParserBlock
Downloads and parses a file to be used within other workflow blocks.
Supported types: CSV
Inputs:
- File URL (required): This block allows you to use a CSV within your workflow.
- Since we’re still in beta, you will need to contact us to load a value into this block