Glyue User Docs
  • What is Glyue?
  • Tutorials
    • Start Here
    • Building a Single-Step Integration
      • 1. Creating the Integration
      • 2. Calling the External System
      • 3. Running the Integration
      • 4. Crafting the Output
    • Building a Multi-System Integration
      • 1. Connecting to the Core
      • 2. Field Mapping
      • 3. Running the Integration
    • Building an Event-Driven Integration
      • 1. Setting up the Mock CRM
      • 2. Receiving Inbound Requests
      • 3. Triggering the Integration from the CRM
    • Building an Email Integration
      • 1. Create and Configure the Integration
      • 2. Input Validation
      • 3. Get Story IDs from Hacker News
      • 4. Get Story Content
      • 5. Sending the Email
      • 6. Wrapping Up
      • 7. Extra credit
        • extra_credit.json
    • Building a RESTful CRUD Web Service
      • 1. Integration Setup
      • 2. Vault Setup
      • 3. Create Web Service Endpoints
      • 4. Execute Web Service Endpoints with Vault Methods
      • 5. Vault Code Examples and Explanation
    • Building a Retrieval API against FIS CodeConnect
      • 1. Integration Setup
      • 2. Service Request Setup
      • 3. Field Mapping Setup
      • 4. Integration and Service Request Hook Setup
      • 5. Testing the Integration
      • 6. Common Errors
    • What is Pre-Mapping?
      • Before you start
      • Bookmarks
      • Source and Targets
      • Field Mapping Status
      • Field Mapping Comments
      • Summary
  • How-To Guides
    • How to Run an Integration from Glyue
    • How to Invite New Users
    • How to Create a Value Mapping Set
    • How to Build and Deploy a Custom Frontend
    • How to Migrate an Integration
    • How to Set Up Single Sign On (SSO)
      • Glyue Setup
      • JumpCloud Setup
      • Azure Setup
      • Okta Setup
      • Glyue SAML Config Reference
    • How to Install the Glyue App for Zoom Contact Center
    • How to use the Vault
  • Reference
    • Integration Builder Page
    • Integration Anatomy
    • Integration Components
      • Integration
      • Service Request
      • Field Mapping
      • Value Mapping Set
      • Value Mapping
      • Validation Rule
      • Mask
      • Integration Config
      • Integration Engine Versions
    • Integration Lifecycle
    • Special Functions
      • add_run_label
      • callint
      • debug
      • end
      • get_namespace
      • humanize
      • import_helper
      • keep
      • list_files
      • map_value
      • open_glyuefile
      • open_vault
      • Data Manipulation Utilities
      • calladapter
    • Special Variables
      • __adapter_config__
      • input
      • parentint
      • retvalue
      • run_history_id
      • Iterables
        • fitem/fidx
        • sritem/sridx
        • vritem/vridx/vrmsg
    • Adapters
      • Generic HTTP Adapter
      • Email SMTP Adapter
    • Web Service Endpoints
    • Vault Reference
  • Glyue Platform Reference
    • Banking Core Connectivity Guide
    • Authentication
    • Permissions
      • Service Accounts
      • Organizations
    • Frontends
    • Idempotency Layer
    • Integration Scheduler
    • Governance Reports
    • Arbitrary Integration Request Content Support
    • Admin Components
    • Logging
  • ETL
    • Glyue ETL Overview
    • Data Connectors
    • Workflows
    • Run History
    • Scheduler
Powered by GitBook
On this page

Was this helpful?

  1. Tutorials
  2. Building an Email Integration

1. Create and Configure the Integration

PreviousBuilding an Email IntegrationNext2. Input Validation

Last updated 1 year ago

Was this helpful?

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

  1. Log into Glyue and navigate to the Build page (click the 🔧 [wrench] icon on the left-hand navbar).

    1. Make sure that Integration is selected under Component in the top-left corner.

    2. Click the [➕ADD ROW] button on the bottom.

    3. In the wizard that appears, enter the following:

      1. Path Name: hackernews_email_digest.

      2. Enable API Access: Check the box to enable HTTP calls.

      3. Description:

        Queries the Hacker News API and sends an email with links to the latest top posts.
        Input:
        {
          "email": "email_address@domain.tld",
          "limitQuery": 100,
          "limitEmail": 10
        }
        email:      REQUIRED | str | the email address to send the digest to
        limitQuery: OPTIONAL | int | limit to the number of articles to query
        limitEmail: OPTIONAL | int | max number of articles to send in the email
      4. Expand the Email Settings section and uncheck Email Digests

      5. Expand the Run Settings section and ensure Store Run History and Store Run History Payloads are enabled

    4. Click the Save button to move to the next page of the wizard.

  2. 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

    1. Click on Add System to create the Hacker News API adapter

    2. In the Available Adapters dropdown, select HTTP

    3. In the Select Adapter Config dropdown, select Add New Adapter and fill out the following information, then click Save:

      1. Name: hackernews

      2. Active: ☑️ (checked)

      3. Validation enabled: ☑️ (checked)

      4. Host: hacker-news.firebaseio.com

      5. Port: 443

      6. Basic auth username: (leave blank)

      7. Basic auth password: (leave blank)

      8. Server auth cert: (leave empty)

      9. Client auth cert: (leave empty)

      10. Timeout seconds: 60

    4. Click on Add System again, this time to create the Gmail SMTP adapter

    5. In the Available Adapters dropdown, select Email SMTP

    6. In the Select Adapter Config dropdown, select Add New Adapter and fill out the following information, then click Save:

      1. Name: gmail

      2. Active: ☑️ (checked)

      3. Validation enabled: ☑️ (checked)

      4. Host: smtp.gmail.com

      5. Port: 587

      6. Tls encrypt: ☑️ (checked)

      7. Authenticate: ☑️ (checked)

      8. Auth username: (the Google email address)

      9. Auth password: (the created Google App Password)

    7. Click Save Adapter Bindings on the top right to save the adapters we created, then click Continue

    8. 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

  1. Return to the Dashboard on the on main Glyue interface.

  2. Click the [VALIDATE] button in the Adapter Config Validation Results section and wait for results. If successful, the results should look like this:

    Validation passed for these systems:
        hackernews
        gmail

    If unsuccessful, there will be more information about what caused the failure, including a Python stack trace.

  3. Navigate to the Swagger API page by selecting API from the left-hand navbar.

    1. Select /hackernews_email_digest and click Try it out to expand the Swagger console for this endpoint.

    2. Delete the request body and input: {} (an empty JSON object)

    3. Scroll to the bottom and click Execute.

    4. Navigate to Run History by clicking the circular-arrow-clock icon from the left-hand navbar.

    5. 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.

    6. 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:

      {
        "payload": "Integration hackernews_email_digest completed successfully!",
        "headers": {},
        "status": 200
      }

Congratulations, the integration works!

It doesn’t do much yet though, so let’s continue building.