Cross-Provider Workflow

Amberflo Invoices to Sheet and Slack

Version 1.0.0

Export Amberflo customer invoices to a Google Sheet, then notify Slack.

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

Providers Orchestrated

amberflo google-sheets slack

Workflows

invoices-to-sheet-and-slack
List Amberflo invoices, append to a sheet, then notify Slack.
Lists a customer's Amberflo invoices, appends them to a Google Sheet, and posts a notice to a Slack channel.
3 steps inputs: channel, customerId, range, spreadsheetId outputs: messageTs, updatedRange
1
list-invoices
$sourceDescriptions.amberfloBillingApi.listInvoices
List the customer's Amberflo invoices.
2
append-invoices
$sourceDescriptions.googleSheetsApi.appendValues
Append the invoices to a Google Sheet.
3
notify-slack
$sourceDescriptions.slackChatApi.postChatPostmessage
Notify Slack that new usage invoices are available.

Source API Descriptions

Arazzo Workflow Specification

fin-amberflo-invoices-to-sheet-slack.yml Raw ↑
arazzo: 1.0.1
info:
  title: Amberflo Invoices to Sheet and Slack
  summary: Export Amberflo customer invoices to a Google Sheet, then notify Slack.
  description: >-
    A billing-visibility workflow that lists a customer's invoices from Amberflo
    billing, appends them to a Google Sheet for revenue tracking, and posts a
    notice to a Slack channel so finance sees newly generated usage invoices.
    Demonstrates fanning metered-billing invoice data out to a spreadsheet and a
    chat channel.
  version: 1.0.0
sourceDescriptions:
  - name: amberfloBillingApi
    url: https://raw.githubusercontent.com/api-evangelist/amberflo/refs/heads/main/openapi/amberflo-billing-openapi.yaml
    type: openapi
  - name: googleSheetsApi
    url: https://raw.githubusercontent.com/api-evangelist/google-sheets/refs/heads/main/openapi/google-sheets-openapi.yml
    type: openapi
  - name: slackChatApi
    url: https://raw.githubusercontent.com/api-evangelist/slack/refs/heads/main/openapi/slack-chat-openapi.yml
    type: openapi
workflows:
  - workflowId: invoices-to-sheet-and-slack
    summary: List Amberflo invoices, append to a sheet, then notify Slack.
    description: >-
      Lists a customer's Amberflo invoices, appends them to a Google Sheet, and
      posts a notice to a Slack channel.
    inputs:
      type: object
      properties:
        customerId:
          type: string
        spreadsheetId:
          type: string
        range:
          type: string
        channel:
          type: string
    steps:
      - stepId: list-invoices
        description: List the customer's Amberflo invoices.
        operationId: $sourceDescriptions.amberfloBillingApi.listInvoices
        parameters:
          - name: customerId
            in: query
            value: $inputs.customerId
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          invoices: $response.body
      - stepId: append-invoices
        description: Append the invoices to a Google Sheet.
        operationId: $sourceDescriptions.googleSheetsApi.appendValues
        parameters:
          - name: spreadsheetId
            in: path
            value: $inputs.spreadsheetId
          - name: range
            in: path
            value: $inputs.range
          - name: valueInputOption
            in: query
            value: USER_ENTERED
        requestBody:
          contentType: application/json
          payload:
            range: $inputs.range
            majorDimension: ROWS
            values:
              - - Amberflo Invoices Export
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          updatedRange: $response.body#/updates/updatedRange
      - stepId: notify-slack
        description: Notify Slack that new usage invoices are available.
        operationId: $sourceDescriptions.slackChatApi.postChatPostmessage
        requestBody:
          contentType: application/x-www-form-urlencoded
          payload:
            channel: $inputs.channel
            text: New Amberflo usage invoices have been exported to the finance sheet.
        successCriteria:
          - condition: $statusCode == 200
          - condition: $response.body#/ok == true
        outputs:
          messageTs: $response.body#/ts
    outputs:
      updatedRange: $steps.append-invoices.outputs.updatedRange
      messageTs: $steps.notify-slack.outputs.messageTs