Skip to content

Commit

Permalink
Update zapier.mdx (#951)
Browse files Browse the repository at this point in the history
  • Loading branch information
kati3-design authored Oct 11, 2024
1 parent f16a1b3 commit d43b0b5
Show file tree
Hide file tree
Showing 2 changed files with 165 additions and 1 deletion.
71 changes: 70 additions & 1 deletion docs/integrations/zapier.mdx
Original file line number Diff line number Diff line change
@@ -1 +1,70 @@
<img src="https://thumbs.dreamstime.com/b/pug-dog-holding-pliers-screwdriver-behind-old-wooden-sign-text-under-construction-white-background-constructor-92836854.jpg" />
---
title: 'Zapier'
---

## Running a Skyvern Task in Zapier

### Setup

1. Get a Skyvern account, navigate to settings and copy your API Key, you will need to link this in your Skyvern block in Zapier
2. Add a Skyvern Block, and select the “Run a Task” Action Event
3. A required “Account” section should populate, here is where you paste your [API Key](https://docs.skyvern.com/running-tasks/introduction#getting-your-api-key)
4. Once you’ve connected your account, you can press next and proceed to the second step “Configure”

<img src="/images/zapier/z.1.png"/>

<img src="/images/zapier/z.2.png"/>

### Configure

1. *(required) URL:* Skyvern’s starting point
2. *(often required) Navigation Goal:* details where Skyvern is going and what Skyvern is doing. Clear Navigation Goals will be a single goal, broken down into steps. 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
3. *(optional) Data Extraction Goal:* 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
4. *(optional) Navigation Payload:* if you need any content inputted during your task flow, that content goes here in JSON format
- If you want to run the same task for different users (i.e. filling out the same form multiple times), you should keep everything else the same and update the Navigation Payload
5. *(optional) Extracted Information Schema:* 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
6. *(optional) Webhook Callback URL:* This URL can be specified if you would like Skyvern to notify you when it’s finished executing
7. *(optional) Max Steps:* some users want to cap cost through the number of steps the task can take

<img src="/images/zapier/z.3.png"/>

<img src="/images/zapier/z.4.png"/>

### Test

1. This page will tell you what information “Data In” will be going to Skyvern, and what is empty. Make sure to check this before you “test step,” which we would highly recommend
2. Upon pressing “test step,” go to your Skyvern account where you can see it run. If everything worked as expected, fabulous! If not, feel free to refine your prompt in Skyvern before heading back to Zapier and sending another test

<img src="/images/zapier/z.5.png"/>


## Running a Skyvern Workflow in Zapier

### Setup

1. First, create your workflow in Skyvern. The purpose of this block is to run a pre-configured workflow inside of Zapier. Every workflow tool has limitations, allowing you to run a Skyvern workflow in another workflow builder extends the possibilities of their tool
2. Like with the task block, you will need to link your Skyvern account using your API key found in settings

<img src="/images/zapier/z.6w.png"/>

### Configure

1. Select what workflow you would like to run
1. If there are no selections, make sure to check your Skyvern account and see if you have any saved workflows you can run
2. Once you’ve selected the workflow you’d like to run, the only thing you need to configure are whatever parameters you have linked in your workflow.
1. If you don’t have parameters, and instead have fixed values, don’t worry!
3. If your workflow has parameters, they should populate. Add or amend the values to customize the workflow run

<img src="/images/zapier/z.7w.png"/>

<img src="/images/zapier/z.8w.png"/>

### Test

1. Upon pressing “test step,” go to your Skyvern account where you can see the workflow run. If everything worked as expected, fabulous! If not, try debugging in Skyvern before you retest in Zapier

<img src="/images/zapier/z.9w.png"/>
95 changes: 95 additions & 0 deletions docs/workflows/what-is-a-parameter.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
title: What the heck is a parameter?
---

## 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

* Note that if you are looking to add a username or password parameter, you must first contact us

<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"/>

<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"/>

<img src="/images/what_is_a_parameter/p.8.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/p.9.png"/>

## Using Parameters

There are two ways to use parameters in Skyvern’s Workflow Agent (Beta):

### 1. Parameterized Fields: certain fields can accept a fixed string value or a parameter


If you are looking to load a parameterized value into the following fields, you can only do so by passing the parameter’s key, or name, as text into the input:

* Task block: URL, Suffix, TOTP Identifier
* For Loop: loop over value
* File Parser: URL
* Send Email: recipients, body

**Steps**

1. Create the parameter in the parameter dropdown in the menu. In this case, the key is “website_URL”
2. Type the key freeform into the task URL

<img src="/images/what_is_a_parameter/u.1.png"/>


### 2. Block Parameters: any parameter linked in the block that will be passed into the LLM as context Skyvern needs to complete the task. Any other non-parameterized fields accept block parameters this way.


Create this value when you have details that vary from run-to-run:

* For instance, you can parameterize usernames or passwords, how to do something, dates, or uploaded files
* Ask yourself: does this vary run-by-run? If the answer is yes, there might be value in creating a parameter for it
* Examples: start_date, end_date, procurement_list_file, email_recipients, how_to_download_an_invoice
* to load these values, you can add them in the workflow editor using the run parameters tab in the header
* Make sure to check if this value needs to go into a parameterized field, if not, load them into the parameters drop down, you don’t need to worry about the placement or order as the LLM pieces together what goes where

**Steps**

1. Create the parameter in the parameter dropdown in the menu. In this case, the parameter keys are start_date, end_date, and how_to_find_invoices_page
2. Link the values in the parameters dropdown menu

<img src="/images/what_is_a_parameter/u.2.png"/>


## Future Plans for Parameters

Our main goal is to make every field a parameterized field and remove block parameters

* We know it’s confusing, but it’s only temporary! In the future we’re headed toward loading parameters directly into each input field.
* One day, your prompt may look like “Find the invoices page using **/how_to_find_invoices_page**, filter the invoices using **/start_date** and **/end_date** provided.” Or perhaps brackets as are traditionally used in code.

0 comments on commit d43b0b5

Please sign in to comment.