APIs & Integrations

mgoswick
Contributeur

Create Specific Payload for Workflow Extension

Résolue

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 Solution acceptée
dennisedson
Solution
Équipe de développement de HubSpot
Équipe de développement de HubSpot

Create Specific Payload for Workflow Extension

Résolue

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,  

 

Voir la solution dans l'envoi d'origine

0 Votes
1 Réponse
dennisedson
Solution
Équipe de développement de HubSpot
Équipe de développement de HubSpot

Create Specific Payload for Workflow Extension

Résolue

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 Votes