Route messages from Pub Sub to Recipe Function

Recipe ToolsWorkato

What it does

When a new message arrives in an Event topic, this automation sends it to a Recipe Function in real time. The function processes the message and returns a response to the caller.

Who it's for

Engineering teams who need to route event stream messages to custom logic without building separate infrastructure.

How teams use this

Process events from a message queue

Route messages from Pub Sub to a function that transforms or validates the data before it reaches downstream systems. The event flow stays the same and only the processing logic changes.

Add filtering before the function runs

Include a condition that checks the message type or content so only matching events reach the Recipe Function. This prevents unnecessary function calls and reduces processing overhead.

Send events to multiple functions

Set up a second Recipe Function call in parallel so different teams can process the same event stream independently. Both functions receive the message at the same time.

How it works

  1. Listen for messages in the topic. A new message arrives in the Event topic. The automation defines request and response parameters for the API endpoint that receives it.
  2. Send the message to the function. Call the Recipe Function with the message payload so it can process the data and return a response in real time to the caller.