---
title: "Create a recipe in Sitecore Connect"
slug: "create-a-recipe-in-sitecore-connect"
abstract: "Create a Sitecore Connect recipe to trigger audience export actions from CDP exports using a webhook and a configured payload schema."
---
# Create a recipe in Sitecore Connect

Before you can connect a recipe to an audience export in CDP, you first need to create one in Sitecore Connect. A recipe provides a webhook address and defines the action to perform such as retrieving audience export data from CDP.

This walkthrough describes how to:

1. [Generate a webhook address and set up the payload schema](https://doc.sitecore.com/cdp/en/users/sitecore-cdp/audience-export/create-a-recipe-in-sitecore-connect.html#UUID-ed310f77-1d3b-61c5-23be-9f341f3999f4_section-idm234858343337571 "Generate a webhook address and set up the payload schema")
2. [Add a Sitecore CDP action to the recipe](https://doc.sitecore.com/cdp/en/users/sitecore-cdp/audience-export/create-a-recipe-in-sitecore-connect.html#UUID-ed310f77-1d3b-61c5-23be-9f341f3999f4_section-idm23485835903113 "Add a Sitecore CDP action to the recipe")

## Generate a webhook address and set up the payload schema

To generate a webhook address and set up the payload schema:

1. In Sitecore Connect, in a project, click **Create** > **Recipe**.
2. In the **Set up your recipe** window, click **Trigger from a webhook**, then click **Start building**.
3. In the **Setup** pane, click **setup manually**.
4. In the **Event name** field, enter a unique event name, for example, *CDP to Connect*. An HTTPS webhook URL displays.
5. In the **Payload configuration** section, click **Use JSON** under **Payload schema**.
6. In the **Generate schema** window, paste the following JSON sample, then click **Next**.

    ```json
    {
      "audienceExportExecutionRef": "",
      "friendlyId": "",
      "clientKey": "",
      "audienceExportRef": ""
    }
    ```

7. Review the schema preview, then click **Generate schema**.
8. In the **Payload configuration** section, the JSON schema is now added to the **Payload schema** section.

## Add a Sitecore CDP action to the recipe

After configuring the webhook and payload, continue by adding a Sitecore CDP action to the recipe. This enables you to define a specific action to perform on the audience export output in Sitecore Connect.

To add a CDP action to the recipe:

1. On the recipe canvas, below **Actions**, click the plus icon and select **Action in an app**.
2. In the **App** pane, search for **Sitecore CDP** then click it.
3. In the **Action** pane, choose the CDP action you want to perform. For example:
    - Audience Export - Get latest files
    - Audience Export - Get files by execution ref
    - Audience Export Delta - Get latest files
    - Audience Export Delta - Get files by execution ref
    - Upload a batch file to Sitecore CDP
    - Get status of your batch file upload
    - Custom action

    In this procedure, we select **Audience Export Delta - Get latest files** as an example.

    > [!tip]
    > For specific use cases, see the walkthroughs to create these recipes: [Receive the latest output in Sitecore Connect](https://doc.sitecore.com/cdp/en/users/sitecore-cdp/audience-export/receive-the-latest-output-of-an-audience-export-in-sitecore-connect.html "Receive the latest output of an audience export in Sitecore Connect") and [Receive a specific output in Sitecore Connect](https://doc.sitecore.com/cdp/en/users/sitecore-cdp/audience-export/receive-a-specific-output-of-an-audience-export-in-sitecore-connect.html "Receive a specific output of an audience export in Sitecore Connect").

4. In the **Connection** pane, if you already have an active connection to use, select it. Otherwise, click **New connection**, complete the following fields, then click **Connect**.
    - **Client key** and **API token** - find these [values](https://doc.sitecore.com/cdp/en/users/sitecore-cdp/managing-sitecore-cdp-system-settings/manage-api-access-in-sitecore-cdp.html "Manage API access in Sitecore CDP") in Sitecore CDP by clicking ![cdp_gear_icon.png](https://doc.sitecore.com/api/markdown-image/cdp/en/users/sitecore-cdp/images/cdp_gear_icon.png) > **API access**.
    - **Client ID** and **Client secret** - the client ID is the API key, and the client secret is the API secret. Find these values by [creating an API key](https://doc.sitecore.com/cdp/en/users/sitecore-cdp/developer-center/api-keys/create-an-api-key.html "Create an API key") in Sitecore CDP > **Developer Center** > **API keys**.
    - **AWS region** - find this value in Sitecore CDP by clicking ![cdp_gear_icon.png](https://doc.sitecore.com/api/markdown-image/cdp/en/users/sitecore-cdp/images/cdp_gear_icon.png) > **Company information** > **Environment**.
5. In the **Setup** pane, locate the **Audience export ref** field.
6. At the bottom right corner of the recipe canvas, expand **Recipe data**.
7. In **Step 1 output**, in **Payload**, click and drag the **Audience export ref** field into the **Audience export ref** field.

    The **Audience export ref** identifies the audience export. By specifying the friendly ID in the **Audience export ref** field, you ensure that Sitecore Connect retrieves the URLs of the latest output of the exact audience export you want to receive.

8. Click **Save**, then click **Exit** to close the recipe editor.
9. Click **Start recipe**. The recipe now shows an *Active* status.

Your Sitecore Connect recipe is now ready. Next, go to Sitecore CDP and [connect the recipe to an audience export](https://doc.sitecore.com/cdp/en/users/sitecore-cdp/audience-export/manage-audience-exports.html#UUID-ed95596c-78de-7ce7-fa1f-5bbcb6fc50da "Connect a recipe to an audience export"). After connecting, each time the audience export runs, the webhook triggers the connected recipe and performs the defined action.