GenAiHub

Last checked 23 October 2026 — responded normally.

Explain pasted code and follow-up questions with GPT-4.1 and Slack

Quick overview

Live
Open / InstallLast updated October 23, 2026

Description

Quick overview This workflow receives a code snippet via webhook, performs deterministic static analysis, uses an OpenAI chat model to generate a structured explanation and optional follow-up answer, then sends the final report to a Slack channel after an approval step. How it works Receives a POST request to a webhook containing a code snippet plus optional language and focus question. Detects the most likely programming language, extracts basic structure (such as function names), counts code/comment/blank lines, and estimates rough cyclomatic complexity. Sends the code and computed metrics to an OpenAI chat model to produce a JSON explanation with a summary, selected line-by-line notes, complexity analysis, issues, and suggestions. Parses the model’s JSON output, calculates a composite quality score from complexity and flagged issues, and builds a consolidated explanation report. Pauses execution to allow the submitter to provide one follow-up question, and if provided, asks the OpenAI chat model again using a trimmed code excerpt around any referenced line number. Pauses again for delivery confirmation and, if approved, posts the final explanation (and follow-up answer if present) to the configured Slack channel. Setup Add an OpenAI (or compatible) credential for the OpenAI Chat Model used by both explanation and follow-up steps. Add a Slack credential with permission to post messages and set or confirm the target channel name in the workflow configuration. Update the webhook path as needed and configure your source app to POST the code payload (and optional language/focusQuestion) to the webhook URL. Configure the two wait/resume webhook URLs in your UI or process to submit the optional follow-up question and to send the final delivery approval (sendApproved). An n8n automation workflow template by Oneclick AI Squad.

Community Metrics

Views
0
Avg Rating
N/A
Ratings
0
Likes
0
Comments
—

Author

Oneclick AI Squad

Platform

web

Pricing model

free

Categories

  • Automation
  • AI

Tags

  • n8n
  • workflow
  • slack
  • discord
  • ai-agent
  • openai-chat-model
  • simple-memory
  • code-tool

Capabilities

  • 6 nodes

Information

TypeWorkflow
Sourcen8n
AddedSeptember 4, 2026

Comments

?

Others in the same category, ranked by how often they are opened.