🤖

Using OpenAI Assistants in ProcFu

We've just added a new function to ProcFu: open_ai_assistant. This lets you tap into your own custom OpenAI Assistants right from your flows and scripts - just by passing an assistant_id and a prompt.

Why this is so cool?

Unlike a typical one-off GPT prompt, OpenAI Assistants can be trained with files, memory, and instructions so they respond exactly how you want - every time. Once you've created and refined an assistant, you can use it anywhere in your workflow to generate summaries, answer customer questions, transform data, or even write code.

This gives you more control, more consistency, and the ability to build mini-experts into your automated processes.

Here are a few example things you can do:

Create your Assistant

  1. Go to https://platform.openai.com/assistants
  1. Click "Create assistant"
  1. Give it instructions (e.g. "You're a helpful assistant for customer support tickets.")
  1. Upload any relevant files
  1. Note the assistant_id shown after creation

Use your Assistant

  1. Make sure you’ve added OpenAI to your ProcFu account (under Account → Integrations)
  1. From PWA workflow automation (GlobiFlow), use a ProcFu brick with the assistant id and prompt
  1. From Scripts inside ProcFu, simply call the open_ai_assistant function directly
    $assistantId = "asst_123...";
    $prompt = "Here's the prompt I want to send";
    $response = open_ai_assistant($assistantId, $prompt);