Yaml from input

I have a blueprint that has a field for a custom command !input 'custom_action'. I would like to append the yaml in my field:

service: shell_command.upload_backup_clip
data_template:
  camera: {{camera}}

to a sequence in blueprint. I tried:

            sequence:
            - service: notify.{{ group_target }}
           ....
            - !input 'custom_action'

and

            sequence:
            - service: notify.{{ group_target }}
           ....
              sequence: !input 'custom_action'

but both resulted in invalid automation syntax.
How to inject yaml from a field to an automation?

it would just be sequence: !input custom_action assuming it’s a list of actions.

If you want it to be conditional… use a choose or if statement, paired with a variable.

variables:
  custom_action: !input custom_action
action:
... other stuff ...
- if: "{{ custom_action }}"
  then: !input custom_action