M
MJK.Supplies
Home / n8n / n8n OpenAI Integration: Build GPT-Powered Workfl…
n8n

n8n OpenAI Integration: Build GPT-Powered Workflows Without Code

OpenAI's API — providing access to GPT-4o, Whisper, and DALL-E — integrates natively into n8n's workflow engine. Whether you're building AI-powered customer service, automated content creation, voice transcription workflows, or intelligent data processing, n8n's OpenAI integration makes AI accessible without managing API complexity. This guide covers practical n8n + OpenAI workflow patterns.

M
MJK Supplies · Jun 10, 2026 · 11 min read
ShareXinf↗
n8n OpenAI Integration: Build GPT-Powered Workflows Without Code

Setting Up OpenAI in n8n

  1. Create an account at platform.openai.com and generate an API key
  2. In n8n, go to Settings → Credentials → Create new → OpenAI
  3. Enter your API key and test the connection
  4. The credential is now available in all OpenAI nodes

n8n has a dedicated OpenAI node covering: Chat Completion, Message a Model, Analyze Images, Generate an Image, Generate Audio, Transcribe a Recording, Translate a Recording, and Create an Assistant. These cover the most common OpenAI use cases.

For advanced configurations (function calling with specific schemas, Assistants API, Batch API), use the HTTP Request node with the OpenAI API directly.

Chat Completion Workflows

The OpenAI Chat Completion node handles most AI text processing use cases:

Support ticket classification:

System: You are a support ticket classifier. Return JSON only: {"category": "billing|technical|product|general", "priority": "high|medium|low"} User: {{$json.ticket_body}}

Email draft generation:

System: You are a professional email writer. Write concise, friendly emails. User: Write a follow-up email to {{$json.contact_name}} at {{$json.company}} about their demo request. Mention their interest in {{$json.use_case}}.

The node returns the model's response as text — use subsequent nodes to parse JSON or route based on content.

Voice Transcription with Whisper

n8n's Whisper integration transcribes audio files automatically:

Call recording transcription workflow:

  1. Trigger: New file in Google Drive folder (call recordings folder)
  2. Google Drive Download: Download the audio file
  3. OpenAI Transcribe: Pass the audio file to Whisper — returns the full transcription text
  4. Claude/OpenAI Chat: Pass the transcript for analysis — extract action items, summarise the call, identify next steps
  5. HubSpot Note: Write the transcript and summary to the CRM

The entire call processing — download, transcribe, summarise, CRM update — takes 2-3 minutes and runs automatically for every new recording.

Voicemail to ticket:

  1. Webhook: Twilio voicemail recording webhook
  2. OpenAI Transcribe: Transcribe the voicemail
  3. OpenAI Chat: Classify the voicemail intent (callback request, information inquiry, complaint, etc.)
  4. Zendesk Create Ticket: Create support ticket with transcript and classification

Image Analysis Workflows

GPT-4o can analyse images — reading text, identifying objects, describing scenes, and extracting structured information.

Receipt processing:

  1. Gmail Trigger: New email with expense receipt attached
  2. Gmail Download Attachment
  3. OpenAI Analyze Image: "Extract the following from this receipt: vendor name, date, total amount, expense category. Return JSON."
  4. JSON Parse
  5. Expense system update

Product image quality check:

  1. Webhook: New product image uploaded to Shopify
  2. OpenAI Analyze Image: "Review this product image for quality issues: is it in focus, properly lit, shows the product clearly, has appropriate background? Return JSON with pass/fail and specific feedback."
  3. Route: Pass → continue; fail → Slack alert to product team

DALL-E Image Generation

n8n's OpenAI Generate Image node creates images from text descriptions:

Automated blog header images:

  1. RSS Trigger: New blog post published
  2. OpenAI Chat: Generate an image prompt based on the article title and summary
  3. OpenAI Generate Image: Create the image using DALL-E 3
  4. WordPress/CMS Update: Set the generated image as the featured image

Product variant visualisation:

  1. Airtable Trigger: New product colour variant added
  2. OpenAI Generate Image: Create a product mockup in the new colour
  3. Google Drive Upload: Save the generated image
  4. Shopify Update: Upload as a product image variant

Combining OpenAI and Claude

Many production n8n workflows use both OpenAI and Claude, each for their strengths:

  • Whisper (OpenAI) for transcription → Claude for analysis and CRM update
  • GPT-4o for function-calling agent tools → Claude for final response generation
  • DALL-E (OpenAI) for image generation → Claude for caption writing

Using both in the same workflow is straightforward — add an OpenAI node for OpenAI-specific tasks and an Anthropic node for Claude tasks. Route data between them as needed.

Recommended Tools

  • n8n — Workflow platform with native OpenAI integration
  • OpenAI API — GPT-4o, Whisper, DALL-E access
  • Claude API — Complement for reasoning and generation
  • HubSpot — CRM destination for AI-processed data
  • Twilio — Voice/SMS integration for audio workflows
  • Airtable — Data storage for AI outputs
#n8n#openai#gpt#integration

Related articles

MJK Supplies · Automation Services

Want this built for you?

We design and ship custom AI agents and automation systems for teams that want results, not a backlog. Book a free 30-minute consult — no commitment, no pitch deck.