Docs Sign in Get a key

Docs / Get started

n8n

Use Hapti in n8n workflows and in the n8n AI Agent with the Hapti community node: run a task on any website and get the result in the next step.

The Hapti node for n8n runs website tasks from any workflow: book an appointment, fill in a form, download an invoice, check a status behind a login. It also works as a tool of the n8n AI Agent.

Install

In n8n, open Settings, then Community Nodes, click Install and enter n8n-nodes-hapti. The package is on npm and its source on GitHub.

Then add a Hapti API credential with a key from the developers screen of the console. A test key (hp_test_) lets the agent work on the real site without ever submitting the data you give; see Authentication.

Operations

OperationWhat it does
RunStarts a task and waits until it ends, or until it needs someone (a question or an approval)
StartStarts a task and returns at once, to follow it with Get or a webhook
GetReads the state and the result of a task
AnswerGives the value a waiting task asked for
Approve or RefuseAnswers the approval a waiting task asked for
CancelStops a task; only the actions already done are billed

A task takes a Website URL and a Goal in plain words. The options match the task fields: data, an output schema, the user the task is for, saved accounts, time and price limits, the residential proxy, the locale and a webhook.

Watch a website: Monitor and Hapti Trigger

The Monitor resource checks a website on a schedule and keeps only what changed: new listings, prices that moved, slots that opened, a file status.

OperationWhat it does
Watch a WebsiteCreates a monitor: a Website URL, What to Read in plain words, and Every (30m, 1h, 1d) or a cron rule. Give an Output Schema with a list and an Item Key such as url
Get Current ValueThe last value read on the website, as if it had an API
Get ChangesWhat was added, removed or changed at each check, newest first
Get ManyEvery monitor with its last check and last change
DeleteStops a monitor and deletes its history

The Hapti Trigger node starts a workflow once for each change a monitor finds, with added, removed and changed. Give it a monitor ID, or leave it empty to follow every monitor. Each check is a task, billed per action that worked. See Monitors.

Handle a question in the workflow

When Run returns a task with status set to waiting, pending.text holds the question. Send it to the person (by email, Slack or a form), then use Answer with the task ID and their reply. The task carries on, and a later Get or the webhook gives the result. See Questions and approvals.

Billing

Each action of the agent that worked is billed, whatever the outcome; an action that fails costs nothing. See Pricing and billing.