Skip to content

Commit 92bc7e4

Browse files
authored
Adding video links for each new built in function (PipedreamHQ#2799)
1 parent eb45e85 commit 92bc7e4

4 files changed

Lines changed: 22 additions & 29 deletions

File tree

docs/docs/.vuepress/components/VideoPlayer.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ iframe {
88
<iframe
99
width="660"
1010
height="371"
11-
:src="url"
11+
:src="embedUrl"
1212
:title="title"
1313
frameborder="0"
1414
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
@@ -22,6 +22,12 @@ export default {
2222
props: {
2323
url: String,
2424
title: String,
25+
startAt: String,
26+
},
27+
computed: {
28+
embedUrl() {
29+
return `${this.url}${this.startAt ? `?start=${this.startAt}` : ""}`;
30+
},
2531
},
2632
};
2733
</script>

docs/docs/code/nodejs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ You can return HTTP responses from [HTTP-triggered workflows](/workflows/steps/t
259259

260260
## Ending a workflow early
261261

262+
<VideoPlayer title="Conditionally run Workflows" url="https://www.youtube.com/embed/sajgIH3dG58" startAt="205" />
263+
262264
Sometimes you want to end your workflow early, or otherwise stop or cancel the execution or a workflow under certain conditions. For example:
263265

264266
- You may want to end your workflow early if you don't receive all the fields you expect in the event data.

docs/docs/code/nodejs/delay/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ thumbnail: https://res.cloudinary.com/pipedreamin/image/upload/v1646841376/docs/
55

66
# Delaying a workflow in Node.js
77

8+
<VideoPlayer title="Delaying Workflow Steps" url="https://www.youtube.com/embed/IBORwBnIZ-k" startAt="148" />
9+
810
Use `$.flow.delay` to [delay a step in a workflow](/workflows/built-in-functions/#delay).
911

1012
These docs show you how write Node.js code to handle delays. If you don't need to write code, see [our built-in delay actions](/workflows/built-in-functions/#delay-actions).

docs/docs/workflows/built-in-functions/README.md

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Use Pipedream built-in functions to filter, delay, and perform other common oper
1010

1111
## Delay
1212

13+
<VideoPlayer title="Delaying Workflow Steps" url="https://www.youtube.com/embed/IBORwBnIZ-k" />
14+
1315
Sometimes you need to wait a specific amount of time before the next step of your workflow proceeds. Pipedream supports this in one of two ways:
1416

1517
1. The built-in **Delay** actions
@@ -42,12 +44,6 @@ Delayed executions can hold one of three states:
4244

4345
You'll see the current state of an execution by [viewing its event data](/workflows/events/inspect/).
4446

45-
### How invocations are charged for delayed invocations
46-
47-
Each time a workflow is resumed from a paused state, Pipedream charges another [invocation](/pricing/#invocations). For example, if you pause your workflow once, each incoming event will charge two invocations: one for the steps before the delay, and another for the steps that ran after the delay.
48-
49-
You are not charged [compute time](/limits/#compute-time-per-day) for the time your workflow is paused.
50-
5147
### Cancelling or resuming execution manually
5248

5349
The [**Delay** actions](#delay-actions) and [`$.flow.delay`](/code/nodejs/delay/) return two URLs each time they run:
@@ -63,34 +59,21 @@ If you use [`$.flow.delay`](/code/nodejs/delay/), you can send these URLs to you
6359

6460
## Filter
6561

66-
Using filters within your workflow allows you to only proceed when certain conditions are met. You can configure specific criteria that must be met, as well as whether you'd like to stop or proceed with your workflow. Filters are a simple yet powerful tool for customizing your workflow, and can be a few different ways:
62+
<VideoPlayer title="Conditionally run Workflows" url="https://www.youtube.com/embed/sajgIH3dG58" />
6763

68-
1. One of the built-in **Filter** actions
69-
2. `$.flow.exit` in code
70-
71-
### Filter actions
72-
73-
To apply filters within your workflow without writing any code,
74-
75-
1. Click the **+** button below any step
76-
2. Search for the **Filter** app
77-
3. Select the action that makes sense for your use case
64+
Use the Filter action to quickly stop or continue workflows on certain conditions.
7865

79-
#### Continue or End Workflow on Condition
66+
![Create a filter action](https://res.cloudinary.com/pipedreamin/image/upload/v1651603927/docs/animations/CleanShot_2022-05-03_at_13.51.17_za1skw.gif)
8067

81-
These actions let you configure the specific condition you'd like to evaluate:
68+
Add a filter action to your workflow by searching for the **Filter** app in a new step.
8269

83-
- **Value type**: What type of input would you like to evaluate?
84-
- **Condition**: Based on the value type, what is the condition to evaluate?
85-
- **Value to evaluate**: The field you want to check (e.g., something like, "Name").
86-
- **Value to compare against**: The value you want to compare the field against (e.g., something like, "Luke Skywalker").
70+
The **Filter** app includes several built-in actions: Continue Workflow on Condition, Exit Workflow on Condition and Exit Workflow on Custom Condition.
8771

88-
![Filter step](https://res.cloudinary.com/pipedreamin/image/upload/v1651610369/docs/components/Screenshot_2022-05-03_at_1.31.57_PM_glsds4.png)
72+
In each of these actions, the **Value** is the subject of the condition, and the **Condition** is the operand to compare the value against.
8973

90-
#### End Workflow on Custom Condition
74+
For example, to only process orders with a `status = ready`
9175

92-
This is a basic action that will immediately end your workflow. You can also add an optional prop that must evaluate to `true` (the most common use case here would be to evaluate the output of an earlier step within the workflow).
76+
### Continue Workflow on Condition
9377

94-
### Using `$.flow.exit` in code
78+
With this action, only when values that _pass_ a set condition will the workflow continue to execute steps after this filter.
9579

96-
If you need to extend the functionality even further and want to do this in code, [check out the docs](/code/nodejs/#ending-a-workflow-early) on `$.flow.exit()`.

0 commit comments

Comments
 (0)