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

# n8n Integration

> Use OFAuth with n8n's open-source workflow automation to build OnlyFans workflows

The [OFAuth n8n community node](https://github.com/OFAuth-org/onlyfans-n8n) lets you integrate OnlyFans data into n8n's visual workflow builder. Access creator profiles, manage posts and messages, track earnings, and automate subscriber engagement — all through drag-and-drop.

<Info>
  **Package name:** `n8n-nodes-ofauth` — available as a community node in n8n.
</Info>

## Installation

<Steps>
  <Step title="Install via Community Nodes (Recommended)">
    In your n8n instance:

    1. Go to **Settings → Community Nodes**
    2. Click **Install a community node**
    3. Enter `n8n-nodes-ofauth`
    4. Click **Install**
  </Step>

  <Step title="Or Install Manually">
    ```bash theme={null}
    cd ~/.n8n/nodes
    npm install n8n-nodes-ofauth
    ```

    Restart n8n after installation.
  </Step>
</Steps>

## Authentication

<Steps>
  <Step title="Add Credential">
    In n8n, go to **Credentials → Add Credential** and search for **OFAuth API**.
  </Step>

  <Step title="Enter Your API Key">
    Paste the API key from your [OFAuth dashboard](https://app.ofauth.com/platform/developers/keys).
  </Step>

  <Step title="Save and Test">
    Click **Save**. Use a **Whoami** operation to verify the connection works.
  </Step>
</Steps>

## Available Resources

The OFAuth node exposes these resources, each with standard operations (**Get All**, **Get**, **Create**, **Update**, **Delete**) where applicable:

| Resource          | Description                       |
| ----------------- | --------------------------------- |
| **Whoami**        | Account information               |
| **Connections**   | Connection management             |
| **Settings**      | Account settings                  |
| **Self**          | Creator profile                   |
| **Earnings**      | Earnings data and analytics       |
| **Analytics**     | Posts, stories, streams analytics |
| **Posts**         | Post management                   |
| **Users**         | User operations                   |
| **Chats**         | Chat and messaging                |
| **Mass Messages** | Mass messaging                    |
| **Subscribers**   | Subscriber data                   |
| **Subscriptions** | Subscription management           |
| **Promotions**    | Promotions and tracking links     |
| **Vault**         | Vault media management            |

## Using the Node

### Basic Setup

1. Add the **OFAuth** node to your workflow
2. Select your OFAuth credentials
3. Choose a **Resource** (e.g., Self, Posts, Earnings)
4. Choose an **Operation** (e.g., Get All, Create)
5. Enter the **Connection ID** for the target OnlyFans account
6. Configure additional fields as needed

### Connection ID

<Info>
  Most operations require a **Connection ID** to specify which OnlyFans account to access. Retrieve available Connection IDs using the **Connections → Get All** operation, then reference them in subsequent nodes.
</Info>

### Pagination

For list operations, use the **Additional Fields** to control pagination:

| Field      | Description                             |
| ---------- | --------------------------------------- |
| **Limit**  | Maximum number of results (default: 50) |
| **Offset** | Starting position for results           |

## Example Workflows

### Daily Earnings Report

```
Schedule Trigger → OFAuth (Get Earnings) → Slack (Send Message)
```

Sends a daily earnings summary to Slack at a scheduled time.

### New Subscriber Welcome

```
OFAuth (New Subscriber) → OFAuth (Send Message)
```

Automatically sends a personalized welcome message to new subscribers.

### Export Posts to Airtable

```
OFAuth (Get All Posts) → Airtable (Create Records)
```

Syncs all posts to an Airtable base for content tracking.

### Content Analytics Dashboard

```
Schedule Trigger → OFAuth (Get Analytics) → Google Sheets (Update)
```

Updates a Google Sheets dashboard with latest analytics data.

<Info>
  See the [Common Workflows](/sdk/no-code/workflows) page for more detailed automation patterns.
</Info>

## Configuration Reference

| Setting          | Value                    |
| ---------------- | ------------------------ |
| **Base URL**     | `https://api.ofauth.com` |
| **Content-Type** | `application/json`       |
| **Accept**       | `application/json`       |
| **Auth**         | API Key header           |

## Troubleshooting

**"Connection ID required"** — Most access operations need a Connection ID. Use the **Connections** resource first to list available connections, then pass the ID to subsequent operations.

**"Authentication failed"** — Verify your API key in the OFAuth dashboard and update the credential in n8n. Test with a simple **Whoami** operation.

**"Rate limit exceeded"** — The OFAuth API has rate limits. Add a **Wait** node between operations if you're making many sequential calls.

## Resources

* [GitHub Repository](https://github.com/OFAuth-org/onlyfans-n8n)
* [OFAuth API Reference](/api-reference)
* [n8n Community](https://community.n8n.io)
