Using serverless functions in Custom Workflow Actions

Hi!
I was trying to use and create functions for custom workflow actions but it does not display in my workflow defination once created. What I mean by that is, I am sending the below payload to create a custom workflow action along with a simple function:

{

“actionUrl”: “The premium domain name webhook.com is for sale!”,

“published”: true,

“inputFields”: [],

“labels”: {

    "en": {

        "actionName": "CDP-TP-1 opt-in consolidation",

        "actionDescription": "Workflow Action to consolidate opt-in and provide it as result for BU-1",

        "appDisplayName": "CDP-TP-1 OPT-IN App",

        "actionCardContent": "CDP-TP-1 OPT-IN Automation"

    }

},

“objectTypes”: [

"0-1"

],

“objectRequestOptions”: {

"properties": \[

  "customer\_id",

  "email"

]

},

“functions”: [

    {

        "functionType":"PRE\_ACTION\_EXECUTION",

        "functionSource":"exports.main = (event, callback) => {callback({\\"data\\": {\\"field\\": \\"email\\",\\"phone\\": \\"1234567890\\" }});"

    }

]

}
Now when I fetch my function defination, it gives me this where only the function type is mentioned but not the source.


@CDP2023 wrote:

Hi!
I was trying to use and create functions for custom workflow actions but it does not display in my workflow defination once created. What I mean by that is, I am sending the below payload to create a custom workflow action along with a simple function:

{

“actionUrl”: “The premium domain name webhook.com is for sale!”,

“published”: true,

“inputFields”: [],

“labels”: {

    "en": {



        "actionName": "CDP-TP-1 opt-in consolidation",



        "actionDescription": "Workflow Action to consolidate opt-in and provide it as result for BU-1",



        "appDisplayName": "CDP-TP-1 OPT-IN App",



        "actionCardContent": "CDP-TP-1 OPT-IN Automation"



    }



},

“objectTypes”: [

"0-1"

],

“objectRequestOptions”: {

"properties": \[



  "customer\_id",



  "email"



]

},

“functions”: [

    {



        "functionType":"PRE\_ACTION\_EXECUTION",



        "functionSource":"exports.main = (event, callback) => {callback({\\"data\\": {\\"field\\": \\"email\\",\\"phone\\": \\"1234567890\\" }});"



    }



]

}
Now when I fetch my function defination, it gives me this where only the function type is mentioned but not the source.


I am facing the same issue. Did you get your answer?