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

3. Get Story IDs from Hacker News

Previous2. Input ValidationNext4. Get Story Content

Last updated 1 year ago

Was this helpful?

Now we are ready to create our first external API call. Integrations can have any number of calls. In Glyue these calls are referred to as Service Requests (SRs). Each SR represents one API call, and will take a set of Field Mappings (more on this later) as input data for sending to the other system. When it executes, it will send the data and save the response.

In order to know how to compose a Service Request and its Field Mappings for any system, the user will need both the respective Glyue adapter documentation, as well as any documentation of the external system. The adapter reference article will lay out the Adapter Config, Service Request, and Field Mapping requirements, while the other system’s documentation should inform the user as to what endpoints are available, what each endpoint expects and returns, error troubleshooting advice, etc.

Service Request: get_story_ids

In our first SR, we want to query Hacker News for the latest stories.

  1. From the Build page, with the Component set to Integration, right click the integration and click Go To > Service Request.

  2. Click the [➕ADD ROW] button, and provide these values:

    • System: HTTP (this is how we indicate that the SR should use the HTTP adapter)

    • Service Name: n/a

    • Formula Variable: get_story_ids

  3. Leave the rest of the row unchanged and save.

Add Field Mappings for SR: get_story_ids

Now we’re ready to tell the Service Request what data to send using Field Mappings (FMs). An SR can have any number of FMs. Each FM represents a field in the data that will be sent to the other system, as well as its value (or the logic by which the value is gotten).

Now we’re going to add a couple of simple FMs to our SR.

  1. From the Build page with Component set to Service Request, right click the SR we just created and select Go To > Field Mapping.

  2. Click [➕ADD ROW] 2 times to add 2 new rows.

  3. In the top row add the following:

    • Field: url_path

    • Value: "/v0/newstories.json" (include the quotes)

    • Value Type: str

  4. For the next row, enter:

    • Field: method

    • Value: "GET" (include the quotes)

    • Value Type: str

  5. Save.

Test get_story_ids

We are now ready to send our first request to an external real API! Let’s test the integration:

  1. Go to the Run History page, and re-run our integration with valid inputs.

  2. Wait for this run to appear in the RUNS column, then click it.

  3. In the middle STEPS column, there should now be 3 records: INPUT, REQUEST, and OUTPUT. Select the REQUEST.

  4. The collapsible ⟶ Request and ⟵ Response sections should appear on the right, along with their payloads. The request should look like this:

    {
        "service_name": "n/a",
        "payload": {
            "url_path": "/v0/newstories.json",
            "method": "GET"
        },
        "sub_requests": {}
    }

    While the response will look something like this:

    {
        "success": true,
        "payload": [
            36688166,
            36688146,
            36688107,
            36688074,
            ...
        ],
        "messages": []
    }

Congratulations! The integration has successfully communicated with an external system!

Adapters