Deploy your first workflow

Passes the current day of the week as a search term to the Wikipedia API. A list of related Wikipedia articles is returned.

Code sample

YAML

- getCurrentTime:
    call: http.get
    args:
      url: https://timeapi.io/api/Time/current/zone?timeZone=Europe/Amsterdam
    result: currentTime
- readWikipedia:
    call: http.get
    args:
      url: https://en.wikipedia.org/w/api.php
      query:
        action: opensearch
        search: ${currentTime.body.dayOfWeek}
    result: wikiResult
- returnResult:
    return: ${wikiResult.body[1]}

What's next

To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.