HARPA.AI
LIBRARYAPIGUIDESAI COMMANDSBLOG

🤖  Automate information parsing

Full guide: https://harpa.ai/guides/connecting-harpa-to-make-com#bulk-data-extraction Remember to download or create other commands within this automation by adding links to them using COMMAND steps.

Created by USERNAME
Updated on Oct 10, 2024 09:12
RUNS JS CODE

How to Use

IMPORT COMMAND

Content

- type: ask
  param: urls
  message: >-
    Please paste in a list of product links, comma or space separated, for
    example:


    ```

    https://chatgpt.com, https://harpa.ai

    ```
  options: null
  default: ''
  vision:
    enabled: false
    mode: area
    hint: ''
    send: true
- type: js
  args: urls
  code: |-
    let links = [];
    const linkRegex = /(https?:\/\/\S+?)(?=[,;\n\s\]]|$)/gi;

    try {
      // any data to string
      const urlString = String(urls);
      // split string
      const urlParts = urlString.split(/[,;\n\s]+/);
      urlParts.forEach(part => {
        const matchedLinks = part.match(linkRegex) || [];
        links = links.concat(matchedLinks);
      });

      // delete "
      links = links.map(link => link.replace(/^"|"$/g, ''));

      // delete duplicates
      links = [...new Set(links.filter(Boolean))];

    } catch (error) {
        return false;
    }

    return links;
  param: links
  timeout: 15000
- type: loop
  list: links
  steps:
    - type: navigate
      url: '{{item}}'
      waitForIdle: false
      silent: false
    - type: wait
      for: 1s
      silent: true
    - type: control
      action: show
    - type: command
      name: Data Export to Google Sheets
      inputs: []
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