Schedule low-risk deployment windows with GPT-4.1, Slack, and Google Calendar

Go to Workflow
0 views
Built by Oneclick AI Squad Oneclick AI Squad
Created on September 05, 2026

Description

Quick overview
This workflow receives a deployment request via webhook, uses OpenAI with internal HTTP APIs (traffic, incidents, deployment history, and availability) to recommend a low-risk deployment window, logs the recommendation to Postgres, and requests approval in Slack before creating a Google Calendar hold and scheduling a CI/CD trigger.

How it works
Receives a deployment request via a webhook with service, version, change details, and optional earliest/latest deploy-by constraints.
Uses an OpenAI agent with session memory to query traffic analytics, incident history, deployment failure history, and team availability APIs as needed to select a primary and fallback deployment window with a risk score.
Parses the agent’s JSON output and logs the recommendation details (window, risk, rationale, approvers, status, timestamp) to a Postgres table for audit.
If the risk score is high, posts a high-risk notice to Slack and returns the recommendation details in the webhook response.
If the risk score is not high, posts an approval request to Slack and waits for an approval webhook response.
When approved, creates a Google Calendar event to hold the deployment window, calls a CI/CD scheduling API to dispatch the deployment at the window start, and posts a confirmation to Slack (otherwise it posts a resubmission notice).

Setup
Configure the incoming webhook endpoint path in the system that submits deployment requests (for example, your CI/CD pipeline) and send the expected fields (service, version, changeDescription, requestedBy, earliestDeployBy, latestDeployBy, slackChannel).
Add an OpenAI credential for the Chat Model used by the analysis agent.
Update the internal HTTP API endpoints and authentication for traffic analytics, incident management, deployment history, team availability, and the CI/CD scheduling endpoint.
Add a Postgres credential and create a deployment_window_recommendations table with columns matching the insert (service, version, requested_by, recommended_window, fallback_window, risk_score, rationale, required_approvers, status, created_at).
Add Slack credentials and set up an interactive approval action that calls the workflow’s Wait node resume webhook with an approved flag and approver identity.
Add Google Calendar credentials and select the target calendar where deployment holds should be created.

Nodes Used (8)

AI Agent
@n8n/n8n-nodes-langchain.agent
Google Calendar
n8n-nodes-base.googleCalendar
HTTP Request
n8n-nodes-base.httpRequest
HTTP Request Tool
@n8n/n8n-nodes-langchain.toolHttpRequest
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
Postgres
n8n-nodes-base.postgres
Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow
Slack
n8n-nodes-base.slack