Workflow API vague error messages (Internal error)

Help_sq
Member

I am experiencing some strange occurrences with the workflows API, specifically, I am unable to POST a new workflow action most times I've tried, even when the payload is the exact same. I did first delete the created action via the DELETE endpoint before trying again with the exact same payload. I currently have one action created but here is the payload I am currently trying that keeps failing:

 

 

const definitionResponse = await axios.post(
            "https://api.hubapi.com/automationextensions/v1/definitions",
            {
                integrationAppId: <<redacted>>,
                extensionName: "Create a Charge",
                webhookUrl:
                    <<redacted>>,
                fieldMetadata: [
                    {
                        label: "Product Name",
                        key: "product_name",
                        fieldType: "TEXT",
                        values: [
                            {
                                type: "STATIC_VALUE",
                                allowsMergeTags: true,
                            },
                        ],
                    },
                    {
                        label: "Amount",
                        key: "amount",
                        fieldType: "NUMBER",
                    },
                    {
                        label: "Subscription Plan",
                        key: "subscription_plan",
                        fieldType: "SELECT",
                        values: [
                            {
                                type: "STATIC_VALUE",
                                options: [
                                    {
                                        label: "U.S. Dollar",
                                        displayOrder: 1,
                                        hidden: false,
                                        readOnly: true,
                                        doubleData: null,
                                        description: null,
                                        value: "usd",
                                        text: "U.S. Dollar",
                                    },
                                    {
                                        label: "Canadian Dollar",
                                        displayOrder: 2,
                                        hidden: false,
                                        readOnly: true,
                                        doubleData: null,
                                        description: null,
                                        value: "cad",
                                        text: "Canadian Dollar",
                                    },
                                    {
                                        label: "Euro",
                                        displayOrder: 2,
                                        hidden: false,
                                        readOnly: true,
                                        doubleData: null,
                                        description: null,
                                        value: "eur",
                                        text: "Euro",
                                    },
                                ],
                            },
                        ],
                    },
                    {
                        label: "<<redacted>> API Key",
                        key: "api_key",
                        fieldType: "TEXT",
                        values: [
                            {
                                type: "STATIC_VALUE",
                                allowsMergeTags: true,
                            },
                        ],
                    },
                ],
            },
            {
                params: {
                    hapikey: "<<redacted>>",
                    applicationId: <<redacted>>,
                },
            },
        )

 

0 Upvotes
3 Replies 3
dennisedson
Community Manager

@Teun , anything jump out to you here?

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes
Teun
Guide | Diamond Partner

Hi @Help_sq ,

 

What kind of errors do you get when you try to POST this request? You should be able to get some detailed errors using Axios. Could you try to give us some logs?

Did my answer solve your issue? Help the community by marking it as the solution.
Help_sq
Member

@Teun My apologies for not including this earlier but this is the response data 

{
  status: 'error',
  message: 'internal error',
  correlationId: 'c34bc6e0-f0dd-40ed-a91a-fdd8eebad6a1'
}
0 Upvotes