Introducing Enhanced OpenAI Chat Actions for Pipedream
The Pipedream OpenAI app enables a wide range of agentic AI automation use cases by enabling customers to easily add LLM actions powered by OpenAI’s models to their workflow.
OpenAI recently revealed their Responses API designed to build dynamic AI agent tools. This new API brings built in capabilities for web search, file search, and function calling to the API which adds significant power to what AI agents can do.
What's New?
The Pipedream OpenAI app has been updated to include a new set of actions that use the Responses API:
- Chat using Web Search: Enhance chat responses with real-time web search results.
- Chat using File Search: Retrieve and reference data from your own vector store knowledge base, making your chat interactions more informed and context-aware.
- Chat using Functions: Allow your chat model to either answer directly or invoke custom functions - including entire workflows built as functions. This means you can now transform your Pipedream workflows into callable tools, automating complex multi-step tasks seamlessly.
Chat using Web Search
This action lets your chat model integrate live web search results into its responses. Whether you need the latest news, product details, or current data, this action uses OpenAI’s advanced web search capabilities to fetch and summarize real-time information.
Key Props and Configuration
modelId
: Choose betweengpt-4o
orgpt-4o-mini
for generating responses.input
&instructions
: Provide your chat prompt and any additional context.previousResponseId
: Enable multi-turn conversations.truncation
: Decide whether to automatically truncate responses or disable truncation.userLocation
&searchContextSize
: Configure location parameters and context size for more precise search results.responseFormat
: Define whether you want plain text or a structured JSON schema output.skipThisStep
: Pass a boolean to skip executing this step at runtime.
Chat using File Search
Retrieve information from your own file knowledge base stored in vector stores. This is perfect for scenarios where your files contain critical information you want the model to reference when answering questions.
Key Props and Configuration
modelId
: Choose a reasoning model likeo3-mini
oro1
, or use established models likegpt-4o
.input
&instructions
: Provide your chat prompt and any additional context.vectorStoreId
: The unique identifier of your vector store.includeSearchResults
&maxNumResults
: Control how many and whether to include search results from your file store.metadataFiltering
: Enable filtering of search results based on file metadata.
Chat using Functions
This action is our most advanced update, leveraging OpenAI’s Responses API to allow the chat model to choose between directly answering a query or invoking one of your custom functions. This is where Pipedream truly shines: you can now build entire workflows as functions, which the model can trigger automatically.
Key Props and Configuration
functions
: A JSON array defining functions using OpenAI's function schema. This is where you list the function names, descriptions, and parameter schemas.toolChoice
: Controls how the model uses functions.parallelToolCalls
: Allow or prevent the model from calling multiple functions in one turn.
Using Pipedream Workflows as Functions
One of the most exciting features of this action is the ability to build an entire workflow as a function. Once the model returns a function call, add a custom code step that has all your functions available. Based on the model's response, the corresponding function or workflow is executed. This empowers you to build robust, multi-step automation directly using a LLM's power to process natural language.
The workflow can be as simple as this!
We'll be using this function definition schema to instruct ChatGPT what are the available tools we have. In the functions prop, you specify the function name, description, and parameters. You can provide multiple functions, but for the sake of this guide, we'll add only one. You can easily generate one by describing what you need here.
[
{
"type": "function",
"name": "schedule_appointment",
"description": "Schedules an appointment by invoking a workflow.",
"strict": true,
"parameters": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Appointment date in YYYY-MM-DD format"
},
"time": {
"type": "string",
"description": "Appointment time in HH:MM format"
},
"description": {
"type": "string",
"description": "Purpose of the appointment"
}
},
"required": ["date", "time", "description"],
"additionalProperties": false
}
}
]
- Create a free Pipedream account if you haven't yet already.
- Copy this Schedule Appointment Tool workflow that will be used as a function.
- Connect your Google Calendar account
- Take note of the generated HTTP Webhook URL, we'll use it in the next step.
- Copy this AI Agent Workflow, this is where your Chat using Functions step will choose to invoke the tool.
- In the
function_call
step, paste in the HTTP Webhook URL from the previous workflow in the Schedule Appointment Tool URL prop. - Invoke the Workflow
Make an HTTP request to your AI Agent Workflow, directly from the UI or running this command in a terminal:
curl -X POST \
-H "Content-Type: application/json" \
-d '{"user_message":"Hi, I want to schedule an appointment on April 1st, 2025 at 10:00 AM. I am having a chronic stomach ache and would love to get rid of it. Thanks."}' \
https://your-ai-agent-workflow-trigger-endpoint.m.pipedream.net
8. Visualize the Execution
Inspect the event and see that the Schedule Appointment Tool was invoked by your AI Agent Workflow and used as a tool. Visit your Google Calendar and you'll see the appointment created there!\
Final Thoughts
With these three new OpenAI Chat actions, you can now build more dynamic, data-driven, and functionally rich workflows. Whether you're integrating live web search results, retrieving data from your file knowledge base, or triggering custom workflows as functions, these actions offer powerful tools to elevate your automation capabilities. You can leverage any of our 2500+ integrated apps and do complex logic with simple function definitions!
We hope this step-by-step tutorial helps you get started quickly and inspires you to create your own complex automations. If you have questions or need further assistance, feel free to reach out to our community. Happy building!