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.