Cross-Provider Workflow

Stripe Customer to SendGrid Contact

Version 1.0.0

Create a Stripe customer, then upsert them as a SendGrid marketing contact.

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

Providers Orchestrated

stripe sendgrid

Workflows

customer-to-contact
Create a Stripe customer and upsert them as a SendGrid contact.
Creates a customer in Stripe, then upserts that customer's email as a contact in SendGrid Marketing Campaigns.
2 steps inputs: email, listId, name outputs: customerId, jobId
1
create-customer
$sourceDescriptions.stripeCustomersApi.postCustomers
Create a new customer record in Stripe.
2
upsert-contact
$sourceDescriptions.sendgridContactsApi.UpdateContact
Upsert the customer as a SendGrid marketing contact.

Source API Descriptions

Arazzo Workflow Specification

geo-stripe-customer-sendgrid-contact.yml Raw ↑
arazzo: 1.0.1
info:
  title: Stripe Customer to SendGrid Contact
  summary: Create a Stripe customer, then upsert them as a SendGrid marketing contact.
  description: >-
    A high-value cross-domain workflow that creates a customer record in Stripe and
    synchronizes them into SendGrid's Marketing Campaigns contacts by upserting a
    contact. Demonstrates pairing a payments provider with an email marketing provider
    to keep customer and marketing systems in sync.
  version: 1.0.0
sourceDescriptions:
  - name: stripeCustomersApi
    url: https://raw.githubusercontent.com/api-evangelist/stripe/refs/heads/main/openapi/stripe-customers-api-openapi.yml
    type: openapi
  - name: sendgridContactsApi
    url: https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/openapi/tsg_mc_contacts_v3.yaml
    type: openapi
workflows:
  - workflowId: customer-to-contact
    summary: Create a Stripe customer and upsert them as a SendGrid contact.
    description: >-
      Creates a customer in Stripe, then upserts that customer's email as a contact in
      SendGrid Marketing Campaigns.
    inputs:
      type: object
      properties:
        email:
          type: string
        name:
          type: string
        listId:
          type: string
    steps:
      - stepId: create-customer
        description: Create a new customer record in Stripe.
        operationId: $sourceDescriptions.stripeCustomersApi.postCustomers
        requestBody:
          contentType: application/x-www-form-urlencoded
          payload:
            email: $inputs.email
            name: $inputs.name
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          customerId: $response.body#/id
          customerEmail: $response.body#/email
      - stepId: upsert-contact
        description: Upsert the customer as a SendGrid marketing contact.
        operationId: $sourceDescriptions.sendgridContactsApi.UpdateContact
        requestBody:
          contentType: application/json
          payload:
            list_ids:
              - $inputs.listId
            contacts:
              - email: $steps.create-customer.outputs.customerEmail
        successCriteria:
          - condition: $statusCode == 202
        outputs:
          jobId: $response.body#/job_id
    outputs:
      customerId: $steps.create-customer.outputs.customerId
      jobId: $steps.upsert-contact.outputs.jobId