The Workflows connector defines the built-in
functions that can be used to access other Google Cloud products within a
workflow.

This page provides an overview of the individual connector.
There is no need to import or load connector libraries in a workflow---connectors
work out of the box when used in a call step.

## Cloud Natural Language API

Provides natural language understanding technologies, such as sentiment analysis, entity recognition, entity sentiment analysis, and other text annotations, to developers.
To learn more, see the [Cloud Natural Language API documentation](https://cloud.google.com/natural-language/).

## Cloud Natural Language connector sample

### YAML

    # This workflow demonstrates how to use the Cloud Language connector:
    # Analyze and classify text samples and log the results
    # Expected 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"
        result: response_analyze
    - log_analyze_result:
        call: sys.log
        args:
          data: ${response_analyze}
          severity: "INFO"
    - classify_text:
        call: googleapis.language.v1.documents.analyzeSentiment
        args:
          body:
            document:
              type: ${docType}
              language: "en"
              content: "I love Workflows!"
            encodingType: "UTF8"
        result: response_classify
    - log_classify_result:
        call: sys.log
        args:
          data: ${response_classify}
          severity: "INFO"
    - the_end:
        return: "SUCCESS"

### JSON

    [
      {
        "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"
            }
          },
          "result": "response_analyze"
        }
      },
      {
        "log_analyze_result": {
          "call": "sys.log",
          "args": {
            "data": "${response_analyze}",
            "severity": "INFO"
          }
        }
      },
      {
        "classify_text": {
          "call": "googleapis.language.v1.documents.analyzeSentiment",
          "args": {
            "body": {
              "document": {
                "type": "${docType}",
                "language": "en",
                "content": "I love Workflows!"
              },
              "encodingType": "UTF8"
            }
          },
          "result": "response_classify"
        }
      },
      {
        "log_classify_result": {
          "call": "sys.log",
          "args": {
            "data": "${response_classify}",
            "severity": "INFO"
          }
        }
      },
      {
        "the_end": {
          "return": "SUCCESS"
        }
      }
    ]

## Module: googleapis.language.v1.documents

| Functions ||
|---|---|
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/language/v1/documents/analyzeEntities` | Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/language/v1/documents/analyzeEntitySentiment` | Finds entities, similar to AnalyzeEntities in the text and analyzes sentiment associated with each entity and its mentions. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/language/v1/documents/analyzeSentiment` | Analyzes the sentiment of the provided text. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/language/v1/documents/analyzeSyntax` | Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/language/v1/documents/annotateText` | A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and analyzeSyntax provide in one call. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/language/v1/documents/classifyText` | Classifies a document into categories. |

## Module: googleapis.language.v1beta2.documents

| Functions ||
|---|---|
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/language/v1beta2/documents/analyzeEntities` | Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/language/v1beta2/documents/analyzeEntitySentiment` | Finds entities, similar to AnalyzeEntities in the text and analyzes sentiment associated with each entity and its mentions. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/language/v1beta2/documents/analyzeSentiment` | Analyzes the sentiment of the provided text. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/language/v1beta2/documents/analyzeSyntax` | Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/language/v1beta2/documents/annotateText` | A convenience method that provides all syntax, sentiment, entity, and classification features in one call. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/language/v1beta2/documents/classifyText` | Classifies a document into categories. |