HARPA.AI
LIBRARYAPIGUIDESAI COMMANDSBLOG

💎  Create Commands | Harpa AI

Your personal Harpa AI assistant that searches Harpa.ai for your query.

Created by Morteza H.
Updated on Apr 10, 21:01
Installed 36 times
RUNS JS CODE

How to Use

IMPORT COMMAND

Content

- type: gpt
  prompt: >-
    # Persistent Memory Prompt


    You are a highly advanced conversational AI with a sophisticated long-term
    memory module. You are designed to maintain context and remember details
    across extended conversations.


    TASK: I will provide you with a text input. Your primary task is to store
    the information contained within that text user input, in your long-term
    memory for the duration of this conversation. You will need to recall and
    utilize this information later when I request it or when it becomes relevant
    to subsequent inputs.


    CONTEXT:  This conversation will be ongoing.  The initial user input, sets a
    foundation of information that should influence and inform all future
    exchanges.  You are not simply summarizing the initial input; you are
    retaining all of its details for future use. You may be asked direct
    questions about the provided input, or asked to incorporate the knowledge
    into new responses. You should treat the user input as core information that
    colors the entire conversation. Do *not* forget the user input.


    FORMAT: No specific output format is required at this stage. Simply
    acknowledge receipt and understanding of the initial input. A simple
    confirmation, such as "Understood. The information from your input has been
    stored and will be used to maintain context throughout our conversation," is
    sufficient.


    CONSTRAINTS:

    -   Do not provide a summary of the input at this time, unless explicitly
    requested.

    -   Do not forget the input. Your responses should demonstrate a continuous
    awareness of the information provided in {{input}}.

    -   Do not reveal the internal mechanism you use to store and recall
    information.

    -   Avoid redundancy and be straight to the point.


    The following is the information, user input text, I want you to store and
    utilize:

    ```

    meta:
      title: test
      description: test
      category: User
      emoji: 🆕
    steps:
      - condition: '{{\p1}} = yes'
        label: TN20
        type: say
        message: Ask me anything.
      - condition: '{{\p1}} = yes'
        label: 1KOB
        type: ask
        param: p1
        message: 'Please provide p1:'
        options:
          - label: ✅ YES
            value: 'yes'
          - label: ⛔ NO
            value: 'no'
          - $custom
        default: test
        vision:
          enabled: true
          mode: area
          hint: test
          send: true
        optionsInvalid: false
      - condition: '{{\p1}} = yes'
        label: JZKG
        type: gpt
        prompt: test
        silent: true
        dumb: true
        param: test
        chunkify:
          text: '{{\page}}'
          empty: test
          maxTokens: 1000
        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
      - condition: '{{\p1}} = yes'
        label: 9CR7
        type: calc
        func: set
        param: test
        format: ''
        value: '{{\gpt}}'
      - condition: '{{\p1}} = yes'
        label: VZTY
        type: request
        url: https://webhook.site/
        method: auto
        headers:
          Authorization: Bearer token
        body: |-
          {
            "url": "{{\url}}",
            "data": "{{\gpt}}"
          }
        auth:
          enabled: false
          username: ''
          password: ''
        param: test
        headersInvalid: false
        silent: true
      - condition: '{{\p1}} = yes'
        label: 91CN
        type: navigate
        url: '{ "Authorization": "Bearer token" }'
        waitForIdle: true
        silent: true
        onFailure: 9CR7
      - condition: '{{\p1}} = yes'
        label: 79AM
        type: click
        selectorType: ai
        selector:
          - $matches:
              - $tag: SPAN
              - $class: MissionJournal-headline
              - $style: Roboto:18px:700:normal
              - $content: Tägliche Missionen
              - $id: daily-missions-plate
                traverse: '0'
              - $class: MissionJournal
                traverse: '0'
              - $class: MissionJournal--compact
                traverse: '0'
              - $class: MissionJournal-info
                traverse: '-1'
              - $class: Sidebar
                traverse: '1:0'
              - $anchor: Danke
                shift: '-32:132'
              - $text: Danke
                traverse: '-6:1:0'
              - $anchor: Dein monatlicher Report
                shift: '-133:90'
              - $text: Dein monatlicher Report
                traverse: '-4:1:0'
              - $anchor: Komplim.
                shift: '-124:132'
              - $text: Komplim.
                traverse: '-6:1:0'
            min: 5
          - $size: 1
        item:
          type: element
          container:
            __$ht: element
            id: 1
          value: Tägliche Missionen
        silent: true
      - condition: '{{\p1}} = yes'
        label: QLJ6
        type: paste
        text: test
        mode: null
        selectorType: ai
        lastKey: Enter
        selector:
          - $matches:
              - $tag: INPUT
              - $role: searchbox
              - $id: search-input
              - $class: Search-input
              - $attribute: type=search
              - $attribute: name=query
              - $attribute: aria-label=Suche nach Fragen, Diskussionen, Themen und Nutzern…
              - $attribute: autocomplete=off
              - $attribute: data-e2e-ref=search-input
              - $attribute: maxlength=200
              - $attribute: value
              - $attribute: data-last-active-input
              - $style: Roboto:16px:400:normal
              - $placeholder: Suche nach Fragen, Diskussionen, Themen und Nutzern…
              - $class: Search-inputGroup
                traverse: '0'
              - $role: form
                traverse: '0:0'
              - $class: Search-form
                traverse: '0:0'
              - $class: Search-container
                traverse: '0:0:0'
              - $class: Search-banner
                traverse: '0:0:0:0'
              - $anchor: Top-Themenwelten
                shift: 0:-70
              - $text: Top-Themenwelten
                traverse: '-4:0:0:0'
              - $anchor: Postfach
                shift: 86:-10
              - $text: Postfach
                traverse: '-3:2:0:0:0:0:0:0'
              - $anchor: Computer
                shift: '-15:-113'
              - $text: Computer
                traverse: '-9:0:0:0'
            min: 5
          - $size: 1
        item:
          type: element
          container:
            __$ht: element
            id: 2
          value: Suche nach Fragen, Diskussionen, Themen und Nutzern…
        silent: true
      - condition: '{{\p1}} = yes'
        label: 2NNE
        type: command
        name: Say Command + Global Storage Management
        inputs: []
        silent: true
      - condition: '{{\p1}} = yes'
        label: PYPL
        type: extract
        selectorType: ai
        selector:
          - $matches:
              - $tag: DIV
              - $class: u-mls
              - $class: u-hidden-tablet
              - $class: u-textNoWrap
              - $style: Roboto:14px:400:normal
              - $content: Startseite
              - $id: masthead-toggle-home
                traverse: '1'
              - $class: Masthead-menu
                traverse: '0:1'
              - $class: Masthead-banner
                traverse: '1:0:1'
              - $id: header-wrapper-app
                traverse: '0:0:1:0:1'
              - $role: banner
                traverse: '0:0:1:0:1'
              - $anchor: Entdecken
                shift: '-112:0'
              - $text: Entdecken
                traverse: '-2:0:1'
              - $anchor: Empfehlungen
                shift: '-61:-147'
              - $text: Empfehlungen
                traverse: '-13:0:0:0:1:0:1'
              - $anchor: Deine Startseite
                shift: 186:-86
              - $text: Deine Startseite
                traverse: '-9:0:0:0:1:0:1'
            min: 6
          - $size: 1
          - $parse: text
            at: 0
        item:
          type: text
          value: Startseite
          container:
            __$ht: element
            id: 6
          at: 0
        param: test
        default: test
        silent: true
      - condition: '{{\p1}} = yes'
        label: FIHZ
        type: export
        what: all-messages
        param: gpt
        filename: test.txt
        silent: true
      - condition: '{{\p1}} = yes'
        label: 6GWX
        type: connection
        connection: 🌐 CHAT AUTO
        switchDuration: command
        silent: true
      - condition: '{{\p1}} = yes'
        label: OSVI
        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: test
        timeout: 15000
        onFailure: 6GWX
        silent: true
      - condition: '{{\p1}} = yes'
        label: 7W96
        type: control
        action: frame-wide
      - condition: '{{\p1}} = yes'
        label: X7YI
        type: prefill
        message: |-
          Please parse information from the web page:

          {{\\\page}}

          My question: 
        interpolate: false
      - condition: '{{\p1}} = yes'
        type: jump
        to: 6GWX
      - condition: '{{\p1}} = yes'
        label: DN9X
        type: group
        steps:
          - type: say
            message: ▶️ GROUP
      - condition: '{{\p1}} = yes'
        label: A3Q5
        type: loop
        list: list
        steps:
          - type: say
            message: |-
              🔄 LOOP:
              - item: {{\item}}
              - index: {{\index}}
      - condition: '{{\p1}} = yes'
        label: XMIE
        type: wait
        for: idle
        timeout: 15000
        silent: true
      - condition: '{{\p1}} = yes'
        label: RFJV
        type: stop
      - condition: '{{\p1}} = yes'
        label: W556
        type: clear
        silent: true
    version: 1

    ```
  label: PERSISTENT MEMORY PROMPT
  silent: true
- type: say
  message: >-
    **Tip:** This command performs a thorough in-depth online search for a given
    query or topic and is best used for Harpa AI Guides. It takes time and is
    token hungry (~20k tokens on GPT-4o-mini per search depth).
  label: TIP COMMAND
- type: ask
  param: question
  message: >-
    Please enter your specific search query now. This query will be used as the
    basis for the AI-generated response. The more precisely you phrase your
    question or request, the better the AI can address it. What would you like
    to know?
  options: null
  default: ''
  vision:
    enabled: false
    mode: area
    hint: ''
    send: true
  label: MAIN QUESTION
- steps:
    - message: ⏳ Give me a minute to search through the web for you...
      type: say
    - value: '{{userQuery}}'
      type: calc
      func: set
      param: query
      format: text
    - type: calc
      func: set
      param: infoGPT
      format: ''
      value: >-
        - [Parameters](https://harpa.ai/chatml/parameters)

        - [Automation Steps](https://harpa.ai/chatml/automation-steps)

        - [SAY, ASK, GPT](https://harpa.ai/chatml/steps-say-ask-gpt)

        - [NAVIGATE](https://harpa.ai/chatml/steps-navigate)

        - [WAIT](https://harpa.ai/chatml/steps-wait)

        - [CLICK, PASTE,
        SCROLL](https://harpa.ai/chatml/steps-click-paste-scroll)

        - [REQUEST](https://harpa.ai/chatml/steps-request)

        - [EXTRACT](https://harpa.ai/chatml/steps-extract)

        - [GROUP, LOOP, JUMP](https://harpa.ai/chatml/steps-group-loop-jump)

        - [RUN JS](https://harpa.ai/chatml/steps-run-js)

        - [COMMAND](https://harpa.ai/chatml/steps-command)

        - [CLEAR, STOP](https://harpa.ai/chatml/steps-clear-stop)

        - [CALC](https://harpa.ai/chatml/steps-calc)

        - [Conditions and Jumps](https://harpa.ai/chatml/conditions-and-jumps)

        - [AI Element Selectors](https://harpa.ai/chatml/ai-element-selectors)

        - [Troubleshooting](https://harpa.ai/chatml/troubleshooting)
    - type: calc
      func: search.extract-sources
      from: infoGPT
      to: links
      format: ''
    - type: calc
      func: set
      param: total
      format: number
      value: '{{links.length}}'
    - steps:
        - label: TRYING TO FETCH
          type: calc
          func: set
          param: content
          format: ''
          value: '{{page {{item.url}}}}'
        - onFailure: PAGE URL
          type: js
          args: content
          code: |-
            const content = args['content']; 
            return { 
             chars: content.length, 
             estimatedTokens: Math.ceil(content.length / 4), 
             estimatedWords: Math.ceil(content.length / 4 * 0.75) 
            };
          param: count
          timeout: 15000
          label: COUNT
          silent: true
        - type: calc
          func: set
          param: pageUrl
          format: text
          value: '{{item.url}}'
          label: PAGE URL
        - type: js
          args: pageUrl
          code: |-
            const regex = /^(?:https?:\/\/)?(?:www\.)?([^\/]+)/;
            const testString = pageUrl;
            const matches = testString.match(regex);

            if (matches) {
              const hostname = matches[1];
              return hostname; 
            }
          param: hostname
          timeout: 15000
          silent: true
          label: HOSTNAME
          onFailure: INDEX INCREMENT
        - type: calc
          func: increment
          param: index
          delta: 1
          label: INDEX INCREMENT
        - type: js
          args: index, total
          code: |-
            function calculatePercentage(index, total) {
                index = Number(index);
                total = Number(total);

                if (isNaN(index) || isNaN(total)) {
                    return "Error";
                }

                return (index / total * 100).toFixed(1) + "%";
            }

            let result = calculatePercentage(index, total);
            return result;
          param: percentage
          timeout: 15000
          silent: true
          label: PERCENTAGE INDEX TOTAL
          onFailure: FETCHED
        - steps:
            - type: gpt
              prompt: >-
                # HARPA AI Technical Documentation Extractor


                You are a specialized technical documentation analyst.


                OUTPUT LANGUAGE: {{language}}


                MAIN QUESTION:

                {{question}}


                TASK: Extract precise technical information from the
                documentation to answer the MAIN QUESTION in {{language}}.


                EXTRACTION PRIORITIES:

                - Extract detailed syntax patterns and structure requirements
                for automation workflows

                - Document all technical components including their required
                parameters and formatting rules

                - Identify mandatory fields, naming conventions, and structure
                requirements

                - Capture exact syntax examples that show proper formatting and
                indentation

                - Extract information about available action types and their
                configuration options

                - Document parameter reference patterns, especially those using
                double curly braces syntax

                - Identify structural hierarchies and parent-child relationships
                in configuration files

                - Note version compatibility information and any technical
                limitations

                - Capture step sequence logic and execution flow patterns

                - Extract exact formatting requirements including indentation,
                quotation usage, and special character handling


                FORMAT: Respond ONLY with this JSON structure:

                {
                  "info": "Detailed technical information extracted from the documentation. Include exact syntax patterns, formatting requirements, component definitions, parameter structures, and configuration examples that would enable accurate implementation. Focus on technical precision and completeness."
                }


                CONSTRAINTS:

                - If you haven't found specific technical implementation
                details, state "No relevant technical specifications found" in
                {{language}}

                - Do not echo my prompt in your response

                - Respond with a JSON object containing a single field: "info"

                - Write nothing other than the JSON

                - Do not add information not present in the WEB PAGE CONTENT

                - Prioritize technical specifications over general descriptions


                Analyze the following WEB PAGE CONTENT to extract all technical
                information relevant to MAIN QUESTION:


                WEB PAGE CONTENT:

                {{content}}
              isolated: true
              param: data
              silent: true
              label: HARPA AI TECHNICAL DOCUMENTATION EXTRACTOR
            - type: calc
              func: extract-json
              to: data
              param: data
              index: first
            - type: calc
              func: set
              param: data.url
              format: auto
              value: '{{item.url}}'
            - type: calc
              func: set
              param: data.title
              format: auto
              value: '{{item.title}}'
            - type: calc
              func: list-add
              index: last
              list: array
              item: data
            - type: jump
              to: SAY STATUS
          condition: '{{content}} =~ ^[\s\S]{500,}$'
          type: group
          label: FETCHED
        - steps:
            - type: js
              args: item.url
              code: |-
                // Get URL from args parameter
                const url = args['item.url'];

                if (!url) {
                  return false;
                }

                const fullUrl = url.startsWith('http') ? url : 'https://' + url;

                window.location.href = fullUrl;
                return true;
              param: navigate.boolean
              timeout: 15000
              onFailure: ABORT NAVIGATE
              label: NAVIGATE
              silent: true
            - type: wait
              for: custom-delay
              silent: true
              label: ABORT NAVIGATE
              delay: '1500'
            - steps:
                - label: SET CONTENT
                  type: calc
                  func: set
                  param: content
                  format: ''
                  value: '{{page}}'
                - type: js
                  args: content
                  code: |-
                    // For content
                    const text = args['content'];
                    const tokenCount = Math.ceil(text.length / 4);

                    return {
                     chars: text.length,
                     estimatedTokens: tokenCount,
                     estimatedWords: Math.ceil(tokenCount * 0.75)
                    };
                  param: count
                  timeout: 15000
                  onFailure: HARPA AI TECHNICAL DOCUMENTATION EXTRACTOR
                  silent: true
                  label: COUNT
                - type: gpt
                  prompt: >-
                    # HARPA AI Technical Documentation Extractor


                    You are a specialized technical documentation analyst.


                    OUTPUT LANGUAGE: {{language}}


                    MAIN QUESTION:

                    {{question}}


                    TASK: Extract precise technical information from the
                    documentation to answer the MAIN QUESTION in {{language}}.


                    EXTRACTION PRIORITIES:

                    - Extract detailed syntax patterns and structure
                    requirements for automation workflows

                    - Document all technical components including their required
                    parameters and formatting rules

                    - Identify mandatory fields, naming conventions, and
                    structure requirements

                    - Capture exact syntax examples that show proper formatting
                    and indentation

                    - Extract information about available action types and their
                    configuration options

                    - Document parameter reference patterns, especially those
                    using double curly braces syntax

                    - Identify structural hierarchies and parent-child
                    relationships in configuration files

                    - Note version compatibility information and any technical
                    limitations

                    - Capture step sequence logic and execution flow patterns

                    - Extract exact formatting requirements including
                    indentation, quotation usage, and special character handling


                    FORMAT: Respond ONLY with this JSON structure:

                    {
                      "info": "Detailed technical information extracted from the documentation. Include exact syntax patterns, formatting requirements, component definitions, parameter structures, and configuration examples that would enable accurate implementation. Focus on technical precision and completeness."
                    }


                    CONSTRAINTS:

                    - If you haven't found specific technical implementation
                    details, state "No relevant technical specifications found"
                    in {{language}}

                    - Do not echo my prompt in your response

                    - Respond with a JSON object containing a single field:
                    "info"

                    - Write nothing other than the JSON

                    - Do not add information not present in the WEB PAGE CONTENT

                    - Prioritize technical specifications over general
                    descriptions


                    Analyze the following WEB PAGE CONTENT to extract all
                    technical information relevant to MAIN QUESTION:


                    WEB PAGE CONTENT:

                    {{content}}
                  isolated: true
                  param: data
                  silent: true
                  label: HARPA AI TECHNICAL DOCUMENTATION EXTRACTOR
              type: group
              label: HARPA DOCS NAVIGATE CONTENT
            - type: calc
              func: extract-json
              to: data
              param: data
              index: first
            - type: calc
              func: set
              param: data.url
              format: auto
              value: '{{item.url}}'
            - type: calc
              func: set
              param: data.title
              format: auto
              value: '{{item.title}}'
            - type: calc
              func: list-add
              index: last
              list: array
              item: data
          type: group
          label: NOT FETCHED
        - type: say
          message: |-
            🔍 Analyzed **{{index}} / {{total}}**,  [{{hostname}}]({{pageUrl}})
            - Chars: {{count.chars}}
            - Estimated Tokens: {{count.estimatedTokens}}
            - Estimated Words: {{count.estimatedWords}}
          label: ⛔️SAY STATUS
          condition: '{{index}} = {{total1}}'
        - type: say
          message: |-
            🔍 Analyzed **{{percentage}}**,  [{{hostname}}]({{pageUrl}})
            - Chars: {{count.chars}}
            - Estimated Tokens: {{count.estimatedTokens}}
            - Estimated Words: {{count.estimatedWords}}
          label: SAY STATUS
          condition: '{{index}} != {{total}}'
        - type: js
          args: array
          code: |-
            const content = args['array'];
            const stringContent = JSON.stringify(content);

            return {
              chars: stringContent.length,
              estimatedTokens: Math.ceil(stringContent.length / 4),
              estimatedWords: Math.ceil(stringContent.length / 4 * 0.75)
            };
          param: arrayLength
          timeout: 15000
          onFailure: SAY STATUS
          label: ARRAY LENGTH
          silent: true
        - message: |-
            ✅ **{{percentage}}** pages scanned for "**{{question}}**". 

            Last checked page: [{{hostname}}]({{pageUrl}})
            - Chars: {{count.chars}}
            - Estimated Tokens: {{count.estimatedTokens}}
            - Estimated Words: {{count.estimatedWords}}
            - Array Token length: **{{arrayLength.estimatedTokens}}**
          type: say
          label: SAY STATUS
          condition: '{{index}} = {{total}}'
      type: loop
      list: links
  label: DEPTH = 1
  type: group
- type: calc
  func: replace
  to: array
  param: array
  regex: \{\{
  template: '{{\'
  label: ESCAPE PARAMETER
- 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: test
      description: test
      category: User
      emoji: 🆕
    steps:
      - condition: '{{\p1}} = yes'
        label: TN20
        type: say
        message: Ask me anything.
      - condition: '{{\p1}} = yes'
        label: 1KOB
        type: ask
        param: p1
        message: 'Please provide p1:'
        options:
          - label: ✅ YES
            value: 'yes'
          - label: ⛔ NO
            value: 'no'
          - $custom
        default: test
        vision:
          enabled: true
          mode: area
          hint: test
          send: true
        optionsInvalid: false
      - condition: '{{\p1}} = yes'
        label: JZKG
        type: gpt
        prompt: test
        silent: true
        dumb: true
        param: test
        chunkify:
          text: '{{\page}}'
          empty: test
          maxTokens: 1000
        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
      - condition: '{{\p1}} = yes'
        label: 9CR7
        type: calc
        func: set
        param: test
        format: ''
        value: '{{\gpt}}'
      - condition: '{{\p1}} = yes'
        label: VZTY
        type: request
        url: https://webhook.site/
        method: auto
        headers:
          Authorization: Bearer token
        body: |-
          {
            "url": "{{\url}}",
            "data": "{{\gpt}}"
          }
        auth:
          enabled: false
          username: ''
          password: ''
        param: test
        headersInvalid: false
        silent: true
      - condition: '{{\p1}} = yes'
        label: 91CN
        type: navigate
        url: '{ "Authorization": "Bearer token" }'
        waitForIdle: true
        silent: true
        onFailure: 9CR7
      - condition: '{{\p1}} = yes'
        label: 79AM
        type: click
        selectorType: ai
        selector:
          - $matches:
              - $tag: SPAN
              - $class: MissionJournal-headline
              - $style: Roboto:18px:700:normal
              - $content: Tägliche Missionen
              - $id: daily-missions-plate
                traverse: '0'
              - $class: MissionJournal
                traverse: '0'
              - $class: MissionJournal--compact
                traverse: '0'
              - $class: MissionJournal-info
                traverse: '-1'
              - $class: Sidebar
                traverse: '1:0'
              - $anchor: Danke
                shift: '-32:132'
              - $text: Danke
                traverse: '-6:1:0'
              - $anchor: Dein monatlicher Report
                shift: '-133:90'
              - $text: Dein monatlicher Report
                traverse: '-4:1:0'
              - $anchor: Komplim.
                shift: '-124:132'
              - $text: Komplim.
                traverse: '-6:1:0'
            min: 5
          - $size: 1
        item:
          type: element
          container:
            __$ht: element
            id: 1
          value: Tägliche Missionen
        silent: true
      - condition: '{{\p1}} = yes'
        label: QLJ6
        type: paste
        text: test
        mode: null
        selectorType: ai
        lastKey: Enter
        selector:
          - $matches:
              - $tag: INPUT
              - $role: searchbox
              - $id: search-input
              - $class: Search-input
              - $attribute: type=search
              - $attribute: name=query
              - $attribute: aria-label=Suche nach Fragen, Diskussionen, Themen und Nutzern…
              - $attribute: autocomplete=off
              - $attribute: data-e2e-ref=search-input
              - $attribute: maxlength=200
              - $attribute: value
              - $attribute: data-last-active-input
              - $style: Roboto:16px:400:normal
              - $placeholder: Suche nach Fragen, Diskussionen, Themen und Nutzern…
              - $class: Search-inputGroup
                traverse: '0'
              - $role: form
                traverse: '0:0'
              - $class: Search-form
                traverse: '0:0'
              - $class: Search-container
                traverse: '0:0:0'
              - $class: Search-banner
                traverse: '0:0:0:0'
              - $anchor: Top-Themenwelten
                shift: 0:-70
              - $text: Top-Themenwelten
                traverse: '-4:0:0:0'
              - $anchor: Postfach
                shift: 86:-10
              - $text: Postfach
                traverse: '-3:2:0:0:0:0:0:0'
              - $anchor: Computer
                shift: '-15:-113'
              - $text: Computer
                traverse: '-9:0:0:0'
            min: 5
          - $size: 1
        item:
          type: element
          container:
            __$ht: element
            id: 2
          value: Suche nach Fragen, Diskussionen, Themen und Nutzern…
        silent: true
      - condition: '{{\p1}} = yes'
        label: 2NNE
        type: command
        name: Say Command + Global Storage Management
        inputs: []
        silent: true
      - condition: '{{\p1}} = yes'
        label: PYPL
        type: extract
        selectorType: ai
        selector:
          - $matches:
              - $tag: DIV
              - $class: u-mls
              - $class: u-hidden-tablet
              - $class: u-textNoWrap
              - $style: Roboto:14px:400:normal
              - $content: Startseite
              - $id: masthead-toggle-home
                traverse: '1'
              - $class: Masthead-menu
                traverse: '0:1'
              - $class: Masthead-banner
                traverse: '1:0:1'
              - $id: header-wrapper-app
                traverse: '0:0:1:0:1'
              - $role: banner
                traverse: '0:0:1:0:1'
              - $anchor: Entdecken
                shift: '-112:0'
              - $text: Entdecken
                traverse: '-2:0:1'
              - $anchor: Empfehlungen
                shift: '-61:-147'
              - $text: Empfehlungen
                traverse: '-13:0:0:0:1:0:1'
              - $anchor: Deine Startseite
                shift: 186:-86
              - $text: Deine Startseite
                traverse: '-9:0:0:0:1:0:1'
            min: 6
          - $size: 1
          - $parse: text
            at: 0
        item:
          type: text
          value: Startseite
          container:
            __$ht: element
            id: 6
          at: 0
        param: test
        default: test
        silent: true
      - condition: '{{\p1}} = yes'
        label: FIHZ
        type: export
        what: all-messages
        param: gpt
        filename: test.txt
        silent: true
      - condition: '{{\p1}} = yes'
        label: 6GWX
        type: connection
        connection: 🌐 CHAT AUTO
        switchDuration: command
        silent: true
      - condition: '{{\p1}} = yes'
        label: OSVI
        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: test
        timeout: 15000
        onFailure: 6GWX
        silent: true
      - condition: '{{\p1}} = yes'
        label: 7W96
        type: control
        action: frame-wide
      - condition: '{{\p1}} = yes'
        label: X7YI
        type: prefill
        message: |-
          Please parse information from the web page:

          {{\\\page}}

          My question: 
        interpolate: false
      - condition: '{{\p1}} = yes'
        type: jump
        to: 6GWX
      - condition: '{{\p1}} = yes'
        label: DN9X
        type: group
        steps:
          - type: say
            message: ▶️ GROUP
      - condition: '{{\p1}} = yes'
        label: A3Q5
        type: loop
        list: list
        steps:
          - type: say
            message: |-
              🔄 LOOP:
              - item: {{\item}}
              - index: {{\index}}
      - condition: '{{\p1}} = yes'
        label: XMIE
        type: wait
        for: idle
        timeout: 15000
        silent: true
      - condition: '{{\p1}} = yes'
        label: RFJV
        type: stop
      - condition: '{{\p1}} = yes'
        label: W556
        type: clear
        silent: true
    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

    - `condition`: Execute steps conditionally

    - `command`: Execute other commands

    - `connection`: Switch AI providers

    - `export`: Export data


    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:

    - Only include steps necessary for the requested functionality

    - Ensure all references to parameters are properly formatted

    - Make sure the command is complete and executable

    - Do not include placeholder text that requires manual editing

    - 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}}


    Use the following information to extract ONLY useful information, but do not
    adopt the format:

    HARPA DOCUMENTATION:

    {{array}}


    Based on the MAIN QUESTION and HARPA DOCUMENTATION, please create a
    complete, functional HARPA AI command in YAML format.
  type: gpt
  isolated: false
  param: finalAnswer
  dumb: false
  label: FINAL ANSWER
  silent: true
- type: say
  message: '{{finalAnswer}}'
  label: DISPLAY THE FINAL ANSWER
Notice: Please read before using

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.

Contact us
HomeUse CasesGuidesPrivacy PolicyTerms of Service
CAN WE STORE COOKIES?
Our website uses cookies for the purposes of accessibility and security. They also allow us to gather statistics in order to improve the website for you. More info: Privacy Policy