- type: js
args: selector
code: |-
// Mehrere Methoden kombinieren für maximale Kompatibilität
window.scrollTo(0, 0); // Standard
window.scroll(0, 0); // Alternative
document.documentElement.scrollTop = 0; // HTML Element
document.body.scrollTop = 0; // Body Element
return true;
param: ''
timeout: 15000
onFailure: SET URL
label: SCROLL UP TO THE TOP
silent: true
condition: '{{url}} =~ ^(?!https?:\/\/.*?(?:\.pdf(?=[?#]|$)|\/pdf\/?)).+$'
- type: calc
func: match
param: url
label: SET URL
to: setURL
regex: /https?:\/\/[^\s]+\.pdf(\/[^\s]*)?|[^\s]+\/pdf\/[^\s]*/
- type: group
steps:
- type: gpt
prompt: >-
Analyze the provided screenshot of a PDF document and determine the
total number of pages. **Provide *ONLY* the numeral** representing the
page count as your output. Ensure the number is **strictly unformatted**
(no backticks, symbols, punctuation, or additional text of any kind).
Your response must be **exclusively the numeral** (e.g., `5`, `12`,
`23`) and *nothing else*:
{{view}}
silent: true
label: EXTRACT PAGE COUNT | PDF URL
param: pageCount
- type: js
args: pageCount
code: |-
// Create array for the loop
return Array.from({length: pageCount}, (_, i) => i + 1);
param: scrollArray
timeout: 15000
onFailure: DEBUGGING
silent: true
label: CREATE ARRAY LENGTH | PDF URL
- type: loop
steps:
- args: array, view
code: |-
let arrayValue = args['array'] || '';
const viewValue = args.view;
if (arrayValue === '') {
arrayValue = viewValue;
} else {
arrayValue += ',' + viewValue;
}
return arrayValue;
param: array
onFailure: SCROLL DOWN
label: SCREENSHOT PART FOR PART
type: js
timeout: 15000
silent: true
- type: calc
func: set
param: screenshotParts
format: ''
value: '{{array}}'
label: ADD TO ARRAY LIST
- type: calc
func: set
param: newIndex
label: SET INDEX
format: ''
value: '{{index}}'
- type: calc
func: increment
param: index
delta: '1'
label: ADD +1 TO INDEX
- type: calc
func: increment
param: newIndex
delta: '2'
label: ADD +1 TO NEW INDEX
- type: say
message: '{{screenshotParts}}'
label: FINAL RESULT SCREENSHOTS
condition: '{{index}} = {{scrollArray.length}}'
- type: navigate
url: '{{setURL}}'
waitForIdle: false
silent: true
onFailure: SAVE THE SCREENSHOTS TEMPORARY
label: NAVIGATE TO SETURL / FIRST PAGE
condition: '{{index}} = {{scrollArray.length}}'
- type: jump
to: SAVE THE SCREENSHOTS TEMPORARY
condition: '{{index}} = {{scrollArray.length}}'
- type: navigate
url: '{{setURL}}#page={{newIndex}}'
waitForIdle: true
silent: true
onFailure: ''
label: NEXT PAGE
label: SCREENSHOTS FROM TOP TO BOTTOM | PDF URL
list: scrollArray
condition:
- '{{setURL}} =~ https?:\/\/[^\s]+\.pdf(\/[^\s]*)?|[^\s]+\/pdf\/[^\s]*'
label: SCREENSHOTS FOR PDF URLS
- type: js
args: selector
code: |-
// Create array for the loop
return Array.from({length: 100}, (_, i) => i + 1);
param: scrollArray
timeout: 15000
onFailure: ''
silent: true
label: CREATE ARRAY LENGTH
condition: '{{url}} =~ ^(?!https?:\/\/.*?(?:\.pdf(?=[?#]|$)|\/pdf\/?)).+$'
- type: loop
steps:
- args: array, view
code: |-
let arrayValue = args['array'] || '';
const viewValue = args.view;
if (arrayValue === '') {
arrayValue = viewValue;
} else {
arrayValue += ',' + viewValue;
}
return arrayValue;
param: array
onFailure: SCROLL DOWN
label: SCREENSHOT PART FOR PART
type: js
timeout: 15000
silent: true
- type: calc
func: set
param: screenshotParts
format: ''
value: '{{array}}'
label: ADD TO ARRAY LIST
- code: >-
// Get current scroll position
const currentScroll = window.pageYOffset;
// Get current viewport height (sichtbarer Bereich)
const viewportHeight = window.innerHeight;
// Scroll genau um die Viewport-Höhe weiter
window.scrollTo({
top: currentScroll + viewportHeight,
behavior: 'smooth'
});
// Prüfe ob Ende erreicht
const isBottom = window.innerHeight + window.pageYOffset >=
document.documentElement.scrollHeight;
await new Promise(r => setTimeout(r, 500)); // Warte auf
Scroll-Animation
return !isBottom;
param: isBottom
type: js
args: selector
timeout: 15000
onFailure: ''
silent: true
label: SCROLL DOWN
- type: say
message: '{{screenshotParts}}'
label: FINAL RESULT SCREENSHOTS
condition: '{{isBottom}} = false'
- type: jump
to: SAVE THE SCREENSHOTS TEMPORARY
condition: '{{isBottom}} = false'
label: SCREENSHOTS FROM TOP TO BOTTOM
list: scrollArray
condition: '{{url}} =~ ^(?!https?:\/\/.*?(?:\.pdf(?=[?#]|$)|\/pdf\/?)).+$'
- type: calc
func: set
param: screenshotParts
format: ''
value: '{{screenshotParts}}'
label: SAVE THE SCREENSHOTS TEMPORARY
- message: Pick a summary format, or type custom instructions.
param: format
options:
- label: ⚡️ QUICK SUMMARY
value: quick
- label: 🔍 FULL SUMMARY
value: full
- label: ♻️ REPURPOSE TEXT
value: repurpose
- label: 🗨️ QUOTING
value: quoting
- value: $custom
label: ASK FOR SUMMARY ACTION
type: ask
optionsInvalid: false
- condition: '{{format}} = quick'
label: QUICK NO CHUNKING
prompt: >-
Please ignore all previous instructions.
I want you to only answer in {{language}}.
Analyze the web page content from the provided screenshot(s) and prepare a
web page summary report which has a key takeaway and a summary in bullet
points.
Then, generate 3 short and concise queries related to the [SCREENSHOT
CONTENT].
- Related queries should be brief and to the point.
- Wrap each relevant query in a markdown code block
[REPORT FORMAT]:
### Key Takeaway
A single most important takeaway from the text in {{language}}
### Summary
Summarize the web page content from the screenshot(s) here in bullet-points.
There should be no limit in words or bullet points to the report, ensure
that all the ideas, facts, etc. are concisely reported out. The summary
should be comprehensive and cover all important aspects of the content
visible in the screenshot(s). Do not use any emoji. If the webpage content
contains a dialogue, extract the main discussion points and include them in
the summary, referencing the most active participants.
**Related queries:**
```markdown
Short related query
```
```markdown
Short related query
```
```markdown
Short related query
```
[SCREENSHOT CONTENT]:
{{screenshotParts}}
[REPORT FOLLOWED BY RELATED QUERIES]:
type: gpt
onCodeClick: send-text
isolated: true
param: gpt
- condition: '{{format}} = full'
label: FULL WITH CHUNKING
prompt: >-
Please ignore all previous instructions. I want you to only answer in
{{language}}. Summarize the next chunk of the web page visible in the
screenshot(s) into a list of key takeaways. Each key takeaway should be a
bullet list item. If the webpage content contains a dialogue, extract the
main discussion points and include them in the summary, referencing the most
active participants.
Follow the [RESPONSE FORMAT]:
- [takeaway 1]
- [takeaway 2]
...
[SCREENSHOT CONTENT CHUNK]:
{{screenshotParts}}
[KEY TAKEAWAYS LIST]:
type: gpt
onCodeClick: send-text
isolated: true
param: gpt
- label: FULL WITH CHUNKING > QUERIES
prompt: >-
Please ignore all previous instructions. I want you to only answer in
{{language}}.
Generate 3 short and concise queries related to the [WEBPAGE SUMMARY TEXT].
- Related queries should be brief and to the point.
- Wrap each relevant query in a markdown code block
- Do not add any extra notes or comments, I want only related queries and
nothing more.
**Related queries:**
```markdown
Short related query
```
```markdown
Short related query
```
```markdown
Short related query
```
[WEBPAGE SUMMARY TEXT]:
{{gpt}}
[3 RELATED QUERIES]:
param: related
condition: '{{format}} = full'
type: gpt
onCodeClick: send-text
isolated: true
- type: ask
param: quote
message: >-
Please ask a specific question so that I can quote something from the
images:
condition: '{{format}} = quoting'
label: ASK THE QUOTE QUESTION
- label: QUOTING ONLY
prompt: >-
Instructions for Text Analysis from Images:
Core Requirements:
1. Quote EXCLUSIVELY from the provided image content
2. Do not fabricate or invent any text content
3. Do not add any additional contextual information
4. Always cite the specific page number for each quote
5. Quote exactly as written in the source text, without modifications
6. Clearly indicate which point/section each quote corresponds to
7. If you quoting, quote everything that is boud to that quote; do not quote
half and to leave out the rest; Quote completely what belongs together
8. Respond only in the following language: {{language}}
Required Citation Format:
Page: `[PAGE_NUMBER]`
Quote:
```
[EXACT_QUOTE]
```
Section: `[SECTION_NUMBER/IDENTIFIER/TITLE/HEADER]`
[YOUR QUESTION]: {{quote}}
[SCREENSHOT CONTENT]: {{screenshotParts}}
param: related
condition: '{{format}} = quoting'
type: gpt
onCodeClick: send-text
isolated: true
- condition: '{{format}} = repurpose'
label: REPURPOSE
steps:
- func: clone
to: repurpose-input
type: calc
from: screenshotParts
- type: command
name: Repurpose text
inputs: []
- type: stop
type: group
- condition: '{{format-option}} = $custom'
label: CUSTOM
prompt: >-
Please ignore all previous instructions. I want you to only answer in
{{language}}. I would like you to summarize the web page content visible in
the provided screenshot(s).
[ADDITIONAL INSTRUCTIONS / FORMAT]:
{{format}}
[SCREENSHOT CONTENT]:
{{screenshotParts}}
[SUMMARY]:
type: gpt
param: gpt
isolated: true
- label: CHANGE-SUMMARY
param: change
options:
- value: 'no'
label: ✅ DONE
- label: ⬇️ SHORTEN
value: shorten
- label: 🤪 SIMPLIFY
value: simplify
- label: 🔍 CLARIFY
value: clarify
- label: ♻️ REPURPOSE TEXT
value: repurpose
- label: 🕵🏻♂️ FACT CHECK
value: factCheck
- label: 🔙 RETURN BACK
value: return
- value: $custom
type: ask
optionsInvalid: false
- type: jump
to: ASK FOR SUMMARY ACTION
condition: '{{change}} = return'
- condition:
- '{{change}} = clarify'
- '{{change}} = shorten'
- '{{change}} = simplify'
label: CHANGES
steps:
- label: CLARIFY
value: >-
Add clarity and conciseness. Text should be direct, clear, and not
ambiguous.
func: set
format: ''
condition: '{{change}} = clarify'
type: calc
param: change
- label: SIMPLIFY
value: >-
I want you to simplify your summary and rewrite it in more
understandable language, replacing complex words and phrases with
simple, clear ones.
condition: '{{change}} = simplify'
type: calc
func: set
param: change
format: ''
- label: SHORTEN
value: >-
Make summary shorter, keeping only the most essential information and
nothing more.
condition: '{{change}} = shorten'
type: calc
func: set
param: change
format: ''
- prompt: >
I would like you to make changes to the summary you wrote. Please do not
output anything but the revised reply. Do not echo my command. Do not
put quotes around the revised reply.
[CHANGES TO MAKE]:
{{change}}
[SUMMARY TO CHANGE]:
{{gpt}}
[REVISED SUMMARY]:
label: CHANGES
type: gpt
param: gpt
- type: jump
to: CHANGE-SUMMARY
type: group
- condition: '{{change}} = no'
label: DONE
type: stop
- condition: '{{change}} = repurpose'
steps:
- to: repurpose-input
type: calc
func: clone
from: gpt
- inputs: []
name: Repurpose text
type: command
- type: stop
label: REPURPOSE
type: group
- condition: '{{change-option}} = $custom'
label: QUESTION
steps:
- name: Ask
inputs:
- '{{change}}'
type: command
- type: stop
type: group
- condition: '{{change}} = factCheck'
steps:
- to: g.factCheck
type: calc
func: clone
from: gpt
- inputs:
- '{{g.factCheck}}'
name: Fact check
type: command
- type: stop
label: CHANGE-FACT CHECK
type: group
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 — 2025
Designed and engineered in Finland 🇫🇮