blu

BLU nodes for n8n: act on your creators' accounts, and start workflows from BLU events.

Package Information

Released: this month
Downloads: 0 weekly / 0 monthly
Latest Version: 1.0.3
Author: BLU

Documentation

BLU nodes for n8n

A BLU node for the most-used actions, and a BLU Trigger that starts a workflow when something happens in BLU.

  1. Install the nodes. On n8n Cloud, search for BLU in the nodes panel (once n8n has verified them). On your own n8n, open Settings, Community Nodes, Install, and enter n8n-nodes-blu.
  2. Add the BLU Trigger node to a workflow. Create a BLU API credential with a key from BLU, under API keys.
  3. Pick the events, such as tips.received, and activate the workflow. The node registers its own webhook, and removes it when the workflow is deactivated.
  4. Add a BLU node: Message, Send. For Creator ID use {{ $json.creator }}, for Fan ID use {{ $json.payload.fanId }}, and write the text.
  5. On the BLU node's output, check outcome. If it's unknown, OnlyFans may have done it: route that to a person.

The key needs the permission act:webhooks.manage and what each event asks for, and act:messages.send to send. A key that can act doesn't start working straight away: /v1/whoami says when.

Needs n8n 1.85 or later. The guide: https://docs.blu.luxe/integrations/n8n/

What's in it

BLU: Message: Send. Chat: List. Fan: Get. List: Add Fan. Mass Message: Send. Transaction: List. Account: Who Am I. For anything else, use an HTTP Request node with the same credential.

BLU Trigger: it registers through /v1/webhooks when the workflow is activated and removes the webhook when it isn't, answers BLU's challenge, and checks every delivery's signature against its exact bytes. A delivery that fails the check gets a 401 and runs nothing. Self-hosted n8n needs an https address on port 443 or 8443. The events it offers:

  • accounts.connected: Creator connected
  • accounts.reconnected: Creator reconnected
  • accounts.disconnected: Creator disconnected
  • accounts.authentication_failed: Creator session lost
  • accounts.face_otp_required: Face verification needed
  • creators.plan_ending: Plan ending
  • transactions.new: New transaction
  • tips.received: Tip received
  • messages.ppv.unlocked: PPV unlocked
  • subscriptions.new: New subscriber
  • subscriptions.renewed: Subscription renewed
  • transactions.refunded: Payment refunded
  • chargebacks.updated: Chargeback
  • sales.attributed: Sale tied to a message
  • messages.received: Message received
  • messages.sent: Message sent
  • messages.deleted: Message deleted
  • messages.reaction_toggled: Like changed
  • users.typing: Fan typing
  • messages.unread_count_updated: Unread messages count
  • unread_tips_count_updated: Unread tips count
  • notifications.count_updated: Notifications count
  • chat_queue.updated: Mass message progress
  • chat_queue.finished: Mass message finished sending
  • mass.finished: Mass message results
  • posts.published: Post published
  • posts.liked: Post liked
  • stories.published: Story published
  • subscriptions.expired: Subscription expired
  • media_uploads.completed: Upload finished
  • media_uploads.failed: Upload failed
  • fan_summary.completed: Fan summary ready

A retry can't send twice

Every write carries an Idempotency-Key. Idempotency Key defaults to the id of the BLU event that started the workflow; left empty, it comes from this execution, run and item. If the same value comes again within 7 days, BLU answers with the first result and nothing is sent twice.

Developing

npm ci, then npm run build, npm run lint and npm test (the tests run the built nodes without n8n). nodes/Blu/operations.json, nodes/BluTrigger/events.json, the two .node.json files and this README come from BLU's API document, made by BLU's backend: don't edit them here.

Discussion