# gRPC

gRPC (opens new window) is a Remote Procedure Call (RPC) framework that can run in any environment. The Workato gRPC connector enables you to call gRPC services as part of a recipe. You can create gRPC services in any gRPC-supported language (opens new window).

gRPC uses Protocol Buffers (opens new window) to serialize structured data. Protocol buffer data is defined in a proto file as messages, where each message is a small logical record of information containing a series of name-value pairs called fields. For more information, see Working with Protocol Buffers (opens new window).

# gRPC services

The architecture for a typical gRPC service client in a Workato recipe looks as follows. architecture diagram of recipe and gRPC service

# How to connect to gRPC services

Ensure that you have a valid resource asset. Learn how to create a resource asset in Workato.

Field Description
Connection name Give this connection a descriptive name so you can reuse it in other recipes.
Protobuf resource The name of the resource you created above.
Host The gRPC server host.
Authentication type
  • No authentication: Calls the service without authentication
  • JSON Web Token (JWT): Authenticate using JWT token

# Create a resource asset in Workato

Prepare a .proto file. This will be used to create a Resources asset in Workato. Resources are shared assets that define configuration, interface definition, and specifications.

Learn more about the Protocol Buffer syntax (opens new window).

Follow these steps to create a Resources asset to hold the service and message type definitions from the .proto file and to establish a connection with gRPC:

1

Navigate to Tools > Resources and click Create resource.

2

Enter a name and description and click Create resource.

3

Copy and paste the content from your .proto file into the editor window of the new protobuf resource and click Save changes.

# Using gRPC actions

This connector supports two actions:

  • Invoke a gRPC service: Use this action to call gRPC services that return smaller payload responses (up to 5 MB).
  • Invoke a gRPC service and write result to CSV file: Use this action to call gRPC services that return large payload responses (up to 100 MB). In addition, this action accepts a reference to an S3 file to store the response after converting it to CSV format.

Action timeout

gRPC actions timeout after 30 minutes.

The gRPC actions support unary (opens new window) and server streaming types (opens new window) of calls. In a unary call, the gRPC connector action sends a single request and receives a single response. A server streaming RPC is similar to unary, except that the server returns a stream of messages in response to the connector action’s call.


Last updated: 10/21/2021, 8:25:00 AM