OpenAI GPT Assistant Action

I'm trying to reproduce the OpenAI Dev-Day presentation where they use a workflow as the base of an action using Retool.

I am able to get my workflow working and returning data (verified 15 times with curl). No matter what I do I am not able to get the action to pass the authentication. The documentation isn't much of a help.

Generally the webhook on a workflow includes the api key, so I am sending that through as a parameter in the specification. Again, works fine in cURL, but keeps failing in OpenAI.

There is an option to use different authentication methods in the action, but that doesn't work either (I've tried basic, bearer, and with a custom header), they all fail. Find the OpenAPI specification below and the request chain. I've changed a few of the ids and the api key.

Anyone who figured this out and can help would be appreciated.

openapi: "3.0.0"
info:
title: "Retool Workflow Start Trigger"
version: "1.0.0"
servers:

  • url: "https://api.retool.com"
    paths:
    /v1/workflows/workflow-id/startTrigger:
    post:
    operationId: "startWorkflow"
    parameters:
    - name: "workflowId"
    in: "path"
    required: true
    schema:
    type: "string"
    - name: "workflowApiKey"
    in: "query"
    required: true
    schema:
    type: "string"
    default: "retool_wk_random"
    - name: "environment"
    in: "query"
    required: true
    schema:
    type: "string"
    responses:
    "200":
    description: "Workflow started successfully"
    "400":
    description: "Bad request"
    "401":
    description: "Unauthorized"
    "500":
    description: "Server error"

[debug] Calling HTTP endpoint
{
"domain": "api.retool.com",
"method": "post",
"path": "/v1/workflows/workflow-id/startTrigger",
"operation": "startWorkflow",
"operation_hash": "93f3781f43e6aaf40f9db23c64e72b109a13c9fa",
"is_consequential": true,
"params": {
"workflowId": "workflow-id",
"workflowApiKey": "api-key",
"environment": "environment"
}
}
[debug] Response received
{
"function_name": "startWorkflow",
"domain": "api.retool.com",
"message": "The requested action requires approval",
"action_id": "g-cee639a3327a7e2599a4e08efda66eb61a545a80"
}
[debug] Calling HTTP endpoint
{
"domain": "api.retool.com",
"method": "post",
"path": "/v1/workflows/workflow-id/startTrigger",
"operation": "startWorkflow",
"operation_hash": "93f3781f43e6aaf40f9db23c64e72b109a13c9fa",
"is_consequential": true,
"params": {
"workflowId": "workflow-id",
"workflowApiKey": "api-key",
"environment": "environment"
}
}
[debug] Response received
{
"response_data": {
"success": false,
"message": "Authentication failure. Incorrect private key."
},
"status_code": 401,
"action_id": "g-cee639a3327a7e2599a4e08efda66eb61a545a80"
}
Talked to api.retool.com
I attempted to call the API using the startWorkflow operation, but it was unsuccessful due to an authentication issue, specifically an incorrect private key. To proceed, please ensure that the correct workflow ID, API key, and environment details are provided.

I'm curious as well- did you ever figure this out?

Yes, I did, but I ended up going away from Retool. The API calls are a bit finicky in OpenAI. You have to pass the authentication through directly in URL and it ignores any values in the schema. Those values have to be passed through in the prompt or added into the URL or hardcoded into the workflow.

So if you wanted it to pull a set of tasks from Asana, then the prompt has to include the GID that you want to pull. Otherwise you'd have to hardcode the Workspace and Assignee in the workflow.

Then you could say, "Find my tasks". Once it pulls your task and it returns the IDs, it can use the schema to see more detail on one task, for example.

I think in a lot of cases you don't need Retool and it's better to just call the API directly. Because if you have to go through and figure out how to communicate with the API through Retool, it's basically just adding a layer of complexity.

I suppose if you have more complicated actions you want or to chain actions, then Retool would be a no-brainer.