publer

Interact with the Publer API for social media management

Package Information

Released: 11/14/2025
Downloads: 533 weekly / 533 monthly
Latest Version: 1.0.4

Documentation

n8n-nodes-publer

Community node that adds a Publer integration to n8n. It lets you create, schedule, and analyze social posts with the official Publer API without leaving your workflows.

Features

  • Bearer token authentication with required Publer-Workspace-Id header handling.
  • Users, workspaces, and account discovery with dynamic dropdowns.
  • Media management (library listing, binary uploads, ingest from URL).
  • Post lifecycle operations: create/schedule, publish now, update, delete, and extract link previews.
  • Location searches for Facebook, Instagram, and Threads.
  • Analytics coverage for charts, members, post insights, hashtags, competitors, and job tracking.

Requirements

  • n8n v1.20.0 or newer (Node.js 18+).
  • Publer API token with access to the workspaces and accounts you plan to automate.

Installation

Community node via npm (recommended)

# inside your n8n installation folder
npm install n8n-nodes-publer

Restart n8n so it can discover the new node.

From the n8n UI

  1. Go to Settings → Community Nodes.
  2. Enable community nodes (only if you trust this package).
  3. Click Install, paste n8n-nodes-publer, and confirm.

Authentication

  1. Log into Publer and open Settings → API.
  2. Generate a personal access token (PAT) and copy it immediately. Tokens are Bearer strings.
  3. Locate the workspace you want to automate (Workspace → Settings) and copy its ID.
  4. In n8n, add new credentials of type Publer API:
    • API Token → paste the PAT.
    • Default Workspace ID (optional) → paste a workspace ID so the node can auto-fill the header.
  5. Save the credentials and select them in your Publer node instances.

The node always attaches the Bearer token and, when needed, the Publer-Workspace-Id header. You can override the workspace per operation using the dedicated Workspace parameter.

Usage Overview

Each resource exposes its own operations:

Resource Key Operations
User Fetch the authenticated profile (/users/me).
Workspace List workspaces or fetch workspace-specific signatures and media options.
Account List connected social accounts for a workspace.
Media List library assets, upload binaries from n8n items, or import from URLs (multipart/form-data handled automatically).
Post List, create (schedule), publish now, update, delete posts, or extract metadata for a link share. Provide the post body as JSON matching the Publer bulk schema.
Location Search Facebook/Instagram/Threads locations for tagging posts.
Analytics Retrieve charts, chart data, members, post insights, hashtag insights, hashtag performing posts, best posting times, competitors, and competitor analytics.
Job Status Poll asynchronous jobs (upload, publish, analytics) via /job_status/{id}.

Example JSON payloads

  • Schedule posts (POST /posts/schedule):
{
  "bulk": {
    "state": "scheduled",
    "posts": [
      {
        "networks": {
          "facebook": {
            "type": "status",
            "text": "Social update via n8n"
          }
        },
        "accounts": [
          {
            "id": "647a0edddb2797b89044e2c1",
            "scheduled_at": "2025-06-14T10:21:00Z"
          }
        ]
      }
    ]
  }
}
  • Publish immediately (POST /posts/schedule/publish): same as above but set bulk.state to scheduled or published per your workflow.
  • Upload media from URL (POST /media/from-url):
{
  "media": [
    {
      "url": "https://example.com/image.jpg",
      "name": "Cover image",
      "caption": "Photo credit ...",
      "source": "internal"
    }
  ],
  "type": "single",
  "direct_upload": false,
  "in_library": true
}

Use n8n expressions to build these JSON objects dynamically from incoming data.

Dynamic option loading

  • Workspace dropdowns call /workspaces.
  • Account dropdowns call /accounts (requires a workspace header).
  • Competitors dropdown pulls from /competitors.
  • Chart IDs dropdown loads from /analytics/charts.

If the dropdown is empty, make sure your credentials include a default workspace or the node parameter is set.

Error handling & rate limits

  • API errors are surfaced using n8n's standard error view. HTTP 401/403 responses usually mean your token is missing scopes or expired.
  • HTTP 429 triggers a descriptive error about the Publer rate limit (100 requests per 2 minutes). Add throttling or batching in your workflow if you hit the limit frequently.
  • Job-based operations (uploads, publish) can return a job ID—use the Job Status resource to poll /job_status/{id} until it is finished.

Troubleshooting

  • Missing workspace header: Set the Workspace parameter on the node or add a default workspace ID inside the credentials.
  • Binary upload fails: Confirm that an item contains binary data under the property specified in Binary Property (defaults to data).
  • Invalid JSON body: The node validates JSON parameters before sending the request. Use ={{ $json }} expressions or the Expression editor to ensure valid JSON.
  • Location search empty: Publer narrows results to the workspace's connected Facebook/Instagram accounts. Make sure the workspace is linked to the relevant network.

Development & testing

  1. Clone the repo and run npm install.
  2. Build with npm run build (outputs to dist/).
  3. Link the package into your local n8n with npm link / n8n install or by using the Community Nodes UI pointing to the local build.
  4. Use the n8n node linter (n8n-node-dev test) to validate coding guidelines before publishing.

References

Discussion