Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fredsted committed Dec 11, 2024
1 parent e8e5ad2 commit c80e1a2
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 11 deletions.
22 changes: 22 additions & 0 deletions docs/custom-actions.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,28 @@ With Custom Actions, it is possible to create a workflow out of a set of actions

Using this functionality, you can connect APIs that aren't compatible, convert a HTTP request to an email or vice versa, build workflows that would otherwise require a developer, and much, much more.

The general principle of Custom Actions is that they are always executed in a chain. As they run, [Variables](/custom-actions/variables.html) are exchanged between them.

Additionally, the [Conditions](/custom-actions/action-types.html#conditions) action can define certain conditions that are used to decide whether specific actions run or not.

Even though actions are run in a chain, it's still possible to branch out and run actions in an asynchronous manner via [queued actions](/custom-actions.html#queued-actions), or loop over sets of data using actions that can be [repeated](https://docs.webhook.site/custom-actions.html#repeating-actions).

On each request, the output for all the different actions is collected so you can go back and see what happened. If the action sends HTTP Requests, both the request and response details are shown.

<figure markdown="span">
![Auto JSON in action](/images/kCuUKnGNu1NNGv4j7Y3UXTyV.png){ width="300" }
<figcaption>Action output shown on individual requests along with HTTP Request data</figcaption>
</figure>

If actions fail, the request they ran on is marked. It is possible to set up [notifications](https://webhook.site/notifications) for when actions (and Schedules) fail. In Control Panel, [Error Log](https://webhook.site/control-panel/error-log) provides a convenient way to search for errors occurring across all URLs and Schedules associated with the Webhook.site account.

With [Replay](/custom-actions.html#replay), it's possible to run the actions again, e.g. for actions that failed previously.

<figure markdown="span">
![Auto JSON in action](/images/ZxJHuOqDle5GG5kzDyc2WyPt.png){ width="300" }
<figcaption>Error Log is a convenient way to monitor Schedules and Custom Actions</figcaption>
</figure>

## Demos

### JavaScript, X and Schedules
Expand Down
21 changes: 10 additions & 11 deletions docs/custom-actions/action-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,13 +407,18 @@ When the URL is visited with a Web browser, a username and password form will be

!["Condition" Custom Action screenshot](/images/condition-action.png)

Useful if you need to validate that the request does or does not conform to certain criteria, the Condition action will either stop or continue based on a condition.
Useful for validating if variables conform to a set of certain criteria, this action will either create a condition that can be used in downstream actions, or simply stop or continue the action flow entirely.

In both the *input* and the *value* fields, variables will be replaced (including Global Variables from the Control Panel), so you can compare e.g. JSONPath or Regex values - or even values from a previous HTTP request that was sent.
<figure markdown="span">
![Basic Auth in browsers](/images/EQeP6s783LK1y5hnj6u7ObvO.png){ width="300" }
<figcaption>Using a defined condition in downstream actions</figcaption>
</figure>

In both the *input* and the *value* fields, variables can be used (including Global Variables from the Control Panel), so you can compare e.g. JSONPath or Regex values - or even values from a previous HTTP request that was sent.

Currently, three *actions* are provided: use result, stop and continue. *Use Result* allows using the Condition result in further actions. *Stop* will stop further action execution of the condition is a match. *Continue* will *only* continue further execution if the condition is a match, and otherwise stop.
Currently, three *actions* are provided: use result, stop and continue. *Use Result* allows using the Condition result in downstream actions. *Stop* will stop further action execution of the condition is a match. *Continue* will *only* continue further execution if the condition is a match, and otherwise stop.

To make an *is equal to* condition on a boolean value from a JSON structure, you can enter `0` for `false` or `1` for `true`.
To make an *equal to* condition on a boolean value from a JSON structure, you can enter `0` for `false` or `1` for `true`.

#### Operators with value argument

Expand All @@ -440,13 +445,7 @@ To make an *is equal to* condition on a boolean value from a JSON structure, you
* is domain - e.g. `webhook.site`
* is URL - e.g. `https://webhook.site?value=xxx`

The "result" of the condition will be logged below the request details, so you can see what happened.

To use the result of the Condition, select it in the "only run when condition passes" checkbox:

![](/images/EQeP6s783LK1y5hnj6u7ObvO.png)

Tip: To check if a Variable is set (or exists), you must enter the variable name in both input and value fields and use the "is not equal to" operator, since non-existing variables are not replaced.
The "result" of the condition will be logged to the action output, so you can see what happened.

### Set Variable

Expand Down
Binary file added docs/images/ZxJHuOqDle5GG5kzDyc2WyPt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/kCuUKnGNu1NNGv4j7Y3UXTyV.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/news.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Subscribe below to receive updates about improvements and new features on Webhoo
</form>
</div>

## 11 December 2024

* Fixed an issue where a JavaScript Custom Action running from incoming emails with attachments would cause an error.

## 10 December 2024

* It's now easier to find requests with Custom Action errors – now they're highlighted in the request sidebar.
Expand Down

0 comments on commit c80e1a2

Please sign in to comment.