Connect OpenAI

Configure the OpenAI action and credentials for workflow AI tasks.

The OpenAI chat action generates text using a model available through the WordPress AI Client integration included with AI Agent Workflows. You can use it as a regular workflow action or attach an OpenAI chat model to an AI Agent.

Screenshot to add: OpenAI action configuration showing the API key and model fields

Configure OpenAI

  1. Open the workflow editor and add the OpenAI Chat action from the available actions, or add an AI Agent and connect an OpenAI chat model.
  2. Select the OpenAI node to open its configuration.
  3. Enter a valid OpenAI API key when the node asks for provider credentials. The plugin checks the key with the provider before accepting it.
  4. Choose a text-generation model from the available model list. The list is loaded from the provider; model names are not fixed in the plugin documentation.
  5. Configure the prompt and map the input values required for the task.
  6. Save the workflow, run a test, and review the node output and any error message.

Use OpenAI with an AI Agent

For an agent, connect an OpenAI chat model to the AI Agent node on the canvas. The model connection is required. The agent’s prompt, optional system prompt, and other attachments are configured on the AI Agent node; the model node supplies the language model used to run it.

Troubleshooting

  • No model options: confirm that the key was accepted, that the server can reach the provider, and that the provider returns text-generation models.
  • Provider request fails: check the key and provider account limits, then test again.
  • Unexpected output: make the prompt more specific and inspect the mapped input values.

Saving a key or choosing a model does not prove that the full workflow works. Verify the result with a test run.