Skip to main content

n8n

The n8n-nodes-lantfly community package adds two nodes to n8n:

  • Lantfly: run an actor, run a saved task, get a run, get dataset items, list mentions of a listening project.
  • Lantfly Trigger: start a workflow when a run starts, succeeds, fails, times out or is aborted, when a listening project finds a new mention, or when an alert fires.
Coming soon

n8n-nodes-lantfly (version 1.0.1) is not published to npm yet, so it does not show up in n8n's community node search. Until then, call the API with n8n's HTTP Request and Webhook nodes, as in the Make guide.

Install​

In n8n: Settings → Community nodes → Install, then enter the package name n8n-nodes-lantfly.

Self-hosted n8n without the UI:

Terminal
cd ~/.n8n/nodes
npm install n8n-nodes-lantfly

Restart n8n afterwards. The package needs Node.js 20 or newer.

Credentials​

Create a Lantfly API credential:

FieldValue
Base URLhttps://lantfly.com (/api/v3 is added for you)
API TokenA token from Settings → API & integrations in Lantfly

Token scope matters:

  • A full-access token can do everything, including subscribing triggers.
  • A read-only token can read runs, datasets and mentions, but cannot start runs or subscribe triggers.
  • A token limited to actors works only for the actor operations on those actors.

Lantfly node​

ResourceOperationParametersAPI
ActorRunActor (ID or username~name), Input (JSON); options: Wait for Finish (0–60 s), Memory (MB), Timeout (seconds), BuildPOST /api/v3/actors/{actor}/runs
TaskRunTask ID, Input Override (JSON); same optionsPOST /api/v3/tasks/{task}/runs
RunGetRun ID; option: Wait for Finish (0–60 s, polls)GET /api/v3/runs/{run}
DatasetGet ItemsDataset ID, Limit (default 100, up to 10000); options: Offset, Fields (comma list), Clean (default on: drops empty items and hidden fields)GET /api/v3/datasets/{dataset}/items
MentionListProject, Limit (default 30, up to 100); filters: Platform, Sentiment, Ads (any, only, none), Search, Published From, Published To, Sort (newest found, published, engagement, views)GET /api/v3/listening/projects/{project}/mentions

Output fields are snake_case, as the API sends them: a run has id, status, default_dataset_id, started_at, finished_at…

Lantfly Trigger node​

ParameterMeaning
EventRun Succeeded, Run Failed, Run Timed Out, Run Aborted, Run Started, New Mention, Alert Fired
ProjectRequired for New Mention and Alert Fired
Only Actor, Only TaskOptional filters for run events

Activating the workflow subscribes its webhook URL in Lantfly (a REST hook); deactivating removes it. Each delivery is checked against X-Lantfly-Signature (HMAC-SHA256 of the body with the hook's secret), and requests with a missing or wrong signature are dropped. If the node lost the secret, deactivate and reactivate the workflow.

Each trigger item is { id?, user_id, created_at, event_type, event_data, resource }: event_data has actor_id, task_id, run_id for run events, or project_id, mention_id, alert_id, rule_id for listening events. Mention and alert events arrive within about a minute, one item per mention or alert.

Upgrading from 0.x

Since 1.0.0 the output fields are snake_case. Workflows built on 0.x names (defaultDatasetId, eventType) must be remapped to default_dataset_id, event_type.

Example: scrape and store​

  1. Lantfly Trigger: Run Succeeded, Only Actor = lantfly~web-scraper.
  2. Lantfly: Dataset → Get Items, Dataset ID = {{ $json.resource.default_dataset_id }}.
  3. Your database or spreadsheet node.

Example: negative mentions to chat​

  1. Lantfly Trigger: New Mention, your project.
  2. IF: {{ $json.resource.sentiment }} equals negative.
  3. Slack or Discord node with {{ $json.resource.url }} and {{ $json.resource.text }}.