APIs & Integrations

mgoswick
Colaborador

Create Specific Payload for Workflow Extension

resolver

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 Soluciones aceptada
dennisedson
Solución
Equipo de producto de HubSpot
Equipo de producto de HubSpot

Create Specific Payload for Workflow Extension

resolver

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,  

 

Ver la solución en mensaje original publicado

0 Me gusta
1 Respuesta 1
dennisedson
Solución
Equipo de producto de HubSpot
Equipo de producto de HubSpot

Create Specific Payload for Workflow Extension

resolver

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 Me gusta