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

# Web request received Trigger

<Tip>
  This page describes the "Web request received" trigger. To send web requests to an external server from an existing workflow, use the ["Send web request" action](/workflows/apps/native-apps/primer-web-requests-app/send-web-request-action).
</Tip>

The "Web request received" trigger can be used as the starting point for custom workflows. This could be based on your internal logic or based on other services that do not have their own [workflow app](/workflows/apps/overview) yet.

## Setup

When you connect the Primer Web Requests app you get a webhook URL that you can send `JSON` requests to.

## Starting a workflow using this trigger

Any request sent to this URL will start a workflow when a [published workflow](/get-started/create-workflow#publish-your-workflow) using this trigger exists.

## Restrictions

The trigger currently has the following restrictions:

* only valid JSON payloads are supported
* the webhook will return an empty response. Use the ["Send web request" action](/workflows/apps/native-apps/primer-web-requests-app/send-web-request-action) if you want to send data to another system.

## Using the request payload

A `JSON` payload can be passed with the web request, but is optional. If provided, the payload is available as "unstructured data" in the output of the trigger.

An example payload could be the following JSON:

```json JSON theme={"dark"}
{
  "customRequestType": "TICKET_WORKFLOW",
  "eMail": "test@test.com",
  "ticketDescription": "A description to be passed when creating a ticket.",
  "ticketTitle": "Title for the new ticket to be created"
}
```

You can pass this data to another workflow block using the variable selector and specifying the **path** to the variable that should be used.

<Frame caption="Condition example">
  <img
    src="https://mintcdn.com/primer-cc826789/sTKljbqk0yjiDnE9/images/workflows/web-request-received/web-request-received.png?fit=max&auto=format&n=sTKljbqk0yjiDnE9&q=85&s=e04d2c481a85c639a01f8b98d83547e7"
    alt="Condition
example"
    width="1536"
    height="692"
    data-path="images/workflows/web-request-received/web-request-received.png"
  />
</Frame>

It is also possible to use that data to build conditions in the same way.

<Frame caption="Condition example">
  <img
    src="https://mintcdn.com/primer-cc826789/sTKljbqk0yjiDnE9/images/workflows/web-request-received/web-request-condition.png?fit=max&auto=format&n=sTKljbqk0yjiDnE9&q=85&s=067b515a4858e7f572a673915e0f49cc"
    alt="Condition
example"
    width="1536"
    height="714"
    data-path="images/workflows/web-request-received/web-request-condition.png"
  />
</Frame>

### Preventing accidental triggers

You can use [trigger conditions](/workflows/utilities/conditions-block#trigger-conditions-define-when-to-start-a-workflow) to prevent a workflow from being started unless a value defined by yourself is passed through. This could serve as a check for the right payload, or just a custom key that you pass.

In this example, a field called `customRequestType` with the value `TICKET_WORKFLOW` is part of the payload.

<Frame caption="Trigger condition example">
  <img
    src="https://mintcdn.com/primer-cc826789/sTKljbqk0yjiDnE9/images/workflows/web-request-received/web-request-trigger-condition.png?fit=max&auto=format&n=sTKljbqk0yjiDnE9&q=85&s=ad422a10f6b15e4c387bc58fcbbdd38b"
    alt="Trigger condition
example"
    width="1536"
    height="838"
    data-path="images/workflows/web-request-received/web-request-trigger-condition.png"
  />
</Frame>

This will only start the workflow if that value is passed, if an empty payload is received, or any other `customRequestType` then no workflow is started.

## Start automating

* Now that you know what can be achieved with this trigger, start [creating a workflow](/get-started/create-workflow).
* Debug received requests or requests sent within the [Workflow Runs](/workflows/monitor-workflows/overview)
