Source
yaml
id: business-processes
namespace: tutorial
description: Business Processes
inputs:
  - id: request.name
    type: STRING
    defaults: Rick Astley
  - id: request.start_date
    type: DATE
    defaults: 2024-07-01
  - id: request.end_date
    type: DATE
    defaults: 2024-07-07
  - id: slack_webhook_uri
    type: URI
    defaults: https://kestra.io/api/mock
tasks:
  - id: send_approval_request
    type: io.kestra.plugin.notifications.slack.SlackIncomingWebhook
    url: "{{ inputs.slack_webhook_uri }}"
    payload: |
      {
        "channel": "#vacation",
        "text": "Validate holiday request for {{ inputs.request.name }}. To approve the request, click on the `Resume` button here http://localhost:8080/ui/executions/{{flow.namespace}}/{{flow.id}}/{{execution.id}}"
      }
  - id: wait_for_approval
    type: io.kestra.plugin.core.flow.Pause
    pauseDuration: PT30S
  - id: process_request
    type: io.kestra.plugin.core.http.Request
    uri: https://kestra.io/api/mock
    method: POST
    contentType: application/json
    body: "{{ inputs.request }}"
About this blueprint
Getting Started Notifications API Kestra
This flow is a simple example of a business process automation use case for vacation approval.
The user first submits a vacation request using a form automatically created
in the Kestra UI thanks to inputs. The flow then sends a Slack message to
request approval for a vacation, waits for the approval, and then processes
the request. The approval is as simple as clicking on the Resume button in
the Kestra UI.
The flow has three tasks:
- The first task sends a Slack message to request approval for a vacation.
 - The second task pauses the execution to wait for the approval.
 - Once the execution is resumed, the third task processes the vacation request.
 
More Related Blueprints