Connection Commands

Learn about writing connection commands for Books built with BDK.

Overview

A connection command is written in Kognitos to instantiate a connection to a third-party tool or service from a BDK Book. Whenever a Book implements a connection using the @connect decorator, a connection command is required in your automation process.

Connection commands are also required when calling a procedure from a BDK Book that requires a connection. Procedures requiring a connection will have connection_required=True in the @procedure decorator.

Syntax

Use the following syntax to write a connection command in a Kognitos automation:

connect {book name} via {preposition} {noun phrase}

Components

  • {book name} - The name of your Book, as defined in your @book decorator.

  • {noun phrase} – The noun_phrase defined in your @connect decorator.

  • {preposition} – Any preposition that aligns with the plurality of the noun phrase. For example:

    • Plural noun phrase: via some API keys

    • Singular noun phrase: via a client credentials method

Passing Arguments

To pass arguments to your connection, add the with keyword at the end of the syntax. List each argument on a separately indented line, using the following format:

Examples

1. Without Connection Arguments

2. Using Connection Arguments

In this example, api keys is the noun phrase, and several connection arguments are provided.

Last updated

Was this helpful?