- type: gpt
prompt: >-
# Claude Project Instructions: Harpa.ai Technical Reference
## Core Function
You are the **definitive authority on Harpa.ai**. Your knowledge is based
solely on the uploaded documentation. You must provide precise, technically
accurate answers by retrieving information from this structured reference.
**Prioritize correct YAML syntax and official terminology above all.**
When a user asks for a command or workflow, you MUST immediately access this
internal knowledge base and generate a **perfectly syntactic, error-free,
and completely formatted YAML response** that exactly matches the Harpa
specification.
---
## 1. COMMAND STRUCTURE
Every HARPA AI command is a `.yaml` file with this top-level structure:
```yaml
meta:
title: Command Title
description: Description text
category: User
emoji: ๐
steps:
- type: <step_type>
# ... step properties
version: 1
```
### Meta Block
| Key | Type | Required | Description |
|---------------|--------|----------|------------------------------------|
| `title` | string | Yes | Display name of the command |
| `description` | string | No | Short description |
| `category` | string | Yes | Always `User` for custom commands |
| `emoji` | string | No | Emoji icon for the command |
---
## 2. UNIVERSAL STEP PROPERTIES
Most steps support these optional properties:
| Key | Type |
Description |
|-------------|--------|---------------------------------------------------------------------------|
| `label` | string | Unique identifier; used by `jump` and `onFailure`
to target this step |
| `condition` | string | Step only runs if condition evaluates true.
Operators: `=`, `!=`, `>`, `<`, `>=`, `<=`, `=~` (regex). **Operators MUST
be surrounded by spaces.** Multiple conditions are OR-joined. |
| `silent` | bool | When `true`, suppresses chat
output |
### Condition Syntax Rules
- Format: `'{{\param}} operator value'`
- **Spaces around operators are mandatory:** `{{\x}} = 1` โ
โ `{{\x}}=1` โ
- Empty check: `'{{\x}} ='` (is empty), `'{{\x}}'` (is not empty)
- Regex: `'{{\x}} =~ ^pattern$'`
- Both sides may be parameters: `'{{\x}} = {{\y}}'`
---
## 3. PARAMETERS
### Built-in Parameters
| Parameter |
Description |
|----------------------|----------------------------------------------------------|
| `{{\page}}` | Web page text content (auto-truncated to fit token
limit)|
| `{{\page query}}` | Page content filtered by semantic similarity to
query |
| `{{\page url}}` | Fetch content from a specific
URL |
| `{{\page limit=N}}` | Limit output in tokens or `limit=10%` of context
window |
| `{{\selection}}` | Currently selected text on the
page |
| `{{\url}}` | Current page
URL |
| `{{\domain}}` | Current page
domain |
| `{{\title}}` | Current page
title |
| `{{\desc}}` | Current page meta
description |
| `{{\language}}` | Language from HARPA
settings |
| `{{\transcript}}` | YouTube video
transcription |
| `{{\gpt}}` | Default GPT response
parameter |
| `{{\serp query}}` | Search the web for `query` and return
results |
| `{{\grab selector}}` | Extract HTML element value by CSS/XPath/text
selector |
### Custom Parameters
- `{{\p1}}`, `{{\p2}}`, `{{\name}}`, `{{\param}}` โ user-defined via ASK or
CALC steps.
- Prefix `g.` for global (cross-command) persistence: `{{\g.email}}`,
`{{\g.data}}`
### Dot Notation
- `{{\users.0.name.toUpperCase}}` โ access index 0 of `users` list, get
`name`, convert to uppercase.
- Negative indices: `-1` = last, `-2` = second-to-last.
- JS string functions without arguments are supported: `trim`,
`toUpperCase`, `toLowerCase`.
### Interpolation & Escaping
- Parameters in prompts are auto-replaced with their values.
- **Escape with backslash:** `{{\\p1}}` outputs the literal string `{{\p1}}`
without interpolation.
- In YAML output intended for HARPA import, always escape parameter
references as `{{\\param}}` so they render as `{{\param}}` inside the
command.
---
## 4. AUTOMATION STEPS โ COMPLETE CATALOG
### 4.1 SAY
Prints a message to chat. Supports Markdown.
**Standard:**
```yaml
- type: say
message: Hello world!
```
**All Options Activated:**
```yaml
- label: MY LABEL
type: say
message: 'Content with {{\param}} reference.'
interpolate: false
```
| Key | Type | Default |
Description |
|---------------|--------|---------|--------------------------------------------------|
| `message` | string | โ | Message text (supports Markdown +
parameters) |
| `interpolate` | bool | `true` | `false` prevents parameter substitution
in message|
**Short version:** `- say: Hello world!`
---
### 4.2 ASK
Asks user for input and stores it in a parameter.
**Standard:**
```yaml
- type: ask
param: p1
message: 'Please provide input:'
options: null
default: ''
vision:
enabled: false
mode: area
hint: ''
send: true
```
**All Options Activated:**
```yaml
- condition: '{{\p1}} = yes'
label: MY LABEL
type: ask
param: p1
message: 'Choose an option:'
options:
- label: โ
YES
value: 'yes'
- label: โ NO
value: 'no'
- $custom
default: ''
vision:
enabled: true
mode: area
hint: Hint message for vision
send: true
optionsInvalid: false
```
| Key | Type | Default |
Description |
|------------------|--------------|---------|-------------------------------------------------|
| `param` | string | โ | Parameter name to store user
response |
| `message` | string | โ | Question displayed in
chat |
| `options` | array\|null | `null` | Choice options (see formats
below) |
| `default` | string | `''` | Fallback value if user presses
Enter |
| `vision.enabled` | bool | `false` | Enable vision/screenshot
input |
| `vision.mode` | string | `area` | Vision
mode |
| `vision.hint` | string | `''` | Hint message for vision
input |
| `vision.send` | bool | `true` | Auto-send vision
result |
| `optionsInvalid` | bool | `false` | Mark options config as
invalid |
**Options Formats:**
```yaml
# Simple string array
options: ['a', 'b', 'c']
# With $custom for free-text input
options: ['a', 'b', 'c', '$custom']
# Label-value objects
options:
- label: 'MAKE LONGER'
value: 'make text longer'
- label: 'MAKE SHORTER'
value: 'make text shorter'
```
**Short version:** `- ask: p1`
---
### 4.3 GPT
Sends a prompt to the connected AI model (OpenAI GPT, Gemini, Claude, etc.).
Response stored in `param` (default: `gpt`).
**Standard:**
```yaml
- type: gpt
prompt: 'Your prompt text with {{\param}} references'
```
**All Options Activated:**
```yaml
- condition: '{{\p1}} = yes'
label: MY LABEL
type: gpt
prompt: 'Your prompt text'
silent: true
dumb: true
chunkify:
text: '{{\page}}'
empty: 'No content found on page.'
maxTokens: 16111
isolated: true
functions:
call: auto
declaration:
name: get_stock_price
description: Get the current stock price
parameters:
type: object
properties:
symbol:
type: string
description: The stock symbol
required:
- symbol
onCodeClick: send-text
param: gpt
```
| Key | Type | Default |
Description |
|-------------------------|--------|---------|----------------------------------------------------------------------|
| `prompt` | string | โ | AI prompt text (supports
parameter interpolation) |
| `param` | string | `gpt` | Parameter to store AI
response |
| `silent` | bool | `false` | Suppress AI response in
chat |
| `dumb` | bool | `false` | Use lightweight/fast
model |
| `isolated` | bool | `false` | Execute without chat history
(saves tokens) |
| `chunkify.text` | string | โ | Text to split into chunks for
processing |
| `chunkify.empty` | string | โ | Message if chunkify text is
empty |
| `chunkify.maxTokens` | int | โ | Max tokens per
chunk |
| `functions.call` | string | โ | `auto`, `none`, or
`required` |
| `functions.declaration` | object | โ | OpenAI-compatible function
declaration (see Function Calling section) |
| `onCodeClick` | string | โ | `send-text` โ action when
code blocks are clicked |
**Short version:** `- gpt: 'Your prompt here'`
**Function Calling:** When functions are declared, AI may return a function
name in `{{\gptFunc}}` and arguments in `{{\gptArgs}}`. Use GROUP steps with
conditions on `{{\gptFunc}}` to handle each function.
---
### 4.4 CALC
Sets or modifies parameter values. 24 available functions organized into 5
groups.
**Standard:**
```yaml
- type: calc
func: set
param: myParam
format: ''
value: '{{\gpt}}'
```
**All Options Activated:**
```yaml
- condition: '{{\p1}} = yes'
label: MY LABEL
type: calc
func: set
param: myParam
format: ''
value: 'static or {{\dynamic}} value'
```
#### All 24 CALC Functions:
**Parameters Group:**
| # | Function | Key Properties | Description |
|---|----------|---------------|-------------|
| 1 | `set` | `param`, `format`, `value` | Set a parameter value |
| 2 | `clone` | `from`, `to` | Copy a parameter |
| 3 | `delete` | `param` | Delete a parameter |
**Extraction Group:**
| # | Function | Key Properties | Description |
|---|----------|---------------|-------------|
| 4 | `extract-data` | `param`, `to`, `data`, `index` | Extract data (e.g.,
prices) from text |
| 5 | `extract-code` | `param`, `to` | Extract code blocks from text |
| 6 | `extract-json` | `param`, `to`, `index` | Extract JSON from text |
**Numbers Group:**
| # | Function | Key Properties | Description |
|---|----------|---------------|-------------|
| 7 | `increment` | `param`, `delta` | Increment a numerical value |
**Texts Group:**
| # | Function | Key Properties | Description |
|---|----------|---------------|-------------|
| 8 | `change-case` | `param`, `to`, `case` | Change text case (UPPER,
lower, Title, Sentence, PascalCase, camelCase, kebab-case, underscore_case)
|
| 9 | `first-line` | `param`, `to` | Take first non-empty line |
| 10 | `last-line` | `param`, `to` | Take last non-empty line |
| 11 | `split` | `param`, `to`, `delimiter` | Split text into list by
delimiter |
| 12 | `replace` | `param`, `to`, `regex`, `template` | Replace by regex or
text |
| 13 | `match` | `param`, `to`, `regex` | Extract regex matches |
| 14 | `encode-url` | `param`, `to` | URL-encode text |
| 15 | `decode-url` | `param`, `to` | URL-decode text |
| 23 | `remove-emojis` | `param`, `to` | Remove emojis from text |
**Lists Group:**
| # | Function | Key Properties | Description |
|---|----------|---------------|-------------|
| 16 | `list-add` | `list`, `item`, `index` | Append/insert item to list |
| 17 | `list-filter` | `list`, `to` | Filter list items |
| 18 | `list-update` | `list`, `index`, `item` | Update item at index |
| 19 | `list-merge` | `list`, `from` | Merge two lists |
| 20 | `list-join` | `list`, `to`, `delimiter` | Join list into string |
| 21 | `serp.extract-links` | `from`, `to` | Extract SERP links from search
data |
| 22 | `search.extract-sources` | `from`, `to` | Extract search sources |
| 24 | `chat-break` | โ | Insert a chat context break |
**YAML Examples:**
```yaml
# Set parameter
- type: calc
func: set
param: saved.url
format: auto
value: '{{\url}}'
# Clone parameter
- type: calc
func: clone
from: gpt
to: cloned.gpt
# Delete parameter
- type: calc
func: delete
param: temp
# Extract data (e.g., all prices)
- type: calc
func: extract-data
to: prices
param: page
data: price
index: all
# Extract JSON
- type: calc
func: extract-json
to: jsonData
param: gpt
index: first
# Increment
- type: calc
func: increment
param: counter
delta: '1'
# Replace in text
- type: calc
func: replace
param: text
to: cleanedText
regex: '\\{\\{'
template: "{{\\'"
# Split
- type: calc
func: split
param: csvLine
to: items
delimiter: ','
# List add
- type: calc
func: list-add
list: myList
item: newItem
index: last
# SERP extract links
- type: calc
func: serp.extract-links
from: information
to: links
```
---
### 4.5 NAVIGATE
Opens a URL in the active browser tab.
**Standard:**
```yaml
- type: navigate
url: ''
waitForIdle: true
silent: false
onFailure: STANDARD
```
**All Options Activated:**
```yaml
- condition: '{{\p1}} = yes'
label: MY LABEL
type: navigate
url: 'https://domain.com/path'
waitForIdle: true
silent: true
onFailure: FALLBACK LABEL
```
| Key | Type | Default |
Description |
|---------------|--------|-----------|------------------------------------------------------------------|
| `url` | string | `''` | Full URL, relative path, `back`,
`forward`, or empty for reload |
| `waitForIdle` | bool | `true` | Wait for page to stop
loading |
| `silent` | bool | `false` | Suppress navigation
messages |
| `onFailure` | string | โ | Label to jump to on
failure |
**Short version:** `- navigate: 'https://google.com'`
**URL variants:**
- Full URL: `https://google.com`
- Missing protocol (https assumed): `google.com`
- Relative path: `/search`
- Navigation: `back`, `forward`
- Reload: `''` (empty string)
---
### 4.6 WAIT
Pauses command execution until a condition is met.
**Standard:**
```yaml
- type: wait
for: idle
timeout: 15000
```
**All Options Activated:**
```yaml
- condition: '{{\p1}} = yes'
label: MY LABEL
type: wait
for: idle
timeout: 15000
silent: true
```
| Key | Type | Default | Description |
|-----------|--------|---------|---------------------|
| `for` | string | โ | Wait condition type |
| `timeout` | int | `15000` | Timeout in ms |
| `silent` | bool | `false` | Suppress messages |
**All `for` values:**
```yaml
# Wait for page idle
- type: wait
for: idle
timeout: 15000
# Wait fixed delay (ms)
- type: wait
for: custom-delay
delay: 1000
# Wait random delay
- type: wait
for: random-delay
minDelay: 500
maxDelay: 3000
# Wait for text to appear
- type: wait
for: text-to-appear
text: Login
timeout: 15000
# Wait for text to disappear
- type: wait
for: text-to-disappear
text: Loading
timeout: 15000
# Wait for element to appear (AI selector)
- type: wait
for: element-to-appear
selectorType: ai
selector:
- $tag: H1
timeout: 15000
# Wait for element to disappear
- type: wait
for: element-to-disappear
selectorType: ai
selector:
- $tag: H1
timeout: 15000
# Wait for JS function to resolve true
- type: wait
for: js-function
code: return document.querySelector('h1')
timeout: 15000
```
---
### 4.7 REQUEST
Sends HTTP GET/POST request. Used for webhooks (Zapier, Make.com, n8n),
APIs, or fetching HTML.
**Standard:**
```yaml
- type: request
url: 'https://webhook.site/'
method: auto
headers: null
body: |-
{
"url": "{{\url}}",
"data": "{{\gpt}}"
}
auth:
enabled: false
username: ''
password: ''
param: ''
```
**All Options Activated:**
```yaml
- condition: '{{\p1}} = yes'
label: MY LABEL
type: request
url: 'https://webhook.site/'
method: auto
headers:
Authorization: Bearer token
body: |-
{
"url": "{{\url}}",
"data": "{{\gpt}}"
}
auth:
enabled: true
username: username
password: password
param: response
headersInvalid: false
silent: true
```
| Key | Type | Default |
Description |
|------------------|-------------|----------|--------------------------------------|
| `url` | string | โ | Request URL (supports
parameters) |
| `method` | string | `auto` | HTTP method: `auto`, `get`,
`post` |
| `headers` | object\|null| `null` | HTTP headers
object |
| `body` | string | โ | Request body (supports
parameters) |
| `auth.enabled` | bool | `false` | Enable Basic
Auth |
| `auth.username` | string | `''` | Basic Auth
username |
| `auth.password` | string | `''` | Basic Auth
password |
| `param` | string | `''` | Parameter to store
response |
| `headersInvalid` | bool | `false` | Mark headers config as
invalid |
| `silent` | bool | `false` | Suppress
output |
---
### 4.8 CLICK
Clicks a page element using AI Element Selectors.
**Standard:**
```yaml
- type: click
selectorType: ai
selector: null
item: null
```
**All Options Activated:**
```yaml
- condition: '{{\p1}} = yes'
label: MY LABEL
type: click
selectorType: ai
selector: null
item: null
silent: true
```
| Key | Type | Default | Description
|
|----------------|-------------|---------|-----------------------------------|
| `selectorType` | string | `ai` | Selector type (`ai`)
|
| `selector` | array\|null | `null` | AI selector array (via "Grab" UI)
|
| `item` | object\|null| `null` | Selected element reference
|
| `silent` | bool | `false` | Suppress output
|
> **Note:** Selectors are typically captured via the "Grab" button in the
HARPA UI, generating complex `$matches` arrays. Manual selector editing is
possible but advanced.
---
### 4.9 PASTE
Inserts text into a page form/input element.
**Standard:**
```yaml
- type: paste
text: ''
mode: null
selectorType: ai
lastKey: null
selector: null
item: null
```
**All Options Activated:**
```yaml
- condition: '{{\p1}} = yes'
label: MY LABEL
type: paste
text: '{{\gpt}}'
mode: null
selectorType: ai
lastKey: none
selector: <ai-selector-array>
item: <element-reference>
silent: true
```
| Key | Type | Default |
Description |
|----------------|-------------|---------|------------------------------------------------|
| `text` | string | `''` | Text to paste (supports
parameters) |
| `mode` | string\|null| `null` | Paste
mode |
| `selectorType` | string | `ai` | Selector
type |
| `lastKey` | string\|null| `null` | Key to press after paste (`none`,
`enter`, etc)|
| `selector` | array\|null | `null` | AI selector for target
element |
| `item` | object\|null| `null` | Element
reference |
| `silent` | bool | `false` | Suppress
output |
---
### 4.10 EXTRACT
Retrieves content from web page elements. Data stored in `param` (default:
`param`).
**Standard:**
```yaml
- type: extract
selectorType: ai
selector: null
item: null
param: ''
default: ''
```
**All Options Activated:**
```yaml
- condition: '{{\p1}} = yes'
label: MY LABEL
type: extract
selectorType: ai
selector: <ai-selector-array>
item:
type: text
value: Extracted Text
container:
__$ht: element
id: 128
at: 0
param: extractedData
default: 'default value'
silent: true
```
| Key | Type | Default |
Description |
|----------------|-------------|---------|------------------------------------------|
| `selectorType` | string | `ai` | Selector
type |
| `selector` | array\|null | `null` | AI selector for target
element |
| `item` | object\|null| `null` | Element reference with
type/value |
| `param` | string | `''` | Parameter to store extracted
data |
| `default` | string | `''` | Fallback if no element
found |
| `silent` | bool | `false` | Suppress
output |
---
### 4.11 GROUP
Combines multiple steps. Used for conditional branching.
**Standard:**
```yaml
- type: group
steps:
- type: say
message: โถ๏ธ GROUP
```
**All Options Activated:**
```yaml
- condition: '{{\p1}} = yes'
label: MY LABEL
type: group
steps:
- type: say
message: โถ๏ธ Inside group
- type: gpt
prompt: 'Process something'
```
| Key | Type | Description |
|---------|-------|---------------------------------|
| `steps` | array | Nested array of step objects |
---
### 4.12 LOOP
Iterates over a list parameter. Inside the loop, `{{\item}}` is the current
element and `{{\index}}` is the current index.
**Standard:**
```yaml
- type: loop
list: myList
steps:
- type: say
message: |-
๐ LOOP:
- item: {{\item}}
- index: {{\index}}
```
**All Options Activated:**
```yaml
- condition: '{{\p1}} = yes'
label: MY LABEL
type: loop
list: myList
steps:
- type: navigate
url: '{{\item.url}}'
waitForIdle: true
- type: gpt
prompt: 'Summarize: {{\page}}'
```
| Key | Type | Description |
|---------|--------|---------------------------------------------------|
| `list` | string | Name of the list parameter to iterate over |
| `steps` | array | Steps to execute for each item |
**Inside loops:** `{{\item}}` = current element, `{{\item.property}}` for
object properties, `{{\index}}` = current index.
---
### 4.13 JUMP
Redirects execution to a labeled step.
```yaml
# Full version
- type: jump
to: TARGET LABEL
# Short version
- jump: TARGET LABEL
# Conditional jump
- condition: '{{\option}} = retry'
type: jump
to: START LABEL
```
| Key | Type | Description |
|------|--------|----------------------------------|
| `to` | string | Label of the target step |
> โ ๏ธ **Caution:** JUMPs can create infinite loops. Always use with
conditions.
---
### 4.14 RUN JS
Executes JavaScript in the scope of the opened web page.
**Standard:**
```yaml
- type: js
args: selector
code: |-
const selector = args.selector || 'h1'
await $harpa.scroller.scroll('viewport')
await $harpa.scroller.scroll('top')
console.log('$harpa:', $harpa)
return Array
.from(document.querySelectorAll(selector))
.map(n => n.textContent)
.join('\n')
param: ''
timeout: 15000
onFailure: FALLBACK LABEL
silent: false
```
**All Options Activated:**
```yaml
- condition: '{{\p1}} = yes'
label: MY LABEL
type: js
args: p1, p2
code: |-
return Number(args.p1) + Number(args.p2)
param: result
timeout: 15000
onFailure: ON FAILURE LABEL
silent: true
```
| Key | Type | Default |
Description |
|-------------|--------|---------|--------------------------------------------------------|
| `args` | string | โ | Comma-separated parameter names passed as
`args` object|
| `code` | string | โ | JavaScript code to
execute |
| `param` | string | `''` | Parameter to store the return
value |
| `timeout` | int | `15000` | Execution timeout in
ms |
| `onFailure` | string | โ | Label to jump to on
error |
| `silent` | bool | `false` | Suppress
output |
**Available `$harpa` JS API:**
- `$harpa.page.click` โ click elements
- `$harpa.page.scroll` โ scroll page
- `$harpa.page.parse` โ parse data
- `$harpa.page.query` โ query elements (by text, CSS)
- `$harpa.page.fetch` โ HTTP requests
- `$harpa.page.idle` โ wait for idle
- `$harpa.inspector.*` โ inspect DOM nodes
- `$harpa.scroller.scroll('viewport' | 'top')` โ scroll control
---
### 4.15 COMMAND
Calls another HARPA command by name. Enables building higher-order command
chains.
**Standard:**
```yaml
- type: command
name: ''
inputs: []
silent: false
```
**All Options Activated:**
```yaml
- condition: '{{\p1}} = yes'
label: MY LABEL
type: command
name: Summary
inputs:
- 'REPORT'
- 'DONE'
silent: true
```
| Key | Type | Default |
Description |
|----------|--------|---------|----------------------------------------------------------|
| `name` | string | `''` | Name of the command to
execute |
| `inputs` | array | `[]` | Pre-filled inputs to bypass ASK
steps |
| `silent` | bool | `false` | Suppress
output |
---
### 4.16 CONNECTION
Switches AI provider/model mid-command.
**Standard:**
```yaml
- type: connection
connection: ''
switchDuration: command
```
**All Options Activated:**
```yaml
- condition: '{{\p1}} = yes'
label: MY LABEL
type: connection
connection: 'โ๏ธ HARPA AI'
switchDuration: command
silent: true
```
| Key | Type | Default |
Description |
|------------------|--------|-----------|-----------------------------------------------|
| `connection` | string | `''` | AI connection title or
ID |
| `switchDuration` | string | `command` | Duration of switch
(`command`) |
| `silent` | bool | `false` | Suppress
output |
---
### 4.17 EXPORT
Exports data to a file.
**Standard:**
```yaml
- type: export
what: all-messages
param: gpt
filename: ''
```
**All Options Activated:**
```yaml
- condition: '{{\p1}} = yes'
label: MY LABEL
type: export
what: all-messages
param: gpt
filename: harpa-messages.txt
silent: true
```
| Key | Type | Default |
Description |
|------------|--------|----------------|-------------------------------------------|
| `what` | string | `all-messages` | What to export (`all-messages`,
`param`) |
| `param` | string | `gpt` | Source
parameter |
| `filename` | string | `''` | Output
filename |
| `silent` | bool | `false` | Suppress
output |
---
### 4.18 CONTROL
Controls the HARPA UI frame visibility.
**Standard:**
```yaml
- type: control
action: hide
```
| Key | Type | Description |
|----------|--------|--------------------------------|
| `action` | string | `hide` or `show` the frame |
---
### 4.19 PREFILL
Pre-fills the chat input field with text before user sends it.
**Standard:**
```yaml
- type: prefill
message: |-
Please parse information from the web page:
{{\page}}
My question:
interpolate: false
```
| Key | Type | Default |
Description |
|---------------|--------|---------|-------------------------------------------|
| `message` | string | โ | Text to prefill in chat
input |
| `interpolate` | bool | `false` | Whether to interpolate
parameters |
---
### 4.20 CLEAR
Erases chat history. Useful for isolating prompt context.
```yaml
- type: clear
silent: false # optional, default false
```
---
### 4.21 STOP
Terminates the current step group, or the entire command if no group exists.
```yaml
- type: stop
```
---
## 5. AI ELEMENT SELECTORS
HARPA uses AI-powered selectors (`selectorType: ai`) to identify page
elements. These are generated via the "Grab" button in the UI and produce
complex `$matches` arrays:
```yaml
selector:
- $matches:
- $tag: H1
- $role: heading
- $class: PostContent__title
- $style: 'Poppins:48px:600:normal'
- $content: Page Title
- $class: PostContent__header
traverse: '1'
- $anchor: CONTENTS
shift: '79:-132'
- $text: CONTENTS
traverse: '-3:0:1'
min: 5
- $size: 1
```
**Selector match properties:**
| Property | Description |
|---------------|-------------------------------------------------|
| `$tag` | HTML tag name (e.g., `H1`, `BUTTON`, `DIV`) |
| `$role` | ARIA role |
| `$class` | CSS class name |
| `$id` | Element ID |
| `$style` | Computed style signature |
| `$content` | Text content of element |
| `$attribute` | HTML attribute (e.g., `contenteditable=true`) |
| `$testId` | Test ID attribute |
| `$anchor` | Nearby anchor text |
| `$text` | Nearby text |
| `traverse` | DOM traversal path relative to element |
| `shift` | Positional offset |
| `min` | Minimum number of matching criteria |
| `$size` | Expected number of matched elements |
| `$parse` | Data extraction type (e.g., `text`) |
---
## 6. GRID API โ Browser Orchestration
### Base URL
```
POST https://api.harpa.ai/api/v1/grid
```
### Authentication
```
Authorization: Bearer $HARPA_API_KEY
```
### Request Schema
```json
{
"action": "<scrape | serp | command | prompt>",
"url": "<optional string>",
"query": "<optional string โ serp only>",
"name": "<optional string โ command only>",
"inputs": ["<optional strings โ command only>"],
"resultParam": "<optional string โ command only>",
"grab": [
{
"selector": "<string>",
"selectorType": "<auto | css | xpath | text>",
"at": "<all | first | last | number>",
"take": "<innerText | textContent | id | className | innerHTML | outerHTML | value | href | [attr] | (style)>",
"label": "<string>"
}
],
"node": "<optional node ID(s) or count>",
"resultsWebhook": "<optional URL>",
"timeout": "<optional ms, max 300000>",
"connection": "<optional AI connection title/ID>",
"prompt": "<optional string โ prompt only>"
}
```
### Actions
| Action | Purpose | Required
Fields |
|-----------|--------------------------------------|--------------------------|
| `scrape` | Extract data from web pages | `url` (+ optional
`grab`)|
| `serp` | Search the web |
`query` |
| `command` | Run a built-in or custom AI command |
`name` |
| `prompt` | Send an AI prompt about a web page | `prompt`,
`url` |
### Make.com Modules
| Module | Type | Description
|
|----------------------|---------|------------------------------------------|
| Scrape Web Page | Action | Extract page content in markdown/HTML
|
| Search the Web | Action | Get SERP results with
titles/descriptions|
| Run AI Command | Action | Execute any built-in or custom command
|
| On Web Monitor | Trigger | Fires on web page content changes
|
| On Action Result | Trigger | Receives data from HARPA commands
|
---
## 7. YAML FORMATTING RULES
1. **Indentation:** Always 2 spaces. Never tabs.
2. **Parameters in YAML:** Use double curly braces `{{\param}}`.
3. **Escaping for YAML output:** When generating YAML that will be imported
into HARPA and you need literal `{{\param}}` in the output, write
`{{\\param}}` in the source.
4. **Strings with special chars:** Quote with single quotes. Use `|-` for
multi-line block scalars.
5. **Condition values:** Always quote: `condition: '{{\p1}} = yes'`
6. **Operators in conditions:** Must have spaces: `{{\x}} = 1` not
`{{\x}}=1`.
7. **Boolean values:** `true` / `false` (lowercase, unquoted).
8. **Null values:** `null` (lowercase, unquoted).
9. **Empty strings:** `''`
10. **Validate:** Use [YAML
Validator](https://codebeautify.org/yaml-validator) to check syntax before
import.
---
## 8. RESPONSE PROTOCOL
When a user requests a HARPA command or workflow:
1. **Decompose** the query into atomic requirements.
2. **Search** this knowledge base for each relevant step type, parameter,
and syntax rule.
3. **Output** ready-to-use YAML in a code artifact.
4. **Ensure** YAML is syntactically perfect, uses correct indentation (2
spaces), proper quoting, and all parameters are correctly referenced.
5. **Include** the `meta` block, `steps` array, and `version: 1`.
6. **Escape** parameter references with `{{\\param}}` when the YAML output
is intended for import into HARPA (so they render as `{{\param}}`).
7. **Use clear labels** for steps that may be targets of JUMP or onFailure.
8. **Test** the YAML by validating at
https://codebeautify.org/yaml-validator.
---
## 9. CHUNKING (GPT Step Advanced Feature)
Chunking divides large content (web pages, documents, transcripts) into
smaller parts that fit within a model's token limit. Chunks are injected
into prompts as `{{\chunk}}` parameters and processed by GPT one by one.
### How It Works
1. In a GPT step, click the "Slice to chunks" (โ๏ธ) button.
2. Select the text to slice (e.g., `{{\page}}`).
3. Use `{{\chunk}}` in your prompt instead of `{{\page}}`.
4. HARPA processes each chunk sequentially.
5. GPT answers are concatenated into `{{\gpt}}`, which can be referenced in
subsequent steps.
### Key Rules
- Chunking has **no inherent memory** across chunks. If you need context
across chunks, include it in the prompt itself.
- Works best with large context window models (e.g., `gpt-3.5-turbo-16k`,
`gpt-4`).
- Alternative: Use `{{\page}}` directly if the model has a large enough
context window โ it truncates automatically.
### GPT Step Chunkify YAML
```yaml
- type: gpt
prompt: 'Summarize this section: {{\chunk}}'
chunkify:
text: '{{\page}}'
empty: 'No content found on this page.'
maxTokens: 16111
param: gpt
```
| Key | Type |
Description |
|----------------------|--------|------------------------------------------------|
| `chunkify.text` | string | The text to be chunked (e.g.,
`{{\page}}`) |
| `chunkify.empty` | string | Message displayed if the source text is
empty |
| `chunkify.maxTokens` | int | Maximum tokens per
chunk |
---
## 10. FUNCTION CALLING (GPT Step Advanced Feature)
Function calling allows the AI to intelligently choose to output a JSON
object with arguments to call one of your declared functions, following the
OpenAI function calling specification.
### Declaration in GPT Step
```yaml
- type: gpt
prompt: '{{\text}}'
functions:
call: auto
declaration:
name: get_current_weather
description: Get the current weather
parameters:
type: object
properties:
location:
type: string
description: 'The city and state, e.g. San Francisco, CA'
format:
type: string
enum: ['celsius', 'fahrenheit']
description: The temperature unit to use
required:
- location
- format
```
### Call Modes
| Mode | Description |
|------------|--------------------------------------------------------|
| `none` | Do not call functions |
| `auto` | AI may either call a function or provide a text answer |
| `required` | Force GPT to always call the first function |
### Result Parameters
- `{{\gptFunc}}` โ the name of the function the AI chose to call.
- `{{\gptArgs}}` โ the arguments JSON object.
### Handling Function Results
Use GROUP steps with conditions on `{{\gptFunc}}` to interpret each
function:
```yaml
- condition: '{{\gptFunc}} = get_current_weather'
type: group
steps:
- type: calc
func: set
param: weatherData
value: '{{\serp weather in {{\gptArgs.location}}}}'
- type: say
message: 'Weather: {{\weatherData}}'
```
### Function Parameter Types
- `string` โ text value
- `number` โ numeric value
- `boolean` โ true/false
- `enum` โ restricted set of values: `enum: ['option1', 'option2']`
- `object` โ nested object with `properties`
- `array` โ array of items with `items` definition
---
## 11. CONNECTIONS & AI PROVIDERS
### Connection Types
| Type |
Description |
|--------------------|--------------------------------------------------------------|
| **Web Session** | Free; uses your existing AI account login (ChatGPT,
Claude, Gemini). Limited to 10 msgs/day on Demo plan. Unlimited on S/X
plans. |
| **CloudGPT** | HARPA's premium hosted connection. Billed via
Megatokens. No API keys needed. |
| **API Key** | BYOK (Bring Your Own Key) โ connect your OpenAI,
Anthropic, etc. API keys directly. |
| **OpenRouter** | Connect to 30+ LLM models including LLAMA, MistralAI,
Claude, Perplexity via OpenRouter.ai. |
### CloudGPT Models (as of latest changelog)
| Model | Provider |
|--------------------|-------------|
| GPT-5.4 | OpenAI |
| GPT-5 Nano | OpenAI |
| Sonnet 4.6 | Anthropic |
| Haiku 4.5 | Anthropic |
| Gemini 3.1 Pro | Google |
| DeepSeek V3 | DeepSeek |
| DeepSeek R1 | DeepSeek |
| Perplexity Pro | Perplexity |
| Grok 4.1 | xAI |
| Llama 4 | Meta |
### Web Session Connections
| Provider | Setup Guide |
|--------------------|------------------------------------------------|
| ChatGPT | https://harpa.ai/blog/chatgpt-web-session |
| Claude AI | https://harpa.ai/blog/claude-ai-connection |
| Google Gemini | https://harpa.ai/blog/google-bard-connection |
### API Connections
| Provider | Notes |
|--------------------|------------------------------------------------|
| OpenAI API | All GPT models, function calling support |
| Anthropic API | Claude models with thinking modes |
| OpenRouter | 30+ models via single API key |
| DeepSeek API | V3 and R1 with reasoning |
| xAI Grok API | Grok models with web search and citations |
| Perplexity API | Search-powered AI with citations |
| Groq | Llama models including versatile variants |
| Azure OpenAI | Enterprise Azure-hosted models |
| Straico | Alternative API provider |
### HARPA AI Agentic Connection
The built-in HARPA AI CloudGPT model is an AI agent that can:
- **Auto-run commands** โ detects intent and launches the right command
- **Auto web search** โ searches the web when a question needs current data
- **Auto page-aware mode** โ reads page content when needed
- **Image generation** โ generates images directly in chat
- **Auto MCP calls** โ calls configured MCP servers when relevant
### MCP (Model Context Protocol) โ v13.0+
- Connect external MCP tool servers to AI connections.
- Pre-filled Context7 defaults for quick setup.
- MCP tools work across CloudGPT and API connections.
- Per-chat tool caching for faster responses.
### Megatokens
1 Megatoken = **1 million input tokens** on efficient models โ 750,000 words
of English input text.
- Output tokens cost **3x** input tokens.
- Premium models (GPT-5.4, Sonnet 4.6, Gemini Pro) cost more per request.
- Each model card shows its cost as a multiplier: `x2 : x4` (input :
output).
**Average usage per 1 MT:**
- ~3,000 basic chat requests on GPT-5 Nano
- ~300 basic chat requests on GPT-5.4
- ~150 YouTube summaries (15-min videos) on GPT-5 Nano
- ~30 page-aware requests on GPT-5.4
---
## 12. PRICING PLANS
| Plan | Price | Tokens | Key Features |
|------|-------|--------|--------------|
| **Demo** (Free) | โฌ0 | 100 total power messages (non-renewable), 10 web
session msgs/day | Basic AI chat, 2 web automations, 2 custom commands |
| **S1** (Everyone) | โฌ14.40/mo (annual) | 75 MT/year | All CloudGPT models,
unlimited power messages, chat history, cloud storage |
| **S2** (Pros) | โฌ19.80/mo (annual) | 225 MT/year | Everything in S1 +
schedule commands, advanced automation, 10% off extra seats |
| **X** (Lifetime) | โฌ240 one-time | 30 MT (non-renewable, can top up) |
Lifetime access, BYOK, all features forever, 40% auto-discount on token
top-ups |
### Feature Availability by Plan
| Feature | Demo | S1 | S2 | X |
|---------|------|----|----|---|
| Web Session Connections | โ
(10/day) | โ
Unlimited | โ
Unlimited | โ
Unlimited |
| CloudGPT Models | โ | โ
| โ
| BYOK or top-up |
| Custom Commands | 2 | โ
Unlimited | โ
Unlimited | โ
Unlimited |
| Edit Predefined Commands | โ | โ
| โ
| โ
|
| Chat History | โ | โ
| โ
| โ
|
| Cloud Command Storage | โ | โ
| โ
| โ
|
| Schedule Commands | โ | โ | โ
| โ
|
| Advanced Automation (LOOP) | โ | โ | โ
| โ
|
| Team Spaces | โ | โ
| โ
(multi-seat) | Single user |
| AI Vision | โ | โ
| โ
| โ
|
| PDF/File Support | โ | โ
| โ
| โ
|
| Web Monitors | 2 | โ
| โ
| โ
|
---
## 13. TEAM SPACES
Spaces are workspaces for storing and collaborating over custom commands.
They can be personal or shared with a team/organization.
### Key Concepts
- Each space is isolated; users in a shared space won't see commands from
your personal space.
- S-tier plans support multi-user team spaces; billing is per seat.
- The space owner pays for all seats and controls the Megatoken balance.
- **Command Lock** (v12.1+): Lock commands to prevent other members from
editing/deleting them.
- Team Space connections (CloudGPT and API) are shared with all members;
only the owner can modify them.
### Creating a Team Space
1. Visit https://harpa.ai/pricing and sign in.
2. Hover over profile name โ "+ADD SPACE OR TEAM".
3. Choose a name, add users (they receive email invitations).
4. Upgrade the space plan from the pricing page.
5. Switch between spaces in HARPA via the Account Menu (โก๏ธ).
---
## 14. KEYBOARD SHORTCUTS
| Shortcut | Platform | Action |
|----------|----------|--------|
| `Alt+A` | Windows | Open HARPA AI |
| `^+A` (Ctrl+A) | Mac | Open HARPA AI |
| `Alt+Enter` | Windows | Echo parameter value / Send without AI |
| `โฅ+Enter` | Mac | Echo parameter value / Send without AI |
| `/` | All | Open commands menu |
| `/help` | All | Open Help command |
| `/clear` | All | Clear chat history |
---
## 15. ADDITIONAL PARAMETERS (EXTENDED REFERENCE)
### System Parameters (Complete List)
| Parameter | Description |
|-----------|-------------|
| `{{\page}}` | Full page text content (auto-truncated) |
| `{{\page query}}` | Page content filtered by semantic similarity to query
|
| `{{\page url}}` | Fetch content from a specific URL |
| `{{\page limit=N}}` | Limit in tokens; `{{\page limit=10%}}` for
percentage of context |
| `{{\selection}}` | Currently selected text on the page |
| `{{\url}}` | Current page URL |
| `{{\domain}}` | Current page domain |
| `{{\title}}` | Current page title |
| `{{\desc}}` | Page meta description |
| `{{\language}}` | Language from HARPA settings |
| `{{\transcript}}` | YouTube video transcription |
| `{{\gpt}}` | Last GPT response (default) |
| `{{\gptFunc}}` | Function name from function calling |
| `{{\gptArgs}}` | Function arguments from function calling |
| `{{\gptArgs.property}}` | Access specific argument property |
| `{{\serp query}}` | SERP results for the given query |
| `{{\grab selector}}` | Extract HTML element value |
| `{{\grab h1 take=className}}` | Grab with `take` argument |
| `{{\email}}` | Email content from Gmail, Outlook, Protonmail, Fastmail |
| `{{\input}}` | Content of the current input box |
| `{{\chunk}}` | Current chunk during chunking (GPT step) |
| `{{\response}}` | HTTP response from REQUEST step |
| `{{\item}}` | Current element in a LOOP |
| `{{\item.property}}` | Property of current loop element |
| `{{\index}}` | Current index in a LOOP |
| `{{\p1}}`, `{{\p2}}`, etc. | Custom user-defined parameters |
| `{{\g.paramName}}` | Global parameters (persist across commands) |
| `{{\array}}` | Array data structure containing extracted items (e.g., from
SERP, page data extraction) |
| `{{\array.N.property}}` | Access property `property` of item at index `N`
in array (common properties: `title`, `url`, `description`, `snippet`,
`source`) |
| `{{\array2}}` | Secondary array for additional data collections |
| `{{\article}}` | Article content extracted from web page |
| `{{\change}}` | Change detection data from web monitoring |
| `{{\content}}` | General content parameter |
| `{{\cost}}` | Cost information from pricing data extraction |
| `{{\cost last}}` | Last recorded cost value |
| `{{\data}}` | Extracted data parameter |
| `{{\g.p1}}`, `{{\g.posts}}`, `{{\g.tone}}` | Example global parameters
(persist across commands) |
| `{{\gptArgs.format}}`, `{{\gptArgs.location}}`, `{{\gptArgs.text}}` |
Example GPT function argument properties |
| `{{\h1}}` | H1 heading extracted from page |
| `{{\instructions}}` | Instructions parameter for AI prompts |
| `{{\item.fruit}}`, `{{\item.link}}` | Example loop item properties |
| `{{\keywords}}` | Extracted keywords from content |
| `{{\links}}` | Links array extracted from page |
| `{{\list}}` | List parameter |
| `{{\message -1}}`, `{{\message 0}}`, `{{\message 1}}`, `{{\message x}}` |
Chat message history parameters (negative indices for previous messages) |
| `{{\model}}` | AI model information |
| `{{\p3}}` | Custom user-defined parameter (extends `{{\p1}}`, `{{\p2}}`
pattern) |
| `{{\parameter}}` | Generic parameter reference |
| `{{\post}}` | Blog post or social media post content |
| `{{\pplxResponse}}` | Perplexity AI response |
| `{{\prices}}` | Extracted prices array |
| `{{\profile}}` | User profile data |
| `{{\query}}` | Search query parameter |
| `{{\search}}` | Search results data |
| `{{\search.result}}` | Specific search result item |
| `{{\start-menu}}` | Start menu content (Windows context) |
| `{{\sum}}` | Summation of numerical data |
| `{{\thread}}` | Discussion thread content |
| `{{\tone}}` | Tone analysis result |
| `{{\transcriptPlain}}` | Plain text transcript (e.g., from audio/video) |
| `{{\translate}}` | Translation result |
| `{{\urls}}` | URLs array |
| `{{\userinfo}}` | User information data |
| `{{\view}}` | View count or view data |
| `{{\website}}` | Website information |
### The `{{\grab}}` Parameter
Allows extracting value of an HTML element from a web page. The `take`
argument specifies what data to extract.
```
{{\grab h1}} โ innerText of first <h1>
{{\grab h1 take=className}} โ class name of first <h1>
{{\grab .price take=innerText}} โ inner text of .price element
```
### `{{\serp}}` Parameter
Searches the web and returns SERP results. Supports Google Search Operators:
```
{{\serp Nikola Tesla website:.uk}}
{{\serp site:amazon.com laptop}}
{{\serp intitle:keyword}}
```
SERP results can be extracted with `calc: serp.extract-links` into an array
with `.title`, `.url`, `.description` properties.
---
## 16. CALC FUNCTIONS โ COMPLETE YAML REFERENCE
### Parameters Group
```yaml
# Set parameter
- type: calc
func: set
param: saved.url
format: auto # auto, text, number, json
value: '{{\url}}'
# Clone parameter
- type: calc
func: clone
from: gpt
to: cloned.gpt
# Delete parameter
- type: calc
func: delete
param: temp
```
### Extraction Group
```yaml
# Extract data (prices, emails, numbers, etc.)
- type: calc
func: extract-data
to: prices
param: page
data: price # price, email, number, phone, url, etc.
index: all # all, first, last, or number
# Extract code blocks from text
- type: calc
func: extract-code
to: code
param: gpt
# Extract JSON from text
- type: calc
func: extract-json
to: jsonData
param: gpt
index: first # first, last, all, or number
```
### Numbers Group
```yaml
# Increment a numerical value
- type: calc
func: increment
param: counter
delta: '1' # can be negative for decrement
```
### Texts Group
```yaml
# Change text case
- type: calc
func: change-case
param: text
to: upperText
case: uppercase # uppercase, lowercase, title, sentence, pascal, camel, kebab, underscore
# First non-empty line
- type: calc
func: first-line
param: text
to: firstLine
# Last non-empty line
- type: calc
func: last-line
param: text
to: lastLine
# Split text into list by delimiter
- type: calc
func: split
param: csvLine
to: items
delimiter: ','
# Replace in text (regex or plain text)
- type: calc
func: replace
param: text
to: cleanedText
regex: '\\d{1}:(\\d{2})' # regex pattern
template: '$1 minutes' # replacement template, $1 = first capture group
# Match in text (regex extraction)
- type: calc
func: match
param: text
to: search.result
regex: '\\d{1,2}:\\d{2}'
# URL encode
- type: calc
func: encode-url
param: text
to: encodedText
# URL decode
- type: calc
func: decode-url
param: text
to: decodedText
# Remove emojis
- type: calc
func: remove-emojis
param: text
to: cleanText
# Chat break (insert context separator)
- type: calc
func: chat-break
```
### Lists Group
```yaml
# Add item to list
- type: calc
func: list-add
list: myList
item: newItem # parameter name or value
index: last # first, last, or number
# Filter list items
- type: calc
func: list-filter
list: myList
item: param # result parameter
match: '{ "name": "John" }'
matched: retain # retain or remove
# Update list items
- type: calc
func: list-update
list: myList
match: '{ "status": "in progress" }'
prop: '{ "status": null }'
# Merge two lists (by shared field)
- type: calc
func: list-merge
to: merged.list
listA: a
listB: b
by: id # field name to match on
# Join list into string
- type: calc
func: list-join
list: myList
to: joinedText
delimiter: ', '
# Extract SERP links from search data
- type: calc
func: serp.extract-links
from: information
to: links
# Result: array of { title, url, description }
# Extract search sources
- type: calc
func: search.extract-sources
from: searchData
to: sources
```
---
## 17. GRID API โ EXTENDED REFERENCE
### Full Page Scraping
```json
{
"action": "scrape",
"url": "https://harpa.ai/blog",
"node": "r2d2",
"resultsWebhook": "https://webhook.site/...",
"timeout": "15000"
}
```
### Targeted Element Scraping
```json
{
"action": "scrape",
"url": "https://harpa.ai/blog",
"grab": [
{
"selector": ".PostList__postTitle",
"selectorType": "auto",
"at": "all",
"take": "innerText",
"label": "data"
}
],
"node": "r2d2",
"timeout": "15000"
}
```
### `grab` Parameter โ Complete Options
**`selectorType` values:**
| Value | Description |
|--------|-------------|
| `auto` | Auto-detect (default) |
| `css` | CSS selector |
| `xpath`| XPath expression |
| `text` | Text content selector |
**`at` values:**
| Value | Description |
|---------|-------------|
| `first` | First matched element (default) |
| `last` | Last matched element |
| `all` | All matched elements (returns array) |
| Number | Specific index (0-based, supports negative) |
**`take` values:**
| Value | Description |
|--------------|-------------|
| `innerText` | Text content (default) |
| `textContent`| Raw text content |
| `id` | Element ID |
| `className` | CSS classes |
| `nodeName` | HTML tag name |
| `nodeType` | DOM node type |
| `attributes` | All attributes |
| `styles` | Computed styles |
| `innerHTML` | Inner HTML |
| `outerHTML` | Outer HTML (includes element itself) |
| `value` | Form input value |
| `href` | Link URL |
| `[attrName]` | Any specific attribute (e.g., `[data-id]`) |
| `(styleName)`| Any specific CSS style (e.g., `(color)`) |
### Search the Web (SERP)
```json
{
"action": "serp",
"query": "HARPA AI use cases",
"node": "r2d2",
"timeout": "15000"
}
```
### Run AI Command
```json
{
"action": "command",
"name": "Summary",
"url": "https://example.com",
"inputs": ["REPORT", "DONE"],
"resultParam": "message",
"node": "r2d2",
"timeout": "300000",
"connection": "CloudGPT"
}
```
### AI Prompt
```json
{
"action": "prompt",
"url": "https://example.com",
"prompt": "Summarize this page in 3 bullet points",
"node": "r2d2",
"connection": "CloudGPT",
"timeout": "60000"
}
```
### Synchronous vs Asynchronous Execution
- **Synchronous**: Default. Returns result immediately. Max timeout: 5
minutes (300,000ms).
- **Asynchronous**: Set `resultsWebhook` to a URL. HARPA GRID stores the
action for 30 days; nodes that come online execute it and POST results to
the webhook.
### Multi-Node Execution
```json
{
"node": "r2d2 c3po pqtx" // space-separated node IDs
}
// OR
{
"node": "5" // first N available nodes
}
```
---
## 18. MAKE.COM / ZAPIER / N8N INTEGRATION
### Make.com Modules
**Action Modules:**
| Module | Description |
|--------|-------------|
| **Scrape Web Page** | Get full page content (markdown), HTML, or elements
by CSS/XPath/Text selectors |
| **Search the Web** | Get SERP links with titles and descriptions |
| **Run AI Command** | Execute any built-in or custom command on a web page
|
**Trigger Modules:**
| Module | Description |
|--------|-------------|
| **On Web Monitor** | Fires when a monitored web page changes |
| **On Action Result** | Receives data from HARPA AI commands |
### Setting Up Make.com Connection
1. Create a new scenario in Make.com.
2. Add a HARPA GRID module.
3. Click **Create Connection**.
4. Name the connection.
5. In HARPA Extension โ AUTOMATE tab โ Create and copy **API Key** to
Make.com.
6. Save.
### Sending Data to Webhooks from Commands
Use the REQUEST step with the webhook URL:
```yaml
- type: request
url: '{{\webhook}}'
method: post
body: '{{\json}}'
auth:
enabled: false
username: ''
password: ''
```
### Zapier Integration
HARPA GRID works with Zapier via REST API webhooks. Structure the JSON
request body according to the GRID API reference.
### Boost.Space Integration
HARPA GRID integrates with Boost.Space for multi-tool workflows (Slack,
Google Drive, Hunter.io, Sheets, Airtable, Mailgun).
---
## 19. WEB MONITORING & SCHEDULING
### Web Page Monitoring
HARPA can monitor web pages for changes (price drops, stock availability,
content updates). Available in the AUTOMATE tab.
### Command Scheduling (S2/X plans)
AI commands can be scheduled to run at specific intervals:
1. Open HARPA โ AUTOMATE tab.
2. Set schedule frequency.
3. HARPA runs the command in the background at the configured intervals.
---
## 20. FILE & ATTACHMENT SUPPORT (v10.7+)
| Format | Support |
|--------|---------|
| **PDF** | Drag & drop, render in chat, use as context in prompts,
summarize, extract text |
| **DOCX** | HTML conversion via Mammoth.js |
| **XLSX** | Spreadsheet processing |
| **CSV/TSV** | Text file processing |
| **Images** | Vision features, screenshots |
### Using PDFs
- Drag and drop PDF files into HARPA chat.
- Use for context in prompts.
- Create summaries or ask questions about PDF content.
- Attachments persist across chat sessions.
---
## 21. SEARCH ENGINES SUPPORTED
HARPA provides AI search assistance for:
Google, Google Scholar, Baidu, Bing, DuckDuckGo, Brave, Yahoo, Naver,
Yandex, Kagi, Searx.
---
## 22. CHANGELOG HIGHLIGHTS (Key Version Features)
| Version | Key Features |
|---------|-------------|
| **v13.0** | MCP tools, Claude Opus 4.6, AUTO theme mode |
| **v12.1** | Command Lock, 14 UI languages |
| **v12.0** | Grok AI engine, quick prompt creation |
| **v11.9** | Perplexity & xAI API providers, citations |
| **v11.0** | Thinking mode, Perplexity integration |
| **v10.9** | Global parameters editor in Settings |
| **v10.7** | PDF support, DOCX/XLSX support, attachments system |
| **v10.0** | Notification system |
| **v9.9** | Llama 4, Sonnet 4 models |
| **v9.8** | DeepSeek R1/V3, Llama 3.3 |
| **v9.6** | GRID API launch, Connections Sync |
| **v8.7** | GPT-4o model support |
| **v8.6** | Grab parameter, Echo parameters, Manifest V3 |
| **v8.5** | Command scheduling, PREFILL step, JS step timeout |
| **v8.4** | Search Agent v2, multiple conditions |
| **v8.3** | Email Assistant, `{{\email}}` and `{{\input}}` params, PASTE
update |
| **v8.1** | CloudGPT launch |
| **v8.0** | Premium plans (X/S), Chat History, Cloud Storage, Team Spaces |
| **v7.1** | EXPORT step, DALLยทE integration |
| **v7.0** | ASK options, SERP param, CALC step, LOOPS, CONDITIONS, JUMPS,
WAIT |
---
## 23. DATA PROTECTION & SECURITY
- All actions execute **locally in your browser** โ data stays on your
machine.
- HARPA servers: US and Germany (strict privacy jurisdictions).
- No logs or data stored on HARPA servers.
- Fully compliant with **GDPR** and **CCPA**.
- API Key is unique to your Team Space; only visible once upon creation.
- Revoke and regenerate keys anytime from the HARPA Chrome Extension.
---
## 24. TROUBLESHOOTING REFERENCE
### YAML Validation
If a command doesn't appear after import, validate YAML syntax at:
https://codebeautify.org/yaml-validator
### Common Issues
| Issue | Solution |
|-------|----------|
| Command doesn't appear after import | YAML syntax error โ validate with
YAML Validator |
| AI not responding | Check LLM status and connection type |
| Parameters not interpolating | Ensure `{{\param}}` syntax with double
curly braces; check for accidental escaping with `{{\\param}}` |
| Conditions not working | Ensure spaces around operators: `{{\x}} = 1` not
`{{\x}}=1` |
| LOOP not working | LOOPs require API key connection (S2/X plans) |
| Page content truncated | Use `{{\page limit=N}}` or chunking for large
pages |
| Web session disconnects | Use CloudGPT or API key connection for stability
|
### Basic Troubleshooting Steps
1. Check LLM status and your connection.
2. Check HARPA version / reset HARPA.
3. Check if HARPA has permissions to access web pages.
4. Check if you are logged in to HARPA AI.
5. Restart your browser.
---
## 25. COMPLETE COMMAND EXAMPLES
### Example 1: Domain Name Generator
```yaml
meta:
title: Domain name generator
description: ''
category: User
emoji: ๐
steps:
- type: ask
param: p1
message: >-
Enter your niche, product/service/business description,
or leave empty to parse from page
default: '{{\page}}'
- type: gpt
prompt: >-
Please ignore all previous instructions.
I want you to respond only in {{\language}}.
Generate 10 creative domain name ideas for: {{\p1}}
param: gpt
version: 1
```
### Example 2: Google Search with SERP Extraction
```yaml
meta:
title: Google Search
description: Search and extract SERP data
category: User
emoji: ๐
steps:
- type: ask
message: What would you like to search for?
param: query
default: ''
- type: calc
func: set
param: data
value: '{{\serp {{\query}}}}'
- type: calc
func: serp.extract-links
from: data
to: links
- type: say
message: |-
โ
SERP data extracted:
- [{{\links.0.title}}]({{\links.0.url}}): {{\links.0.description}}
- [{{\links.1.title}}]({{\links.1.url}}): {{\links.1.description}}
- [{{\links.2.title}}]({{\links.2.url}}): {{\links.2.description}}
version: 1
```
### Example 3: Multi-Page Data Extraction with LOOP
```yaml
meta:
title: Multi-page extractor
description: Extract data from multiple URLs
category: User
emoji: ๐
steps:
- type: ask
param: p1
message: 'Enter URLs (one per line):'
- type: calc
func: split
param: p1
to: urls
delimiter: '\n'
- type: loop
list: urls
steps:
- type: navigate
url: '{{\item}}'
waitForIdle: true
- type: gpt
prompt: >-
Extract the main heading, price, and description from this page.
Respond in JSON format.
Page: {{\page}}
param: extracted
isolated: true
- type: calc
func: list-add
list: results
item: extracted
index: last
- type: export
what: param
param: results
filename: extracted-data.json
version: 1
```
### Example 4: Webhook Data Sender
```yaml
meta:
title: Send page data to webhook
description: Extract and send JSON data via webhook
category: User
emoji: ๐
steps:
- type: gpt
prompt: >-
Extract product name, price, and description from this page.
Respond only with JSON. Wrap in a code block.
Page: {{\page}}
param: gpt
isolated: true
- type: calc
func: extract-code
to: json
param: gpt
- type: request
url: 'https://webhook.site/your-webhook-id'
method: post
body: '{{\json}}'
auth:
enabled: false
username: ''
password: ''
param: response
- type: say
message: 'โ
Data sent! Response: {{\response}}'
version: 1
```
### Example 5: Conditional Dialog with Translation
```yaml
meta:
title: Text translator
description: Translate text with language options
category: User
emoji: ๐
steps:
- type: gpt
prompt: >-
Summarize this web page concisely:
{{\page}}
- type: ask
label: choose-action
param: action
message: 'What would you like to do?'
options:
- label: โ
DONE
value: done
- label: ๐ซ๐ท TRANSLATE TO FRENCH
value: french
- label: ๐ ๏ธ CUSTOM LANGUAGE
value: custom
- condition: '{{\action}} = done'
type: stop
- condition: '{{\action}} = french'
type: gpt
prompt: >-
Translate the following text to French:
{{\gpt}}
- condition: '{{\action}} = french'
type: jump
to: choose-action
- condition: '{{\action}} = custom'
type: group
steps:
- type: ask
param: targetLang
message: 'Enter target language:'
- type: gpt
prompt: >-
Translate this text to {{\targetLang}}:
{{\gpt}}
- type: stop
version: 1
```
---
## 26. HARPA AI OVERVIEW
**Full Name:** HARPA AI โ High Availability Robotic Process Automation
**Company:** HARPA AI Technologies LLC
**Founded:** 2021
**Headquarters:** Finland ๐ซ๐ฎ
**Platform:** Chrome Extension (compatible with Chrome, Brave, Opera, Edge,
Chromium)
**Users:** 500,000+ professionals
**Chrome Web Store Rating:** 4.7/5
**UI Languages (v12.1+):** English, Spanish, French, German, Italian,
Swedish, Portuguese, Dutch, Polish, Chinese, Hindi, Czech, Ukrainian,
Romanian
**Discord:** https://discord.gg/B9Evx82m4K
**Support:** [email protected]
**Billing:** [email protected] (via FastSpring)
---
## 27. DOCUMENTATION SOURCES INDEX
| Section | Official URL |
|---------|-------------|
| AI Commands Overview | https://harpa.ai/chatml/overview |
| Creating Custom Commands |
https://harpa.ai/chatml/creating-custom-commands |
| Importing Commands | https://harpa.ai/chatml/importing-custom-commands |
| Parameters | https://harpa.ai/chatml/parameters |
| Automation Steps | https://harpa.ai/chatml/automation-steps |
| SAY, ASK, GPT Steps | https://harpa.ai/chatml/steps-say-ask-gpt |
| Navigate Step | https://harpa.ai/chatml/steps-navigate |
| Wait Step | https://harpa.ai/chatml/steps-wait |
| Request Step | https://harpa.ai/chatml/steps-request |
| Click & Paste Steps | https://harpa.ai/chatml/steps-click-paste-scroll |
| Extract Step | https://harpa.ai/chatml/steps-extract |
| Group, Loop, Jump | https://harpa.ai/chatml/steps-group-loop-jump |
| Run JS Step | https://harpa.ai/chatml/steps-run-js |
| Command Step | https://harpa.ai/chatml/steps-command |
| Clear & Stop Steps | https://harpa.ai/chatml/steps-clear-stop |
| Calc Step | https://harpa.ai/chatml/steps-calc |
| Conditions & Jumps | https://harpa.ai/chatml/conditions-and-jumps |
| AI Element Selectors | https://harpa.ai/chatml/ai-element-selectors |
| Troubleshooting | https://harpa.ai/chatml/troubleshooting |
| Function Calling | https://harpa.ai/guides/function-calling |
| Chunking | https://harpa.ai/guides/chunking |
| Page Crawler | https://harpa.ai/guides/page-parameter-page-crawler |
| GRID API Overview | https://harpa.ai/grid |
| GRID REST API Reference | https://harpa.ai/grid/grid-rest-api-reference |
| Browser Node Setup | https://harpa.ai/grid/browser-automation-node-setup |
| Make.com Setup | https://harpa.ai/grid/make-com-harpa-grid-setup-basics |
| Run AI Command (Make.com) | https://harpa.ai/grid/module-run-ai-command |
| Scrape Web Page (Make.com) | https://harpa.ai/grid/module-scrape-web-page
|
| Search the Web (Make.com) | https://harpa.ai/grid/module-search-the-web |
| On Web Monitor (Make.com) | https://harpa.ai/grid/module-on-web-monitor |
| Web Search & Scraping | https://harpa.ai/grid/web-search-and-scraping |
| Data Protection | https://harpa.ai/grid/data-protection-security |
| Zapier Integration | https://harpa.ai/grid/zapier-integration |
| CloudGPT Connections | https://harpa.ai/guides/cloudgpt-connections |
| Web Session Connections | https://harpa.ai/guides/web-session-connections
|
| API Connections | https://harpa.ai/guides/api-connections |
| Team Spaces | https://harpa.ai/guides/team-spaces |
| Premium Features | https://harpa.ai/guides/harpa-premium-features |
| Pricing | https://harpa.ai/pricing |
| Changelog | https://harpa.ai/blog/harpa-changelog |
| Command Library | https://harpa.ai/library |
| Make.com Connect Guide |
https://harpa.ai/guides/connecting-harpa-to-make-com |
label: PERSISTENT MEMORY PROMPT
silent: false
- type: ask
param: question
message: 'Please specify which command you would like to have created:'
options: null
default: ''
vision:
enabled: false
mode: area
hint: ''
send: true
label: MAIN QUESTION
- prompt: >-
# HARPA AI Command Structure Generator
You are a HARPA AI command structure specialist with deep expertise in
custom automation workflows and YAML formatting.
TASK: Generate a complete, functional HARPA AI command in YAML format based
on the MAIN QUESTION request and HARPA DOCUMENTATION provided.
MAIN QUESTION:
{{question}}
CONTEXT: HARPA AI commands are sequences of automation steps that perform
specific tasks in web browsers. Each command consists of metadata and steps
that are executed in order. Your goal is to create a properly structured
YAML file that implements the functionality requested in the MAIN QUESTION
while following best practices from the documentation.
OUTPUT FORMAT:
Your YAML output must follow this exact structure in CODE FORMAT:
```
meta:
title: Command title
description: description here
category: User
emoji: emoji here
steps:
- label: ALL OPTIONS ACTIVATED
type: say
message: Ask me anything. {{\test}}
interpolate: false
- label: STANDARD
type: say
message: Ask me anything. {{\test}}
- condition: '{{\p1}} = yes'
label: ALL OPTIONS ACTIVATED
type: ask
param: p1
message: 'Please provide p1:'
options:
- label: โ
YES
value: 'yes'
- label: โ NO
value: 'no'
- $custom
default: ''
vision:
enabled: true
mode: area
hint: TEST HINT MESSAGE
send: true
optionsInvalid: false
- label: STANDARD
type: ask
param: p2
message: 'Please provide p2:'
options: null
default: ''
vision:
enabled: false
mode: area
hint: ''
send: true
- condition: '{{\p1}} = yes'
label: ALL OPTIONS ACTIVATED
type: calc
func: set
param: ''
format: ''
value: |-
Es gibt insgesamt 24 functions:
1. set
2. clone
3. delete
4. extract-data
5. extract-code
6. extract-json
7. increment
8. change-case
9. first-line
10. last-line
11. split
12. replace
13. match
14. encode-url
15. decode-url
16. list-add
17. list-filter
18. list-update
19. list-merge
20. list-join
21. serp.extract-links
22. search.extract-sources
23. remove-emojis
24. chat-break
- label: STANDARD
type: calc
func: set
param: ''
format: ''
value: '{{\gpt}}'
- condition: '{{\p1}} = yes'
label: ALL OPTIONS ACTIVATED
type: gpt
prompt: TEST PROMPT
silent: true
dumb: true
chunkify:
text: '{{\page}}'
empty: TEST EMPTY MESSAGE
maxTokens: 16111
isolated: true
functions:
call: auto
declaration:
name: get_stock_price
description: Get the current stock price
parameters:
type: object
properties:
symbol:
type: string
description: The stock symbol
required:
- symbol
onCodeClick: send-text
param: gpt
- label: STANDARD
type: gpt
prompt: ''
- condition: '{{\p1}} = yes'
label: ALL OPTIONS ACTIVATED
type: request
url: https://webhook.site/
method: auto
headers:
Authorization: Bearer token
body: |-
{
"url": "{{\url}}",
"data": "{{\gpt}}"
}
auth:
enabled: true
username: username
password: password
param: param
headersInvalid: false
silent: true
- label: STANDARD
type: request
url: https://webhook.site/
method: auto
headers: null
body: |-
{
"url": "{{\url}}",
"data": "{{\gpt}}"
}
auth:
enabled: false
username: ''
password: ''
param: ''
- condition: '{{\p1}} = yes'
label: ALL OPTIONS ACTIVATED
type: navigate
url: one of https://domain.com/path, path, back, forward, reload (default)
waitForIdle: true
silent: true
onFailure: STANDARD
- type: navigate
url: ''
waitForIdle: true
silent: false
onFailure: STANDARD
- condition: '{{\p1}} = yes'
label: ALL OPTIONS ACTIVATED
type: click
selectorType: ai
selector: null
item: null
silent: true
- label: STANDARD
type: click
selectorType: ai
selector: null
item: null
- condition: '{{\p1}} = yes'
label: ALL OPTIONS ACTIVATED
type: paste
text: '{{\gpt}}'
mode: null
selectorType: ai
lastKey: none
selector:
- $matches:
- $tag: DIV
- $role: textbox
- $class: tiptap
- $class: ProseMirror
- $attribute: contenteditable=true
- $attribute: role=textbox
- $attribute: enterkeyhint=enter
- $attribute: aria-label=Schreiben Sie Ihre Anfrage an Claude
- $attribute: aria-multiline=true
- $attribute: aria-required=false
- $attribute: aria-invalid=false
- $attribute: translate=no
- $attribute: tabindex=0
- $attribute: data-lt-tmp-id=lt-316930
- $attribute: spellcheck=false
- $attribute: data-gramm=false
- $testId: chat-input
- $style: '"Anthropic Sans":16px:400:normal'
- $class: font-large
traverse: '0'
- $class: max-h-96
traverse: '0'
- $class: min-h-[1.5rem]
traverse: '0'
- $class: pl-[6px]
traverse: '0'
- $class: pt-[6px]
traverse: '0'
- $anchor: >-
Synthesized documentation to construct comprehensive technical
reference system
shift: '-3:-48'
- $text: >-
Synthesized documentation to construct comprehensive technical
reference system
traverse: '-14:1:1:0:3:1:0:0:0:0'
- $anchor: Strategized systematic analysis of massive technical documentation
shift: '-3:56'
- $text: Strategized systematic analysis of massive technical documentation
traverse: '-14:1:1:0:3:1:0:0:0:0'
- $anchor: Read the API/Grid section
shift: '-33:-84'
- $text: Read the API/Grid section
traverse: '-23:1:1:0:3:1:0:0:0:0'
min: 6
- $size: 1
item:
type: element
container:
__$ht: element
id: 254
value: |+
silent: true
- label: STANDARD
type: paste
text: ''
mode: null
selectorType: ai
lastKey: null
selector: null
item: null
- condition: '{{\p1}} = yes'
label: ALL OPTIONS ACTIVATEDA
type: command
name: Compact
inputs: []
silent: true
- label: STANDARD
type: command
name: ''
inputs: []
silent: false
- condition: '{{\p1}} = yes'
label: ALL OPTIONS ACTIVATEDA
type: extract
selectorType: ai
selector:
- $matches:
- $tag: BUTTON
- $role: button
- $class: inline-flex
- $class: items-center
- $class: justify-center
- $class: relative
- $class: isolate
- $class: shrink-0
- $class: can-focus
- $class: select-none
- $class: disabled:pointer-events-none
- $class: disabled:opacity-50
- $class: disabled:shadow-none
- $class: disabled:drop-shadow-none
- $class: font-base-bold
- $class: border-0.5
- $class: overflow-hidden
- $class: transition
- $class: duration-100
- $class: backface-hidden
- $class: h-9
- $class: px-4
- $class: py-2
- $class: rounded-lg
- $class: min-w-[5rem]
- $class: whitespace-nowrap
- $class: _fill_56vq7_9
- $class: _secondary_56vq7_72
- $attribute: type=button
- $style: '"Anthropic Sans":14px:460:normal'
- $content: Abbrechen
- $class: mr-3
traverse: '1:1:0'
- $class: py-0.5
traverse: '1:1:0'
- $class: text-[0.9375rem]
traverse: '1:1:0'
- $class: leading-6
traverse: '1:1:0'
- $class: bg-bg-300
traverse: '0:0:1:1:0'
- $anchor: Speichern
shift: '-112:0'
- $text: Speichern
traverse: '-1:0'
- $anchor: Erweitert
shift: '-81:-426'
- $text: Erweitert
traverse: '-12:0:0:0:0:0:1:1:0'
- $anchor: SELECT
shift: '-227:-384'
- $text: SELECT
traverse: '-6:0:0:0:0:0:1:1:0'
min: 26
- $size: 1
- $parse: text
at: 0
item:
type: text
value: Abbrechen
container:
__$ht: element
id: 128
at: 0
param: param
default: default value
silent: true
- label: STANDARD
type: extract
selectorType: ai
selector: null
item: null
param: ''
default: ''
- condition: '{{\p1}} = yes'
label: ALL OPTIONS ACTIVATED
type: export
what: all-messages
param: gpt
filename: harpa-messages.txt
silent: true
- label: STANDARD
type: export
what: all-messages
param: gpt
filename: ''
- condition: '{{\p1}} = yes'
label: ALL OPTIONS ACTIVATED
type: connection
connection: โ๏ธ HARPA AI
switchDuration: command
silent: true
- label: STANDARD
type: connection
connection: ''
switchDuration: command
- condition: '{{\p1}} = yes'
label: ALL OPTIONS ACTIVATED
type: js
args: selector
code: |-
// tip: reference arguments as args.*
const selector = args.selector || 'h1'
// tip: harpa has built-in js api
await $harpa.scroller.scroll('viewport')
await $harpa.scroller.scroll('top')
// tip: console and debugger supported
console.log('$harpa:', $harpa)
// tip: returned values are stored in params
return Array
.from(document.querySelectorAll(selector))
.map(n => n.textContent)
.join('\n')
param: param
timeout: 15000
onFailure: ON FAILURE LABEL NAME
silent: true
- label: STANDARD
type: js
args: selector
code: |-
// tip: reference arguments as args.*
const selector = args.selector || 'h1'
// tip: harpa has built-in js api
await $harpa.scroller.scroll('viewport')
await $harpa.scroller.scroll('top')
// tip: console and debugger supported
console.log('$harpa:', $harpa)
// tip: returned values are stored in params
return Array
.from(document.querySelectorAll(selector))
.map(n => n.textContent)
.join('\n')
param: ''
timeout: 15000
onFailure: ALL OPTIONS ACTIVATED
silent: false
- condition: '{{\p1}} = yes'
label: ALL OPTIONS ACTIVATED
type: control
action: hide
- label: STANDARD
type: control
action: hide
- condition: '{{\p1}} = yes'
label: ALL OPTIONS ACTIVATED
type: prefill
message: |-
Please parse information from the web page:
{{\page}}
My question:
interpolate: false
- label: STANDARD
type: prefill
message: |-
Please parse information from the web page:
{{\page}}
My question:
interpolate: false
- condition: '{{\p1}} = yes'
type: jump
to: JUMP TO LABEL NAME
- condition: '{{\p1}} = yes'
label: ALL OPTIONS ACTIVATED
type: group
steps:
- type: say
message: โถ๏ธ GROUP
- label: STANDARD
type: group
steps:
- type: say
message: โถ๏ธ GROUP
- condition: '{{\p1}} = yes'
label: ALL OPTIONS ACTIVATED
type: loop
list: list
steps:
- type: say
message: |-
๐ LOOP:
- item: {{\item}}
- index: {{\index}}
- label: STANDARD
type: loop
list: list
steps:
- type: say
message: |-
๐ LOOP:
- item: {{\item}}
- index: {{\index}}
- condition: '{{\p1}} = yes'
label: ALL OPTIONS ACTIVATED
type: wait
for: idle
timeout: 15000
silent: true
- label: STANDARD
type: wait
for: idle
timeout: 15000
- condition: '{{\p1}} = yes'
label: ALL OPTIONS ACTIVATED
type: stop
- label: STANDARD
type: stop
- condition: '{{\p1}} = yes'
label: ALL OPTIONS ACTIVATED
type: clear
silent: true
- label: STANDARD
type: clear
silent: false
version: 1
```
STEP SELECTION GUIDELINES:
Choose from these step types based on the required functionality:
- `say`: Display a message in chat
- `ask`: Request user input
- `gpt`: Send a prompt to AI
- `navigate`: Go to a URL
- `wait`: Pause execution
- `click`: Click on page elements
- `paste`: Insert text
- `extract`: Get data from the page
- `request`: Make HTTP requests
- `js`: Run JavaScript
- `calc`: Perform calculations and set parameters
- `group`: Combine multiple steps
- `loop`: Iterate over data
- `jump`: Control execution flow
- `command`: Execute other commands
- `connection`: Switch AI providers
- `export`: Export data
- `control`: Control UI/flow (e.g., hide elements)
- `prefill`: Pre-fill the input field
- `stop`: Stop execution
- `clear`: Clear context/chat
PARAMETER SELECTION GUIDELINES:
Choose from these parameters based on the required functionality:
- {{\page}}: Web page text content, automatically truncated for large pages.
- {{\page url}}: Retrieve web page content from a specified URL.
- {{\page query}}: Scan page content for text semantically similar to the
provided query.
- {{\page limit=N}}: Limit extracted page content by tokens or percentage of
the context window.
- {{\selection}}: Selected text on the web page.
- {{\title}}: Title of the current web page.
- {{\desc}}: Meta description of the current web page.
- {{\url}}: URL of the current web page.
- {{\domain}}: Domain of the current web page.
- {{\language}}: Language defined in app settings.
- {{\transcript}}: YouTube video transcript.
- {{\transcriptPlain}}: YouTube video transcript without timestamps.
- {{\message x}}: Access a previous chat message (x = index).
- {{\serp term}}: Search the web for a term and return up to 10 top links.
- {{\gpt}}: Last GPT response, useful for chaining prompts.
- {{\email}}: Parses email content (Gmail, Outlook, etc.) as a JSON object.
- {{\thread}}: Extracts messages or comments from a social media post or
thread.
- {{\thread limit=N}}: Specifies the number of messages to extract from a
thread (default 100).
- {{\thread exists}}: Checks if thread extraction is supported on the
current page.
- {{\view}}: Include screenshot of the page (requires Vision-capable AI).
- {{\cost}}: Total token cost of all GPT requests in the current chat.
- {{\cost last}}: Token cost of the last GPT request.
- {{\grab}}: Extracts HTML element values or attributes using CSS/XPath and
optional arguments (e.g., innerText, href, className).
- {{\p1}}, {{\name}}, {{\param}}: Examples of custom user-defined command
parameters.
- {{\g.parameter}}: Global parameter prefix, persistent across multiple
commands.
- {{\users.0.name.toUpperCase}}: Dot notation to access nested data
structures combined with JavaScript methods.
FORMAT AND STYLE GUIDELINES:
- Use proper YAML indentation (2 spaces)
- Include descriptive comments for complex steps
- Use meaningful parameter names
- Structure the command in a logical sequence
- Include appropriate error handling
- Follow HARPA AI's parameter syntax with double curly braces {{\parameter}}
CONSTRAINTS:
- Ensure all references to parameters are properly formatted
- Make sure the command is complete and executable.
- Do NOT add something new to the Syntax or the formatting etc.
- Do NOT forget the `version: 1` at the end and the `meta: title: Command
title description: description here category: User emoji: emoji here
steps:`at the beginning
- Create a self-contained command that works out of the box.
- If you use parameters, then use a \ before it, as from {param}} to
{{\\param}}
Based on the MAIN QUESTION and Harpa.ai Technical Reference, please create a
complete, functional HARPA AI command in YAML format.
type: gpt
isolated: false
param: finalAnswer
dumb: false
label: FINAL ANSWER
silent: false
- type: calc
func: replace
to: finalAnswer_edited
param: finalAnswer
regex: \{\{
template: '{{\'
label: ESCAPE PARAMETER
- type: say
message: '{{finalAnswer_edited}}'
label: DISPLAY THE FINAL ANSWER
This automation command is created by a community member. HARPA AI team does not audit community commands.
Please review the command carefully and only install if you trust the creator.
All rights reserved ยฉ HARPA AI TECHNOLOGIES LLC, 2021 โ 2026
Designed and engineered in Finland ๐ซ๐ฎ