How to run voice assistant pipeline from automation or script

Hello,I am new to Home Assistant and need help running the voice assistant pipeline I created from an automation.So far, I have the following automation set up, but when I run it, I receive an error indicating that the domain is not provided for the assist service. I noticed that all services have their domains configured, corresponding to specific integrations within Home Assistant. However, the voice assistant documentation does not provide relevant information (Voice Assistant - Home Assistant).I attempted to use the assist_pipeline integration (Assist pipeline - Home Assistant), but I couldn’t get it to work from automation either.The only successful method I’ve found is to run it from the dashboard using the following tap_action:

tap_action:
  action: assist
  start_listening: true
  pipeline_id: preferred

However, I need to be able to trigger my voice assistant from automation, and I’m currently stuck. I’ve searched for similar topics in this forum but haven’t found anything relevant. Any tips on how to resolve this issue would be greatly appreciated.Thank you!

Automation I’m Struggling With

id: automation_run_my_assistant_pipeline
alias: “Run My Voice Assistant Pipeline”
description: “Trigger my voice assistant pipeline when the helper button is activated.”
trigger:

  • platform: state
    entity_id: input_boolean.my_voice_assistant_pipeline
    to: ‘on’
    action:
  • service: assist # Update this line with the correct service name
    data:
    start_listening: true
    pipeline_id: preferred