Create and configure the integration
Last updated
Last updated
To start, we will create the scaffolding for the integration by setting up its metadata (name, description, and settings) and its Adapter Configs. We'll finish this step by validating that the adapters we created can successfully contact the systems we connected them to.
Adapters are modules in Glyue that handle authentication, sending, and receiving of information with external systems. Each adapter needs some initial configuration before it can be used, which is stored in an Adapter Config.
Create the Integration and Adapter Configs
Log into Glyue and navigate to the Build page (click the 🔧 [wrench] icon on the left-hand navbar).
Make sure that Integration is selected under Component in the top-left corner.
Click the [➕ADD ROW] button on the bottom.
In the wizard that appears, enter the following:
Path Name: hackernews_email_digest
.
Enable API Access: Check the box to enable HTTP calls.
Description:
Expand the Email Settings section and uncheck Email Digests
Expand the Run Settings section and ensure Store Run History and Store Run History Payloads are enabled
Click the Save button to move to the next page of the wizard.
On the Systems step of the wizard, we will create two Adapter Configs, one for accessing the Hacker News API and another for Gmail SMTP
Click on Add System to create the Hacker News API adapter
In the Available Adapters dropdown, select HTTP
In the Select Adapter Config dropdown, select Add New Adapter and fill out the following information, then click Save:
Name: hackernews
Active: ☑️ (checked)
Validation enabled: ☑️ (checked)
Host: hacker-news.firebaseio.com
Port: 443
Basic auth username: (leave blank)
Basic auth password: (leave blank)
Server auth cert: (leave empty)
Client auth cert: (leave empty)
Timeout seconds: 60
Click on Add System again, this time to create the Gmail SMTP adapter
In the Available Adapters dropdown, select Email SMTP
In the Select Adapter Config dropdown, select Add New Adapter and fill out the following information, then click Save:
Name: gmail
Active: ☑️ (checked)
Validation enabled: ☑️ (checked)
Host: smtp.gmail.com
Port: 587
Tls encrypt: ☑️ (checked)
Authenticate: ☑️ (checked)
Auth username: (the Google email address)
Auth password: (the created Google App Password)
Click Save Adapter Bindings on the top right to save the adapters we created, then click Continue
On the final page of the wizard, give your user all permissions (Read, Write, Execute, and Debug) for the integration you just created. Click Save Permissions, then close the wizard by clicking Go to build.
Verify the Adapter Configs
Return to the Dashboard on the on main Glyue interface.
Click the [VALIDATE] button in the Adapter Config Validation Results section and wait for results. If successful, the results should look like this:
If unsuccessful, there will be more information about what caused the failure, including a Python stack trace.
Navigate to the Swagger API page by selecting API from the left-hand navbar.
Select /hackernews_email_digest
and click Try it out to expand the Swagger console for this endpoint.
Delete the request body and input: {}
(an empty JSON object)
Scroll to the bottom and click Execute.
Navigate to Run History by clicking the circular-arrow-clock icon from the left-hand navbar.
Under the RUNS column (the left-most column) there should be a hackernews_email_digest
record, along with a timestamp, username, and id. Click it.
Under the next column, RUNS, an INPUT
and OUTPUT
should appear. Clicking them should display the http request (input) that triggered the integration, as well as its output respectively:
Congratulations, the integration works!
It doesn’t do much yet though, so let’s continue building.