Getting started with Kestra — a Business Processes workflow example

About this blueprint

API Getting Started Inputs Notifications

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:

  1. The first task sends a Slack message to request approval for a vacation.
  2. The second task pauses the execution to wait for the approval.
  3. Once the execution is resumed, the third task processes the vacation request.
id: business_processes
namespace: tutorial
description: Business Processes

  - id:
    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

  - id: send_approval_request
    type: io.kestra.plugin.notifications.slack.SlackIncomingWebhook
    url: "{{ inputs.slack_webhook_uri }}"
    payload: |
        "channel": "#vacation",
        "text": "Validate holiday request for {{ }}. To approve the request, click on the `Resume` button here http://localhost:8080/ui/executions/{{flow.namespace}}/{{}}/{{}}"

  - id: wait_for_approval
    type: io.kestra.plugin.core.flow.Pause

  - id: process_request
    type: io.kestra.plugin.core.http.Request
    method: POST
    contentType: application/json
    body: "{{ inputs.request }}"

Slack Incoming Webhook



New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra