Dears,
I have created a webhook in the workflow and added it as a trigger. I am triggering it via Postman with the following details:
URL: https://api-na1.hubapi.com/automation/v4/webhook-triggers/X XXXX
Data in the Body:
{ “firstname”: “mod”, “lastname”: “ree”, “midname”: “Q.”, “email”: “test@gmail.com” }
Could you please guide me on how I can access the posted data from the webhook within the custom code inside the workflow?
i tried to log the event always empty:
exports.main = async (event, callback) => {
/*****
Use inputs to get data from any action in your workflow and use it in your code instead of having to use the HubSpot API.
*****/
const email = event.inputFields['email'];
/*****
Use the callback function to output data that can be used in later actions in your workflow.
*****/
callback({
outputFields: {
email: email
}
});
}