Cross-Provider Workflow

Shopify Product Launch to SendGrid Promo Email

Version 1.0.0

Create a Shopify product, add a product image, then email a launch announcement with SendGrid.

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

Providers Orchestrated

shopify sendgrid

Workflows

launch-product-and-announce
Create a Shopify product, add an image, and email a SendGrid launch announcement.
Creates a Shopify product, adds a hero image to it, then emails a launch announcement to a marketing recipient via SendGrid.
3 steps inputs: announceEmail, bodyHtml, imageSrc, title outputs: emailStatus, imageId, productId
1
create-product
$sourceDescriptions.shopifyApi.createProduct
Create the Shopify product.
2
add-product-image
$sourceDescriptions.shopifyApi.createProductImage
Add a hero image to the new product.
3
email-announcement
$sourceDescriptions.sendgridApi.SendMail
Email a product launch announcement via SendGrid.

Source API Descriptions

Arazzo Workflow Specification

shop-product-image-promo-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Shopify Product Launch to SendGrid Promo Email
  summary: Create a Shopify product, add a product image, then email a launch announcement with SendGrid.
  description: >-
    A product-launch workflow that creates a product in Shopify, attaches a hero
    image to it, and emails a launch announcement to a marketing list through
    SendGrid. Demonstrates chaining two commerce platform catalog operations
    into a single promotional email via a communications provider.
  version: 1.0.0
sourceDescriptions:
  - name: shopifyApi
    url: https://raw.githubusercontent.com/api-evangelist/shopify/refs/heads/main/openapi/shopify-admin-rest-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: launch-product-and-announce
    summary: Create a Shopify product, add an image, and email a SendGrid launch announcement.
    description: >-
      Creates a Shopify product, adds a hero image to it, then emails a launch
      announcement to a marketing recipient via SendGrid.
    inputs:
      type: object
      properties:
        title:
          type: string
        bodyHtml:
          type: string
        imageSrc:
          type: string
        announceEmail:
          type: string
    steps:
      - stepId: create-product
        description: Create the Shopify product.
        operationId: $sourceDescriptions.shopifyApi.createProduct
        requestBody:
          contentType: application/json
          payload:
            product:
              title: $inputs.title
              body_html: $inputs.bodyHtml
        successCriteria:
          - condition: $statusCode == 201
        outputs:
          productId: $response.body#/product/id
          productTitle: $response.body#/product/title
      - stepId: add-product-image
        description: Add a hero image to the new product.
        operationId: $sourceDescriptions.shopifyApi.createProductImage
        parameters:
          - name: product_id
            in: path
            value: $steps.create-product.outputs.productId
        requestBody:
          contentType: application/json
          payload:
            image:
              src: $inputs.imageSrc
        successCriteria:
          - condition: $statusCode == 201
        outputs:
          imageId: $response.body#/image/id
      - stepId: email-announcement
        description: Email a product launch announcement via SendGrid.
        operationId: $sourceDescriptions.sendgridApi.SendMail
        requestBody:
          contentType: application/json
          payload:
            personalizations:
              - to:
                  - email: $inputs.announceEmail
                subject: New product just launched
            from:
              email: [email protected]
            content:
              - type: text/html
                value: We just launched a new product. Come take a look!
        successCriteria:
          - condition: $statusCode == 202
        outputs:
          emailStatus: $statusCode
    outputs:
      productId: $steps.create-product.outputs.productId
      imageId: $steps.add-product-image.outputs.imageId
      emailStatus: $steps.email-announcement.outputs.emailStatus