Cross-Provider Workflow

Square Sale to SendGrid Receipt

Version 1.0.0

Take a Square payment with Block, then email a receipt via SendGrid.

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

Providers Orchestrated

block sendgrid

Workflows

square-sale-receipt
Create a Square payment, then email a SendGrid receipt.
Creates a payment with Block's Square Payments API and, on a completed sale, emails the buyer a receipt via SendGrid.
2 steps inputs: amount, buyerEmail, currency, idempotencyKey, sourceId outputs: paymentId, paymentStatus, receiptStatus
1
create-payment
$sourceDescriptions.blockApi.create-payment
Create a payment with Block's Square Payments API.
2
email-receipt
$sourceDescriptions.sendgridApi.SendMail
Email the buyer a receipt via SendGrid Mail Send.

Source API Descriptions

Arazzo Workflow Specification

pay-block-sale-to-sendgrid-receipt-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Square Sale to SendGrid Receipt
  summary: Take a Square payment with Block, then email a receipt via SendGrid.
  description: >-
    A cross-provider workflow that captures an in-person or online sale through
    Block's Square Payments API and, on a completed payment, emails the buyer a
    receipt using SendGrid's Mail Send API. Brings point-of-sale payments and
    transactional email together into one orchestration.
  version: 1.0.0
sourceDescriptions:
  - name: blockApi
    url: https://raw.githubusercontent.com/api-evangelist/block/refs/heads/main/openapi/block-payments-api-openapi.yml
    type: openapi
  - name: sendgridApi
    url: https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/openapi/sendgrid-mail-send-api-openapi.yml
    type: openapi
workflows:
  - workflowId: square-sale-receipt
    summary: Create a Square payment, then email a SendGrid receipt.
    description: >-
      Creates a payment with Block's Square Payments API and, on a completed sale,
      emails the buyer a receipt via SendGrid.
    inputs:
      type: object
      properties:
        sourceId:
          type: string
        idempotencyKey:
          type: string
        amount:
          type: integer
        currency:
          type: string
        buyerEmail:
          type: string
    steps:
      - stepId: create-payment
        description: Create a payment with Block's Square Payments API.
        operationId: $sourceDescriptions.blockApi.create-payment
        requestBody:
          contentType: application/json
          payload:
            source_id: $inputs.sourceId
            idempotency_key: $inputs.idempotencyKey
            amount_money:
              amount: $inputs.amount
              currency: $inputs.currency
        successCriteria:
          - condition: $statusCode == 200
          - condition: $response.body#/payment/status == "COMPLETED"
        outputs:
          paymentId: $response.body#/payment/id
          paymentStatus: $response.body#/payment/status
      - stepId: email-receipt
        description: Email the buyer a receipt via SendGrid Mail Send.
        operationId: $sourceDescriptions.sendgridApi.SendMail
        requestBody:
          contentType: application/json
          payload:
            personalizations:
              - to:
                  - email: $inputs.buyerEmail
                subject: Your Square receipt
            from:
              email: receipts@example.com
            content:
              - type: text/plain
                value: Payment $steps.create-payment.outputs.paymentId completed. Thank you.
        successCriteria:
          - condition: $statusCode == 202
        outputs:
          emailStatus: $statusCode
    outputs:
      paymentId: $steps.create-payment.outputs.paymentId
      paymentStatus: $steps.create-payment.outputs.paymentStatus
      receiptStatus: $steps.email-receipt.outputs.emailStatus

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/pay-block-sale-to-sendgrid-receipt-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.