# A new trello card was created
workflow:
  id: notify-new-trello-card
  name: Notify on new Trello card
  description: Send a slack notification when a new trello card is created
  triggers:
    - type: interval
      value: 60
  steps:
    - name: trello-cards
      provider:
        type: trello
        config: "{{ providers.trello-provider }}"
        with:
          board_id: hIjQQX9S
          filter: "createCard"
      condition:
        - name: assert-condition
          type: assert
          assert: "{{ state.notify-new-trello-card.-1.alert_context.alert_steps_context.trello-cards.results.number_of_cards }} >= {{steps.trello-cards.results.number_of_cards }}"
  actions:
    - name: trigger-slack
      provider:
        type: slack
        config: "{{ providers.slack-demo }}"
        with:
          channel: some-channel-that-youll-decide-later
          # Message is always mandatory
          message: >
            A new card was created
