Replies: 2 comments
-
Same applies for |
Beta Was this translation helpful? Give feedback.
0 replies
-
Added a "Proposal" section to the original post (it seems that currently there is no way to do it). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goal
An action should get a template as an input so the action can render it internally. For example, the action needs to supply variables to the render function. (Actual example can be found here.)
Challenge
It seems that currently action's data parameters are always getting rendered to strings before calling the action (here).
What was tried
Changing the type of the parameter to string doesn't help because of the code here and here which translates string parameters to templates when they contain a Jinja expression.
Ugly workaround
Use string with a special template format of square brackets
"[[ ... ]]"
instead of curly brackets"{{ ... }}"
. The action changes the string to be a valid template string before rendering it.Ask
Is there a way to avoid template rendering of action's parameter? Any thoughts or suggestions?
Proposal
Assuming there is currently no way to do so, here is a proposal:
data_raw
dictionary for fields which shouldn't get rendered (allowing integrations to get the raw values). The core change is here.raw
option for the template selector. Using this option puts the value under thedata_raw
dictionary instead of the regulardata
dictionary. The frontend change is here.(Both changes will be moved to PRs once the proposal gets approved.)
Beta Was this translation helpful? Give feedback.
All reactions