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

# n8n

> Use the n8n HTTP Request node to read any Scoutworks list, with pagination and a stored credential.

This recipe reads the waiting list every hour. You can send the result to Slack, email, a sheet or any other n8n node.

## 1. Store the key as a credential

<Steps>
  <Step title="Create a credential">
    In n8n, open **Credentials → Add credential** and choose **Header Auth**.
  </Step>

  <Step title="Fill it in">
    Name: `Authorization`. Value: `Bearer ` followed by the key, for example:

    ```text theme={null}
    Bearer sw_live_473adcc6c7236916021f0f24559db36576a53bab071d0f0c08a025adb510b6ab
    ```

    Call the credential **Scoutworks**. Choose **Save**.
  </Step>
</Steps>

## 2. Build the workflow

<Steps>
  <Step title="Add a Schedule Trigger">
    Set it to run **every hour**.
  </Step>

  <Step title="Add an HTTP Request node">
    * **Method:** GET
    * **URL:** `https://api-demo.scoutworks.app/api/v1/waiting-list?limit=200`
    * **Authentication:** Generic Credential Type → **Header Auth** → **Scoutworks**
  </Step>

  <Step title="Turn on pagination">
    Under **Options → Add option → Pagination**:

    * **Pagination mode:** Update a Parameter in Each Request
    * **Type:** Query. **Name:** `cursor`. **Value:** `{{ $response.body.nextCursor }}`
    * **Pagination Complete When:** Other. **Complete Expression:** `{{ $response.body.nextCursor === null }}`
  </Step>

  <Step title="Split the list">
    Add a **Split Out** node. **Field to split out:** `data`. Each waiting-list entry is now one item.
  </Step>
</Steps>

Connect the output to any node you like.

## 3. Switch to your group

In the HTTP Request node, change `api-demo.scoutworks.app` to `api.scoutworks.app`. In the credential, replace the sandbox key with your own. Your key needs the `waiting-list:read` scope.

## Tips

* **Only new entries.** Keep the IDs you have already seen in a data table, and filter them out with a **Remove Duplicates** node set to “Remove items processed in previous executions”.
* **Writing to Google Sheets.** In the Google Sheets node, set **Cell Format** to **Use Format From n8n** (RAW), so that a name starting with `=` is stored as text, not run as a formula.
* **Errors.** Turn on **Options → Response → Include Response Headers and Status**, and branch on `error.code` if the status is not 200. See [Errors](/guides/errors).
