Hey all — I have a question about custom workflow actions. How can I add a header to them?
I’m sure it’s possible, but I haven’t been able to figure it out. I think I might need to use a PRE_ACTION_EXECUTION function but I’m not sure.
My action is currently working, but I want to secure the endpoint and ask the user to provide a token via UI, using one of the action inputs (open to other methods if you have better suggestions!). The idea is to then add an Authorization: Bearer token header to the action.
This is a simplified version of the payload:
{
“actionUrl”: “<BACKEND_URL>”,
“published”: false,
“inputFields”: [
{
“typeDefinition”: {
“name”: “workspace”,
“type”: “enumeration”,
“fieldType”: “select”,
“options”: [],
“optionsUrl”: “<REDACTED>”,
…
],
“objectRequestOptions”: {
“properties”: [
“firstname”,
“email”,
“lastname”
]
},
“labels”: {
“en”: {
“inputFieldLabels”: {
“workspace”: “Workspace”,
“phone”: “Lead Phone Number”,
“prompt”: “Prompt”
},
“outputFieldLabels”: {
“call_analysis”: “Call Analysis”,
“call_id”: “Call ID”,
“call_initiated”: “Call Initiated”
},
“actionName”: “Make Phone Call”,
“actionDescription”: “”,
“actionCardContent”: “”
}
},
“objectTypes”: [
“0-1”
],
“outputFields”: [
{
“typeDefinition”: {
“name”: “call_analysis”,
“type”: “string”,
“fieldType”: “text”,
…
],
“id”: “<REDACTED>”,
“revisionId”: “1”,
“functions”: []
}
Thanks!!