Robo Connector Integration Guide

Quick Links

Introducing the Robo Connector JS Library

Our JavaScript library enables seamless integration with the Robo Connector API by leveraging declarative HTML tags and meta tags. This allows you to embed dynamic flows, documents, and functions directly into your webpages without writing complex JS code.

The library automatically initializes based on meta or custom tags and handles API authentication, data fetching, and rendering.

Initialization via Meta Tag

Include this meta tag in your HTML <head> to configure the Robo Connector client and project context:

<meta name="robo-connector" data-init="" data-client="Robo Connector" data-project="project1" />

This initializes the JS library with the specified client and project.

Initialization via Custom Element

You can alternatively use the custom element approach in your HTML body:

<robo-connector robo-connector-init=""></robo-connector>

This will automatically start the Robo Connector integration for the page.

Embedding Flows, Documents, and Functions

The library supports embedding dynamic components using these HTML tags:

Advanced Function Tags

You can specify additional attributes on <function> tags for more control:


<function id="lesson-1" data-function="video" data-option='{"id":"klnXkWrVhJg"}' data-provider="Google"></function>

<function data-function="crossword" data-option='{
  "letters": [
    ["C", "0", "T"],
    ["D", "0", "G"],
    ["L", "0", "0", "N"]
  ],
  "answer": ["A", "O", "I", "O"]
}'></function>
  

How It Works

Once initialized, the JS library scans the DOM for these special tags, processes their attributes, and fetches data or triggers functions via the Robo Connector API. It then replaces the tags' content with live data or interactive UI components.

Getting Started

To start integrating:

  1. Include the Robo Connector JS library in your page (script tag - URL to be provided).
  2. Add a meta tag or <robo-connector> element to initialize the integration.
  3. Use the <flow>, <document>, and <function> tags in your HTML as needed.

Security and Best Practices