action

The action tag generates an action object, which in turn defines work to be performed by an action.

Syntax

This tag has several usage styles, each style resulting in a valid action object.

Block syntax

Liquid
JSON
Liquid
{% action "http" %}
{
"method": "post",
"url": "https://postman-echo.com/post",
"body": {{ event.data | json }}
}
{% endaction %}
JSON
{
"action": {
"type": "http",
"options": {
"method": "post",
"url": "https://postman-echo.com/post",
"body": null
}
}
}

Tag syntax, positional options

Liquid
JSON
Liquid
{% action "cache", "set", "foo", "bar" %}
JSON
{
"action": {
"type": "cache",
"options": [
"set",
"foo",
"bar"
]
}
}

Tag syntax, mapped options

Liquid
JSON
Liquid
{% action "echo", foo: "bar", baz: "qux" %}
JSON
{
"action": {
"type": "echo",
"options": {
"foo": "bar",
"baz": "qux"
}
}
}

Tag syntax, single option

Liquid
Liquid
{% action "echo", "foo" %}