Cross-Provider Workflow

Marine Forecast to SMS Alert

Version 1.0.0

Fetch a marine forecast for a coastal point, then SMS it to a captain.

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

Providers Orchestrated

weatherapi twilio

Workflows

marine-forecast-sms
Fetch a marine forecast and text it to a captain.
Requests a marine forecast for a coastal location from WeatherAPI and sends the conditions as an SMS through Twilio Messaging.
2 steps inputs: accountSid, days, fromPhone, location, toPhone outputs: conditions, messageSid
1
get-marine
$sourceDescriptions.weatherapiApi.getMarine
Fetch the marine and tide forecast for the coastal location.
2
send-sms
$sourceDescriptions.twilioMessagingApi.createMessage
Text the marine conditions to the captain via Twilio Messaging.

Source API Descriptions

Arazzo Workflow Specification

geo-weatherapi-marine-twilio-sms.yml Raw ↑
arazzo: 1.0.1
info:
  title: Marine Forecast to SMS Alert
  summary: Fetch a marine forecast for a coastal point, then SMS it to a captain.
  description: >-
    A maritime logistics workflow that retrieves a marine and tide forecast for a
    coastal location from WeatherAPI and texts the conditions to a vessel captain as an
    SMS through Twilio's Messaging API. Demonstrates pairing a weather provider's
    specialized marine data with a communications provider for at-sea safety.
  version: 1.0.0
sourceDescriptions:
  - name: weatherapiApi
    url: https://raw.githubusercontent.com/api-evangelist/weatherapi/refs/heads/main/openapi/weatherapi-openapi-original.yml
    type: openapi
  - name: twilioMessagingApi
    url: https://raw.githubusercontent.com/api-evangelist/twilio/refs/heads/main/openapi/twilio-messaging-openapi.yml
    type: openapi
workflows:
  - workflowId: marine-forecast-sms
    summary: Fetch a marine forecast and text it to a captain.
    description: >-
      Requests a marine forecast for a coastal location from WeatherAPI and sends the
      conditions as an SMS through Twilio Messaging.
    inputs:
      type: object
      properties:
        location:
          type: string
        days:
          type: integer
        accountSid:
          type: string
        toPhone:
          type: string
        fromPhone:
          type: string
    steps:
      - stepId: get-marine
        description: Fetch the marine and tide forecast for the coastal location.
        operationId: $sourceDescriptions.weatherapiApi.getMarine
        parameters:
          - name: q
            in: query
            value: $inputs.location
          - name: days
            in: query
            value: $inputs.days
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          locationName: $response.body#/location/name
          conditionText: $response.body#/forecast/forecastday/0/day/condition/text
      - stepId: send-sms
        description: Text the marine conditions to the captain via Twilio Messaging.
        operationId: $sourceDescriptions.twilioMessagingApi.createMessage
        parameters:
          - name: AccountSid
            in: path
            value: $inputs.accountSid
        requestBody:
          contentType: application/x-www-form-urlencoded
          payload:
            To: $inputs.toPhone
            From: $inputs.fromPhone
            Body: $steps.get-marine.outputs.conditionText
        successCriteria:
          - condition: $statusCode == 201
        outputs:
          messageSid: $response.body#/sid
    outputs:
      conditions: $steps.get-marine.outputs.conditionText
      messageSid: $steps.send-sms.outputs.messageSid