SlackIncomingWebhook icon
Pause icon
Request icon

Business Processes workflow example: Getting started with Kestra

Automate a vacation approval business process with Kestra. Send a Slack approval request, pause for a human to resume, then submit the request to an API.

Categories
Getting StartedBusinessCore

Automate a human-in-the-loop business process for vacation approvals with Kestra. This getting started flow shows how to combine an automated Slack notification, a manual approval gate, and an HTTP API submission into one declarative YAML workflow. It solves a common problem in business process automation: how to pause an automated pipeline for a human decision and then resume downstream steps once approval is granted, without writing custom glue code or a separate approval service.

How it works

  1. The flow collects request details through inputs: an employee request.name, a request.start_date, a request.end_date, and a slack_webhook_uri. Kestra renders these as a form automatically in the UI.
  2. The send_approval_request task (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) posts a message to Slack with a link back to the execution so an approver can act.
  3. The wait_for_approval task (io.kestra.plugin.core.flow.Pause) pauses the execution with a pauseDuration of PT30S, holding the flow until a human clicks Resume in the Kestra UI.
  4. Once resumed, the process_request task (io.kestra.plugin.core.http.Request) sends a POST with contentType application/json and the approved request payload to the target API.

What you get

  • An auto-generated request form driven by typed inputs.
  • A Slack approval notification with a direct resume link.
  • A manual approval gate that suspends execution until a person acts.
  • An automated API submission of the approved request.

Who it's for

  • People operations and HR teams automating approvals.
  • Platform and automation engineers building human-in-the-loop pipelines.
  • Anyone new to Kestra learning how to mix manual steps with automation.

Why orchestrate this with Kestra

Slack incoming webhooks can post a message, but they cannot pause a process, wait for a decision, and then run conditional follow-up work. Kestra fills that gap. The declarative YAML keeps the whole approval process in one versioned file, the Pause task models the human gate natively, and execution state, retries, and full lineage are tracked end to end. You can trigger the flow on a schedule or an event, audit every approval, and replay failed runs, capabilities a standalone webhook or chat tool cannot provide.

Prerequisites

  • A running Kestra instance.
  • A Slack incoming webhook URL (or use the default mock endpoint to test).
  • An HTTP endpoint that accepts the request payload.

Secrets

This getting started example uses no secrets. The Slack webhook is passed through the slack_webhook_uri input. For production, move it to a secret with {{ secret('SLACK_WEBHOOK_URI') }} instead of an input default.

Quick start

  1. Add this flow to your Kestra instance.
  2. Set slack_webhook_uri to your real Slack incoming webhook.
  3. Execute the flow and fill in the name and dates in the generated form.
  4. Open the Slack message and click the resume link, then click Resume in the UI.
  5. Confirm the process_request task submits the approved payload.

How to extend

  • Replace the mock URI in process_request with your HR or HTTP backend.
  • Increase pauseDuration or remove it so the flow waits indefinitely for approval.
  • Add a Switch task to branch on approve versus reject responses.
  • Add a Schedule or webhook trigger to start the process automatically.
  • Send a confirmation Slack message after submission.

Links

Orchestrate with Kestra
Orchestrate Slack with Kestra
Share this Blueprint
See How

New to Kestra?

Use blueprints to kickstart your first workflows.