Cross-Provider Workflow

Hyperbolic Draft Email to SendGrid Send

Version 1.0.0

Draft an email body with Hyperbolic, then send it through SendGrid.

1 workflow 2 source APIs 2 providers
View Spec View on GitHub ArazzoWorkflowsCross-Provider

Providers Orchestrated

hyperbolic-ai sendgrid

Workflows

draft-and-send
Draft an email with Hyperbolic and send it via SendGrid.
Asks Hyperbolic to draft an email body from a brief, captures the drafted text, and sends it to the recipient through SendGrid.
2 steps inputs: brief, model, recipientEmail, subject outputs: bodyText, mailStatus
1
draft-email
$sourceDescriptions.hyperbolicApi.createChatCompletion
Ask Hyperbolic to draft the email body from the brief.
2
send-email
$sourceDescriptions.sendgridApi.SendMail
Send the drafted email through SendGrid Mail Send.

Source API Descriptions

Arazzo Workflow Specification

ai-hyperbolic-draft-to-sendgrid-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Hyperbolic Draft Email to SendGrid Send
  summary: Draft an email body with Hyperbolic, then send it through SendGrid.
  description: >-
    A cross-provider AI enrichment chain that has Hyperbolic AI draft an email
    body from a short brief and then dispatches the drafted message to a
    recipient through SendGrid's Mail Send API. Demonstrates AI-authored outbound
    communication across two providers in one Arazzo workflow.
  version: 1.0.0
sourceDescriptions:
  - name: hyperbolicApi
    url: https://raw.githubusercontent.com/api-evangelist/hyperbolic-ai/refs/heads/main/openapi/hyperbolic-chat-completions-api-openapi.yml
    type: openapi
  - name: sendgridApi
    url: https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/openapi/tsg_mail_v3.yaml
    type: openapi
workflows:
  - workflowId: draft-and-send
    summary: Draft an email with Hyperbolic and send it via SendGrid.
    description: >-
      Asks Hyperbolic to draft an email body from a brief, captures the drafted
      text, and sends it to the recipient through SendGrid.
    inputs:
      type: object
      properties:
        brief:
          type: string
        model:
          type: string
        recipientEmail:
          type: string
        subject:
          type: string
    steps:
      - stepId: draft-email
        description: Ask Hyperbolic to draft the email body from the brief.
        operationId: $sourceDescriptions.hyperbolicApi.createChatCompletion
        requestBody:
          contentType: application/json
          payload:
            model: $inputs.model
            messages:
              - role: user
                content: "Write a short, friendly email body for this brief: $inputs.brief"
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          bodyText: $response.body#/choices/0/message/content
      - stepId: send-email
        description: Send the drafted email through SendGrid Mail Send.
        operationId: $sourceDescriptions.sendgridApi.SendMail
        requestBody:
          contentType: application/json
          payload:
            personalizations:
              - to:
                  - email: $inputs.recipientEmail
                subject: $inputs.subject
            from:
              email: [email protected]
            content:
              - type: text/plain
                value: $steps.draft-email.outputs.bodyText
        successCriteria:
          - condition: $statusCode == 202
        outputs:
          mailStatus: $statusCode
    outputs:
      bodyText: $steps.draft-email.outputs.bodyText
      mailStatus: $steps.send-email.outputs.mailStatus