github.com/argoproj/argo-events@v1.9.1/examples/sensors/slack-trigger.yaml (about)

     1  apiVersion: argoproj.io/v1alpha1
     2  kind: Sensor
     3  metadata:
     4    name: webhook
     5  spec:
     6    dependencies:
     7      - name: test-dep
     8        eventSourceName: webhook
     9        eventName: example
    10    triggers:
    11      - parameters:
    12          - src:
    13              dependencyName: test-dep
    14              dataKey: body.channel
    15            dest: slack.channel
    16          - src:
    17              dependencyName: test-dep
    18              dataKey: body.message
    19            dest: slack.message
    20        template:
    21          name: slack-trigger
    22          slack:
    23            slackToken:
    24              key: token
    25              name: slack-secret
    26            channel: general
    27            message: hello world
    28  
    29  #          # For more info about Attachments API: https://api.slack.com/reference/messaging/attachments
    30  #          attachments: |
    31  #            [{
    32  #              "title": "Attachment1!",
    33  #              "title_link": "https://argoproj.github.io/argo-events/sensors/triggers/slack-trigger/",
    34  #              "color": "#18be52",
    35  #              "fields": [{
    36  #                "title": "Hello1",
    37  #                "value": "Hello World1",
    38  #                "short": true
    39  #              }, {
    40  #                "title": "Hello2",
    41  #                "value": "Hello World2",
    42  #                "short": true
    43  #              }]
    44  #            }, {
    45  #              "title": "Attachment2!",
    46  #              "title_link": "https://argoproj.github.io/argo-events/sensors/triggers/slack-trigger/",
    47  #              "color": "#18be52",
    48  #              "fields": [{
    49  #                "title": "Hello1",
    50  #                "value": "Hello World1",
    51  #                "short": true
    52  #              }, {
    53  #                "title": "Hello2",
    54  #                "value": "Hello World2",
    55  #                "short": true
    56  #              }]
    57  #            }]
    58  #
    59  #          # For more info about Blocks API: https://api.slack.com/reference/block-kit/blocks
    60  #          blocks: |
    61  #            [{
    62  #              "type": "actions",
    63  #              "block_id": "actionblock789",
    64  #              "elements": [{
    65  #                  "type": "datepicker",
    66  #                  "action_id": "datepicker123",
    67  #                  "initial_date": "1990-04-28",
    68  #                  "placeholder": {
    69  #                    "type": "plain_text",
    70  #                    "text": "Select a date"
    71  #                  }
    72  #                },
    73  #                {
    74  #                  "type": "overflow",
    75  #                  "options": [{
    76  #                      "text": {
    77  #                        "type": "plain_text",
    78  #                        "text": "*this is plain_text text*"
    79  #                      },
    80  #                      "value": "value-0"
    81  #                    },
    82  #                    {
    83  #                      "text": {
    84  #                        "type": "plain_text",
    85  #                        "text": "*this is plain_text text*"
    86  #                      },
    87  #                      "value": "value-1"
    88  #                    },
    89  #                    {
    90  #                      "text": {
    91  #                        "type": "plain_text",
    92  #                        "text": "*this is plain_text text*"
    93  #                      },
    94  #                      "value": "value-2"
    95  #                    },
    96  #                    {
    97  #                      "text": {
    98  #                        "type": "plain_text",
    99  #                        "text": "*this is plain_text text*"
   100  #                      },
   101  #                      "value": "value-3"
   102  #                    },
   103  #                    {
   104  #                      "text": {
   105  #                        "type": "plain_text",
   106  #                        "text": "*this is plain_text text*"
   107  #                      },
   108  #                      "value": "value-4"
   109  #                    }
   110  #                  ],
   111  #                  "action_id": "overflow"
   112  #                },
   113  #                {
   114  #                  "type": "button",
   115  #                  "text": {
   116  #                    "type": "plain_text",
   117  #                    "text": "Click Me"
   118  #                  },
   119  #                  "value": "click_me_123",
   120  #                  "action_id": "button"
   121  #                }
   122  #              ]
   123  #            }]