Skip to main content

OpenAI integration

Generate text, images, speech, and structured data with OpenAI models on behalf of your clients, and react when background jobs finish.

What it does

The OpenAI integration lets your agency run GPT models, image generation, speech, transcription, moderation, file search, and batch jobs from inside any workflow, using each client's own OpenAI project. Connect a client's API key once and your workflows can summarize form submissions, extract invoice fields into JSON, describe product photos, voice a script, transcribe a call recording, or search a client's knowledge base. Long-running work (background responses, batches, fine-tuning, evals) can finish in its own time: a trigger starts the next workflow the moment OpenAI reports it is done, with no polling.

Connect an OpenAI account

  1. In TaskJuice, open Apps, choose OpenAI, and click Add API key.
  2. In a new tab, open the OpenAI API keys page signed in to the client's organization, and select the project the workflows should bill to.
  3. Click Create new secret key. Give it a name that identifies the workspace. Leave permissions on All: the triggers need to register a webhook endpoint on the project, which a restricted key cannot do.
  4. Copy the sk-... value (it is shown once) and paste it into the API Key field in TaskJuice.

The connection acts on the project the key belongs to. To rotate the key, create a new one on the same page, update the connection, then delete the old key.

Triggers

When you publish a workflow that starts with an OpenAI trigger, TaskJuice registers a webhook endpoint named TaskJuice on the connected project and keeps its event list in sync with your published workflows. You do not need to create anything in the OpenAI dashboard. Deliveries are signature-verified before they start a run.

OpenAI sends a short notification that carries only the ID of the object that changed, in data.id. Add the matching Get action after the trigger to load the full record.

Responses (for responses created with Run in Background switched on)

  • openai/response-completed: a background response finished. Follow with Get Response.
  • openai/response-failed: a background response failed.
  • openai/response-cancelled: a background response was cancelled.
  • openai/response-incomplete: a background response stopped early, for example at its output-token limit.

Batches

  • openai/batch-completed: a batch finished and its output file is ready. Follow with Get Batch, then Download File Content on output_file_id.
  • openai/batch-failed, openai/batch-expired, openai/batch-cancelled: a batch did not complete.

Fine-tuning

  • openai/fine-tuning-job-succeeded: the fine-tuned model is ready. Get Fine-Tuning Job returns its fine_tuned_model name.
  • openai/fine-tuning-job-failed, openai/fine-tuning-job-cancelled.

Evals

  • openai/eval-run-succeeded, openai/eval-run-failed, openai/eval-run-canceled: an eval run finished. Get Eval Run also needs the eval ID, which is shown on the run in the OpenAI dashboard.

Realtime phone calls

  • openai/realtime-call-incoming: a phone call reached the project's SIP endpoint. Answer it with Accept Realtime Call (or Reject Realtime Call) using data.call_id. The call must be answered within a few seconds.

Safety

  • openai/safety-alert-created: OpenAI raised a safety alert on the project. Follow with Get Safety Alert.

Actions

Text and reasoning

  • openai/create-response: generate a response with the Responses API. Supports system instructions, reasoning effort, tools such as web search ([{"type":"web_search"}]) and file search, conversations, and background mode. The generated text is at output[type="message"].content[0].text.
  • openai/extract-structured-data: turn unstructured text into JSON that matches a JSON Schema you define (strict structured outputs). The parsed JSON is returned as data, ready to map into later steps; data is null when the model refuses.
  • openai/analyze-image: ask a vision model a question about an image, either a file from an earlier step or an image URL.
  • openai/analyze-file: ask a model a question about a file, such as a PDF. Set the source input to file to send a file from an earlier step, or to url to send a public file URL.
  • openai/create-chat-completion: the Chat Completions API, for prompts written as a messages array.
  • openai/get-response, openai/cancel-response, openai/delete-response, openai/list-response-input-items: manage stored and background responses.

Conversations

  • openai/create-conversation, openai/get-conversation, openai/update-conversation, openai/delete-conversation: keep multi-turn context across workflow runs. Pass the conversation ID to Create Response.
  • openai/add-conversation-message, openai/list-conversation-items: append to and read a conversation.

Safety and embeddings

  • openai/create-moderation: check text for harmful content before you publish or reply. Free to use.
  • openai/create-embedding: turn text into an embedding vector.

Images

  • openai/generate-image: create images from a prompt with a GPT Image model.
  • openai/edit-image: edit an image referenced by URL or uploaded file, with an optional mask.

Audio

  • openai/create-speech: convert text to spoken audio (mp3, opus, aac, flac, wav, or pcm).
  • openai/create-transcription: transcribe an audio file.
  • openai/create-translation: translate speech in an audio file into English text.

Files and batches

  • openai/upload-file, openai/list-files, openai/get-file, openai/download-file-content, openai/delete-file.
  • openai/create-batch, openai/get-batch, openai/list-batches, openai/cancel-batch: run large jobs at half price within 24 hours.
  • openai/create-vector-store, openai/get-vector-store, openai/list-vector-stores, openai/delete-vector-store.
  • openai/add-file-to-vector-store, openai/list-vector-store-files, openai/remove-file-from-vector-store.
  • openai/search-vector-store: semantic search that returns the best-matching chunks, ready to feed into a prompt.

Skills and containers

  • openai/create-skill, openai/list-skills, openai/get-skill, openai/set-skill-default-version, openai/delete-skill, openai/download-skill.
  • openai/create-skill-version, openai/list-skill-versions, openai/get-skill-version, openai/download-skill-version, openai/delete-skill-version.
  • openai/list-container-files, openai/download-container-file: retrieve files a code interpreter run produced, such as charts.

Fine-tuning, evals, and models

  • openai/create-fine-tuning-job, openai/get-fine-tuning-job, openai/list-fine-tuning-jobs, openai/cancel-fine-tuning-job.
  • openai/get-eval-run, openai/get-safety-alert.
  • openai/list-models, openai/get-model.

Realtime phone calls

  • openai/accept-realtime-call, openai/reject-realtime-call, openai/transfer-realtime-call, openai/hang-up-realtime-call.

Known limitations

  • Usage is billed to the client's OpenAI project, which is prepaid. When credit runs out, OpenAI answers 429 insufficient_quota; retries will not succeed until credit is added.
  • Rate limits, spend caps, and model access are governed by the client's OpenAI organization and usage tier, not by TaskJuice.
  • GPT Image models return images as base64 text in data[0].b64_json, not as a file. Large images make large run outputs.
  • Responses are not streamed. Each action resolves once OpenAI returns the full result; use background mode with the Response Completed trigger for long reasoning or research jobs.
  • Transcription and translation accept files up to 25 MB.
  • Analyze Image and Analyze File send a file from an earlier step inside the request, up to 10 MB. For a larger file, give Analyze Image a public image URL instead of a file, or set Analyze File's source to url with a URL OpenAI can download.
  • Video generation (Sora) is not available: OpenAI retired the Videos API on September 24, 2026. The Assistants API is also retired and is not supported; use Responses and Conversations instead.
  • Organization administration (users, projects, usage and cost reports) needs an OpenAI admin key and is not part of this integration.
Was this helpful?