Conditioning doesn't work

Hi guy. I got part of my code like that:

parameters:
  trigger_building_something:
    type: boolean
    default: false

  build_something:
    when:
      and:
        and:
          - equal: [ << pipeline.parameters.trigger_building_something >>, true ]
        not:
          - equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]

I want to run this workflow every time that something will trigger trigger_building_something, but not when scheduled_pipeline will by triggering. Because scheduled pipelines trigger that workflow every time, and I don’t want it.
Do you guys have some advice on how to accomplish that?