APIs & Integrations

mgoswick
Contributor

Create Specific Payload for Workflow Extension

SOLVE

Our team is trying to build out a workflow extension to post to an API endpoint. One issue we've run into is that the Workflow Extensions posts the data in a way that includes extra information and is not structured in a way the API endpoint is expecting it. Is there a way to adjust the actual body of the Workflow Extension post to have the data properly structered for the send (included having nested items)?

 

Expected Format:

{
  "identifier": "test@example.com",
  "test": true,
  "requestInformation": "Very Long String",
  "purposes": [
  {
    "Id": "96bd1d28-8205-40b9-ab54-9ccbb7a05d9a"
  }
  ]
}


Actual Format: 

"origin": {
      "portalId": XXXXXX,
      "actionDefinitionId": XXXX,
      "actionDefinitionVersion": 1,
      "extensionDefinitionId": XXXX,
      "extensionDefinitionVersionId": 1
    },
    "context": {
      "source": "WORKFLOWS",
      "workflowId": 39528560
    },
    "object": {
      "objectId": 145269551,
      "objectType": "CONTACT"
    },
    "fields": {
      "identifier": "test@example.com",
      "test": "true",
      "requestInformation": "Very Long String",
      "purposes": "[{ Id: 96bd1d28-8205-40b9-ab54-9ccbb7a05d9a}]"
    },
    "callbackId": "ap-XXXXXX-XXXXXXXXX-7-0",
    "inputFields": {
      "identifier": "test@example.com",
      "test": "true",
      "requestInformation": "Very Long String",
      "purposes": "[{ Id: 96bd1d28-8205-40b9-ab54-9ccbb7a05d9a}]"
    }
  }

 

1 Accepted solution
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Create Specific Payload for Workflow Extension

SOLVE

hi @mgoswick ,

Sorry for the slow response.  The payload cannot be manipulated.  If you have suggestions on updating this, you should add it to the Ideas board

 

Hopefully, you have worked something out!

 

Thanks,  

 

View solution in original post

0 Upvotes
1 Reply 1
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Create Specific Payload for Workflow Extension

SOLVE

hi @mgoswick ,

Sorry for the slow response.  The payload cannot be manipulated.  If you have suggestions on updating this, you should add it to the Ideas board

 

Hopefully, you have worked something out!

 

Thanks,  

 

0 Upvotes