Connector for Cloud Natural Language

Workflows connector that defines the built-in function used to access Cloud Natural Language within a workflow.

Explore further

For detailed documentation that includes this code sample, see the following:

Code sample

YAML

# This workflow demonstrates how to use the Cloud Language connector.
# The workflow analyzes some texts and returns "SUCCESS".
# Expected successful output: "SUCCESS"
- init:
    assign:
      - docType: "PLAIN_TEXT"
- analyze_entities:
    call: googleapis.language.v1.documents.analyzeEntities
    args:
      body:
        document:
          type: ${docType}
          language: "en"
          content: "Eiffel Tower"
        encodingType: "UTF8"
- classify_text:
    call: googleapis.language.v1.documents.analyzeSentiment
    args:
      body:
        document:
          type: ${docType}
          language: "en"
          content: "I love workflows!"
        encodingType: "UTF8"
- the_end:
    return: "SUCCESS"

What's next

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