> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voucherify.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Build workflows

> Create, connect, publish, and activate a workflow for Loyalty v2 events

Use this guide to send Loyalty v2 events to an external application with a workflow.

<Info>
  <Badge color="gray">Prerequisites</Badge>

  Prepare:

  * An active Loyalty v2 program.
  * An endpoint that accepts HTTP `POST` requests.
  * A webhook secret key if you want to verify signatures.
</Info>

## Create and publish a workflow

Go to the **Workflows** section in the Dashboard.

<Steps>
  <Step title="Create the workflow">
    In **Workflows**, click **Create workflow**.

    Enter a **Name** and an optional **Description**. Click **Save draft** to open the canvas.
  </Step>

  <Step title="Add a trigger">
    From **Building blocks**, drag a trigger, like **Loyalty transaction** or **Loyalty activity**, onto the canvas.

    Click on the trigger. Use the right panel to choose its group and event. Loyalty transaction triggers also include a status filter.
  </Step>

  <Step title="Add an action">
    From **Actions**, drag an action, like **Webhook callout**, onto the canvas. Click on the action and enter its **Endpoint URL**.

    The URL must use `http` or `https`. You can also add up to 10 custom headers.
  </Step>

  <Step title="Connect the building blocks">
    Drag a line from the trigger's right output. Connect it to the left input of an action.

    A trigger can connect to several webhook callouts. A webhook callout can also accept several triggers.
  </Step>

  <Step title="Save and publish">
    Click **Save** to store your changes. Saving does not start the workflow.

    Click **Publish** after the graph is complete. Set the published workflow to **Active**.
  </Step>
</Steps>

<Check>
  The workflow status is **Active**. Matching Loyalty v2 events can now start a workflow run.
</Check>

## Verify webhook signatures

Generate a secret in **Project settings** > **Webhooks**. Validate the `x-voucherify-signature` header when your endpoint receives a callout.

Read [Webhook authentication](/api-reference/introduction-to-webhooks#authentication) for signature verification examples.

## Deactivate a workflow

Set a published workflow to **Inactive** to stop new runs.

Deactivation does not cancel runs that have already started. Read [Deactivation and version behavior](/integrations/workflow-options-limits#deactivation-and-version-behavior) for details.

## Next steps

Go to the following pages for more information:

* Review [workflow options and limits](/integrations/workflow-options-limits) for configuration options, statuses, and limits.
* Review [Workflows webhooks](/api-reference/workflows-webhooks) for payload structures.
* Use [Webhook sendouts](/analyze/audit-logs#webhook-sendouts) to inspect deliveries and retry failed sendouts.
* Review [webhook response and retry behavior](/api-reference/introduction-to-webhooks#responding-to-webhooks).
