ByteChef LogoByteChef
AutomationQuick Start

Configure Workflow Trigger

Create a workflow that starts on a Google Calendar event, summarizes the event with OpenAI, and runs as a deployment.

This guide builds a workflow that starts when an event is created or updated in Google Calendar, sends the event to OpenAI for a one-sentence summary, and runs as a deployment. It covers adding a trigger, creating an OAuth 2.0 connection, passing data with a data pill, publishing the project, creating a deployment, and reading the execution.

Before you start

New or Updated Event is a webhook trigger: Google must be able to reach your ByteChef instance over a public URL. If you run ByteChef locally, expose it with a tunnel first. See Working with Triggers.

Create the workflow

On the Projects page, expand your project. On its Workflows tab, click Create Workflow (or New Workflow when the project already has workflows).

Enter a Label, optionally a Description, and click Save.

The Create Workflow dialog

Add the trigger

Right-click the Manual trigger node, or hover it and open its Node actions menu (⋮), and choose Replace.

Search for Google Calendar, select it, and choose the New or Updated Event trigger.

Google Calendar's trigger list, with New or Updated Event

The trigger's panel opens on the Connection tab. Click Create Connection.

The trigger's Connection tab, prompting you to create a connection

Enter a connection name, paste the Client ID and Client Secret of your Google OAuth 2.0 client, and click Next.

Click Connect. In the Google window, select your account, click Continue, grant ByteChef access to the requested scopes, and click Continue again. The new connection is selected in the Choose Connection... list.

Open the Properties tab and, in Calendar ID, select the calendar to watch.

Add the OpenAI action

Click the + button below the trigger, search for OpenAI, and choose the Ask action.

On the step's Connection tab, click Create Connection, enter a connection name, paste your OpenAI API key into Token, and click Save.

Open the Properties tab. In Model, choose a model, for example gpt-5-mini. In Prompt, enter Summarise this calendar event in one sentence:.

The OpenAI Ask action's Properties tab, with a model and prompt set

Insert the event with a data pill

Click into the Prompt field. The Data Pill Panel opens next to the step's panel.

Expand the Google Calendar row and click trigger_1. The trigger's output is inserted into Prompt as a data pill.

The Data Pill Panel open beside the prompt, offering the trigger's output

Publish the project and create a deployment

Click Publish in the editor header, optionally enter a description for the version, and click Publish.

Go to Projects, expand your project, and open its Deployments tab. Click Deploy (or New Deployment when the project already has deployments). The New Deployment dialog opens with the project and the latest published version selected.

The New Deployment dialog with a project and version selected

Click Next. On the Workflows step, turn on the workflow and select a connection for each component that needs one.

Click Save, then turn on the deployment's switch to enable it. The workflow now runs whenever an event is created or updated in the selected calendar.

Monitor the execution

In the left sidebar, open Executions and choose Workflow Executions. The list shows the status of each run.

Click an execution to open its details. Select the Google Calendar trigger to review its output, and the OpenAI step to read the summary.

Click the panel icon in the top-right corner of the details to show the workflow graph beside them.

An execution's detail panel: the task list, the selected task's output, and the workflow graph

Reference

Create an OAuth 2.0 client

Click the project dropdown in the top navigation bar.

Click New Project.

Enter a project name and click Create.

Click the project dropdown again.

Select the project you just created.

Go to APIs & Services.

Go to OAuth consent screen.

Click Get Started.

Enter an App name and add user support email. Click Next.

Select your Audience and click Next.

Add email addresses and click Next.

Agree to the terms and click Create.

Go to Data Access.

Click Add or Remove Scopes.

Select all necessary scopes.

Click Update.

Click Save.

Go to Clients.

Click Create Client.

Click application type dropdown.

Choose Web application as the application type.

Click Add Uri.

Enter the redirect URI of your ByteChef instance, <public URL>/callback (for example https://app.bytechef.io/callback, or http://localhost:8080/callback for a local instance). Click Create.

Click the client you just created.

Copy the Client ID and Client Secret. Use these credentials to create a connection in ByteChef.

Enable the Google Calendar API

In the Google Cloud Console, select your project.

Go to APIs & Services.

Click ENABLE APIS AND SERVICES.

Search for "calendar" in the search bar.

Click Google Calendar API.

Click Enable.

Create an OpenAI API key

Go to the OpenAI API.

In the left sidebar, click API Keys.

Click Create new secret key.

Enter a name and select the project for the key and click Create secret key.

Copy the API key. Paste it into the Token field of the OpenAI connection in ByteChef.

How is this guide?

Last updated on

On this page