Connection Commands
Learn about writing connection commands for Books built with BDK.
You must first learn your Book before connecting it.
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}– Thenoun_phrasedefined in your @connect decorator.{preposition}– Any preposition that aligns with the plurality of the noun phrase. For example:Plural noun phrase:
via some API keysSingular 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:
connect {book name} via {preposition} {noun phrase} with
the {argument 1} is "{value 1}"
the {argument 2} is "{value 2}"
the {argument 3} is "{value 3}"Examples
1. Without Connection Arguments
connect grimoire via the magic method2. Using Connection Arguments
connect photon via some api keys with
the api key is "1234-5678-ABCD-EFGH"
the client id is "client-98765"
the secret key is "s3cr3tK3y!"
the username is "photon_user"
the password is "P@ssw0rd!"In this example, api keys is the noun phrase, and several connection arguments are provided.
Last updated
Was this helpful?
