Use webhook payload json as text and send the text to slack integration

Cool, so it looks like we have:

{ event_type: 'survey_response.updated', event_id: 'b8d057c59327541d7ec2104c0a9a255ad1997fb00831b9c6bbf09561e6d5cbd0', event_data: { id: '5435', person: { id: '5975', email: 'charlie_gravis@example.com', name: 'Charlie Gravis', created_at: 1672843814 }, survey_type: 'nps', score: 9, comment: 'Your service is fast and flawless!', permalink: 'https://app.delighted.com/r/5pFDpmlyC8GUc5oxU6USto5VonSKAqOa', created_at: 1672843874, updated_at: 1672844474, person_properties: null, notes: [], tags: [], additional_answers: [ [Object], [Object], [Object], [Object], '0': [Object], '1': [Object], '2': [Object], '3': [Object] ] } }

as our data object.

Which part of this data object would you like to send in your slack message?

{{startTrigger.data.event_data.comment}}

would give you the comment!

If you want to send the whole data object as a string, you could do something like:

{{JSON.stringify(startTrigger.data)}}

Would either of those work, or are you interested in accessing something else?

1 Like