n8n Community Node
Use AnswerLine in n8n workflows: run monitors, queue tasks and read the balance as native nodes.
Install
# n8n → Settings → Community Nodes → install: n8n-nodes-answerline
Example
# Nodes added to your palette: # AnswerLine Run Monitor, sync engine calls # AnswerLine Create Task, async, priority, webhook URL # AnswerLine Get Task, status and result # AnswerLine Get Credits, USD balance
Four operations cover the API: Run Monitor for a synchronous answer, Create Task for async work with priority and idempotency, Get Task for status and results, and Get Credits for the balance.
With Continue On Fail, a failed item outputs the error message and HTTP status, so alerting workflows stay simple.
Install and connect
The node is published on npm as n8n-nodes-answerline.
On self-hosted n8n, an Owner or Admin opens Settings → Community Nodes, selects Install, enters n8n-nodes-answerline, accepts the community-node risk notice and installs. The node then appears in the nodes panel as Answerline.
n8n Cloud does not offer unverified community nodes; installing from npm requires a self-hosted instance (n8n documentation, checked 2026-09-17). On Cloud, use the built-in HTTP Request node, shown below.
Credentials
Create an Answerline API credential with three fields:
| Field | Value |
|---|---|
| API Key | Your sk_... key from the dashboard’s API keys page |
| Base URL | https://api.answerline.dev (default). Must start with https://; http://localhost is allowed for development only |
| Engines | The engines the node offers in its Engine dropdown. Defaults to every engine |
n8n tests the credential with GET /v1/credits, which is free and returns 401 for a wrong key. The key is sent as Authorization: Bearer <key> on every request. The node refuses a plain http:// base URL on any other host, so the key never travels unencrypted.
Operations
One node, four operations.
Run Monitor
Sends the item’s request to POST /v1/monitor/<engine> and waits for the answer.
| Parameter | Notes |
|---|---|
| Engine | ChatGPT, Gemini, Perplexity, Copilot, AI Mode, Google Search, Google News or Grok, filtered by the credential’s Engines |
| Prompt or Query | Sent as prompt for AI assistants and AI Mode, query for Google Search and Google News |
| Country | ISO 3166-1 alpha-2 code, default US. Leave empty when Additional Fields set gl |
| Additional Fields (JSON) | Any other request field of the engine, for example {"include": {"markdown": true}} |
The output item is the API response: { "success": true, "result": { ... } }. Result fields per engine are on the engine pages, for example ChatGPT and Google News.
Additional Fields win over the other parameters, and they accept an n8n expression that evaluates to an object, so you can build the body from earlier nodes:
{{ { pages: 2, hl: $json.hl, device: $json.device } }}
Create Task
Queues the same request as an async task at POST /v1/async/task and outputs the created task at once: task.id, task.status (QUEUED), and credits.creditsToCharge.
| Parameter | Notes |
|---|---|
| Engine, Prompt or Query, Country, Additional Fields | As in Run Monitor; they become the task’s payload |
| Priority | 1 to 10, default 1. Higher runs first within your own queue |
| Idempotency Key | Optional. Sending the same task with the same key returns the existing task; a different task with that key is refused |
| Webhook URL | Optional. Receives the finished task |
When Idempotency Key is empty, the node builds one from the workflow ID, node ID, execution ID and item index, and sends it both as the body’s idempotencyKey and as an Idempotency-Key header. A Retry On Fail pass over a task the API already created therefore returns that task instead of creating and charging a second one.
For scheduled workflows, set the key yourself from what the task means, for example:
{{ $json.promptId }}-{{ $json.country }}-CHATGPT-{{ $now.toFormat('yyyy-LL-dd') }}
Then a manual rerun of the same day’s workflow does not create or charge new tasks. A key reused with a different request is refused with 409 RESOURCE_CONFLICT, which Continue On Fail lets you route aside.
Get Task
GET /v1/async/task/{id} for the Task ID parameter. The output has task (with status of QUEUED, PROCESSING, COMPLETED or FAILED), credits (creditsToCharge, creditsCharged) and, once finished, response holding the engine’s result or the error. Only COMPLETED and FAILED are final; a failed task is not charged.
Get Credits
GET /v1/credits, output { "remaining", ... }, where remaining is your balance in dollars. Put it at the start of large workflows and stop with an IF node when remaining is below what the run needs.
Cost per item
Prices are at the Starter tier; higher tiers, reached by 30-day spend, cost less.
| Engine | Price per item |
|---|---|
| ChatGPT | $0.0006 |
| Gemini | $0.0006 |
| Perplexity | $0.0015 |
| Copilot | $0.00274 |
| Grok | $0.00218 |
| AI Mode | $0.00206 |
| Google Search (first page) | $0.00103 |
| Google News (first page) | $0.0002 |
Add-ons, the same on every tier: +$0.00071 per extra Google Search page and +$0.00071 for its AI Overview. ChatGPT’s include flags and extra Google News pages are free. Full table in balance and pricing.
Error handling
Without Continue On Fail, an API error stops the execution with the API’s message. With Settings → Continue On Fail enabled, each failed item outputs:
{ "error": "…", "description": "…", "httpCode": "429" }
Route these with an IF node on {{ $json.error !== undefined }}. Codes worth handling explicitly:
| Code | What to do in the workflow |
|---|---|
403 INSUFFICIENT_CREDITS |
Stop and alert; check Get Credits first next time |
429 QUEUE_LIMIT_EXCEEDED or SERVICE_OVERLOADED |
Enable Retry On Fail with a wait |
409 RESOURCE_CONFLICT |
Create Task key already used by a different request; make keys specific enough (prompt, engine, market, day) |
| 400 / 422 validation | Fix the Additional Fields or Country |
All error codes are in authentication and errors.
Workflow: daily AI visibility tracking
This workflow asks two engines a list of prompts every morning and stores what they cite. It uses Create Task plus the Wait node, so tasks wait in your queue instead of holding the execution open.
- Schedule Trigger, every day at 06:00.
- Answerline → Get Credits. An IF node stops the run when
remainingis below the day’s budget (prompts × engines × price). - Google Sheets (or any source) reads rows with
promptId,prompt,country(a country the engine answers from). - A Code node fans each row out to one item per engine (
CHATGPT,GEMINI). - Answerline → Create Task with Engine from the item, Prompt
{{ $json.prompt }}, Country{{ $json.country }}, Idempotency Key{{ $json.promptId }}-{{ $json.engine }}-{{ $json.country }}-{{ $now.toFormat('yyyy-LL-dd') }}, and Continue On Fail on. - Wait, then Answerline → Get Task with Task ID
{{ $json.task.id }}. Loop back to Wait whiletask.statusisQUEUEDorPROCESSING. - Set extracts
response.result.textand theurlof each entry inresponse.result.sources, and a Google Sheets or database node appends them with the date.
In step 5, map Engine from the item with an expression instead of picking one fixed value. A started task has five minutes to finish, so a Wait of a minute or two between polls keeps the number of Get Task calls low. Only completed tasks are charged.
For prompt set design and cadence, see prompt set design and the longer n8n AI visibility workflow post.
Resume by webhook instead of polling
n8n’s Wait node can resume On Webhook Call, and exposes the execution’s unique resume URL as $execution.resumeUrl (n8n Wait node documentation, checked 2026-09-17). Put {{ $execution.resumeUrl }} in Create Task’s Webhook URL, and the execution continues when the API delivers the finished task.
Constraints:
- Webhook URLs must use
httpsand resolve to a public address, so the n8n instance must be reachable from the internet. - The resume URL belongs to one execution. Use this pattern with one item per execution (for example, a sub-workflow per task) rather than a batch of items sharing one Wait.
- The Wait node does not check the
Webhook-Signatureheader. Treat the delivered body as a signal, then call Get Task for the authoritative status and result, which is authenticated with your key. To verify signatures directly, receive deliveries in your own endpoint as shown in the webhooks guide.
Using the node from an AI Agent
The node is declared usable as a tool, so it can be attached to n8n’s AI Agent node. Give the agent one Answerline tool per purpose (for example, Run Monitor fixed to Gemini, and Get Credits) and describe each in the tool description. Use Run Monitor for agents, because the agent needs the answer in the same turn; at $0.0002 to $0.00274 a call, the cost per tool call is easy to budget.
Without the community node
On n8n Cloud, or anywhere community nodes are disabled, the HTTP Request node covers the same operations:
| Setting | Value |
|---|---|
| Method | POST |
| URL | https://api.answerline.dev/v1/async/task |
| Authentication | Generic Credential Type, then Header Auth, name Authorization, value Bearer sk_... |
| Send Headers | Idempotency-Key: {{ $json.promptId }}-{{ $now.toFormat('yyyy-LL-dd') }} |
| Body Content Type | JSON |
| Body | see below |
{
"taskType": "CHATGPT",
"payload": { "prompt": "{{ $json.prompt }}", "country": "US" },
"idempotencyKey": "{{ $json.promptId }}-{{ $now.toFormat('yyyy-LL-dd') }}"
}
Poll with a second HTTP Request node, GET https://api.answerline.dev/v1/async/task/{{ $json.task.id }}, using the same credential. For a synchronous call, POST the engine body to https://api.answerline.dev/v1/monitor/chatgpt and set the node’s timeout above five minutes. For batches of up to 500 tasks in one request, POST an array to /v1/async/task/batch; see async tasks and batches.
The integrations guide summarizes the n8n, Zapier and LangChain settings on one page.
Questions
Is the n8n node published?
Yes. n8n-nodes-answerline is on npm and installs on self-hosted n8n under Settings, Community Nodes. n8n Cloud does not offer unverified community nodes, so on Cloud use the HTTP Request node against the REST API instead.
Which operations does the node have?
Run Monitor (synchronous engine call), Create Task (async task with priority, idempotency key and webhook URL), Get Task (status and result) and Get Credits (your balance in dollars).
Should I use Run Monitor or Create Task in n8n?
Run Monitor waits for the engine's answer in the execution, which is simplest for a few items. For many items or scheduled runs, Create Task waits in your queue until a worker picks it up, so a long run never holds the workflow open.
What happens if an n8n execution is retried?
Create Task sends an idempotency key on every request. If you leave the Idempotency Key field empty, the node derives one from the workflow, node, execution and item, so a retry of the same execution returns the task already created instead of charging again.
How do I handle API errors in a workflow?
Enable Continue On Fail on the node. A failed item then outputs error, description and httpCode instead of stopping the workflow, so an IF node can route it to an alert.
Can an n8n AI Agent use the node as a tool?
The node is declared usable as a tool, so it can be attached to n8n's AI Agent node like other tool-capable nodes.
Other integrations
TypeScript / JavaScript SDK
The official npm SDK: typed monitor and task methods, batches, webhooks and error classes for Node and edge runtimes.
Python SDK
The official Python SDK: monitor calls, async tasks and batches with the same response shapes as the REST API.
Hosted MCP Server
Give Claude, Cursor or any MCP client search and AI-answer tools with one configuration line.
Zapier App
Trigger Zaps from AI answers: Run Monitor for quick calls, Create Task with a webhook callback for long-running engines.
LangChain Tools
Ready-made LangChain tools for JavaScript and Python: one monitor tool per engine, plus task and balance tools.