Custom Workflow Action is not able to use outputFields in workflow

I have custom workflow action for creating document. I have outputFields in response. But when I’m using them in other actions in workflow they are empty.

{
 "actionUrl": "https://example.com/create-document",
 "objectTypes": [
 "DEAL"
 ],
 "inputFields": [
 {
 "typeDefinition": {
 "name": "contractName",
 "type": "string",
 "fieldType": "text"
 },
 "supportedValueTypes": [
 "STATIC_VALUE"
 ],
 "isRequired": true
 },
 {
 "typeDefinition": {
 "name": "email",
 "type": "string",
 "fieldType": "text"
 },
 "supportedValueTypes": [
 "STATIC_VALUE"
 ],
 "isRequired": true
 },
 {
 "typeDefinition": {
 "name": "entityInput",
 "type": "enumeration",
 "fieldType": "select",
 "optionsUrl": "https://example.com/entities"
 },
 "supportedValueTypes": [
 "STATIC_VALUE"
 ]
 },
 {
 "typeDefinition": {
 "name": "templateId",
 "type": "enumeration",
 "fieldType": "select",
 "optionsUrl": "https://example.com/templates"
 },
 "supportedValueTypes": [
 "STATIC_VALUE"
 ]
 }
 ],
 "inputFieldDependencies": [
 {
 "dependencyType": "SINGLE_FIELD",
 "dependentFieldNames": [
 "entityInput",
 "templateId"
 ],
 "controllingFieldName": "email"
 },
 {
 "dependencyType": "SINGLE_FIELD",
 "dependentFieldNames": [
 "templateId",
 "email"
 ],
 "controllingFieldName": "entityInput"
 }
 ],
 "outputFields": [
 {
 "typeDefinition": {
 "name": "documentId",
 "type": "string",
 "fieldType": "text",
 "label": "Document ID"
 },
 "supportedValueTypes": [
 "OBJECT_PROPERTY"
 ]
 },
 {
 "typeDefinition": {
 "name": "documentName",
 "type": "string",
 "fieldType": "text",
 "label": "Document Name"
 },
 "supportedValueTypes": [
 "OBJECT_PROPERTY"
 ]
 }
 ],
 "objectRequestOptions": {
 "properties": [
 "email",
 "contractName"
 ]
 },
 "labels": {
 "en": {
 "inputFieldLabels": {
 "contractName": "Contract Name",
 "email": "Sender email",
 "entityInput": "Entity",
 "templateId": "Template"
 },
 "actionName": "Create Document",
 "actionDescription": "Create a document based on selected template and entity",
 "appDisplayName": "Document Creator",
 "actionCardContent": "Create document: {{contractName}}",
 "outputFieldLabels": {
 "documentId": "Document ID",
 "documentName": "Document Name"
 }
 }
 },
 "functions": []
}

Hey, @blackwolf3342 :waving_hand: Thanks for your including your code. That is always helpful for our community members. Hey @GiantFocal @nickdeckerdevs1 @Humashankar, do you have any suggestions or thoughts on how they might try to troubleshoot this?

Thank you very much! — Jaycee

When you reference the document id and document name, are you pulling them from action outputs?

you may be referencing the deal property instead of the items from the output

Yes, I’m pulling them from output. I use them in note body just for testing purpose.
Because I need to use them in next actions for fetching information

Do you have an install link I can test it out to see if I have the same issue?

Unfortunately no, it’s under development right now

So after few days of testing I found why it didn’t work.
The problem was that during the initial creation of the definition, the “POST_ACTION_EXECUTION” function was inserted, which was later removed through PATCH. But after testing, it turned out that this function is not removed but remains no matter how many times it is updated.
The solution was simple, recreate the definition and it worked.
Thanks to everyone who came to the help (@nickdeckerdevs1 )

Would you mind sharing your updated block of json?

I’m actively building out my first workflow actions like this and the reference would be great!

{
.....
"functions": [
 {
 "functionType": "POST_ACTION_EXECUTION",
 "functionSource": "exports.main = (event, callback) => {\r\n callback({\r\n outputFields: {\r\n myOutput: \"example output value\"\r\n }\r\n });\r\n}"
 }
]}

That part was before.
And then I’ve tried to update with:

{
.....
"functions": []
}

Which is not removing previous function definition.
So if don’t plan to use POST_ACTION_EXECUTION in you action, then when you will be creating custom action definition leave it empty

Awesome!! Thank you