Getting data sent as attachments in a webhook when using AI Agents
Greetings, I’m using AI Agents. The channel I’m using is a webhook to connect to WhatsApp. The problem is that I only receive text messages. I can’t see when attachments are sent. I use the webhook payload provided in the Kore documentation.
This is the webhook payload.
payload: {
“session”: {
“new”: true
},
“message”: {
“type”: “text/event/template”,
“val”: “Hi/ON_CONNECT/{}”,
“attachments”:‘<attachment links as array of objects. [{‘url’:‘https://- - ‘},{ “fileName”: “Kore_ai_Logo%405x.png”, “fileType”:“image”, “fileId”: “6163e17bf60e0a7e4799f423” }]>’
},
“from”: {
“id”: ‘<unique-id-of-sender(mandatory)>’,
“userInfo”: {
“firstName”: ‘<first-name(optional)>’,
“lastName”: ‘<second-name(optional)>’,
“email”: ‘<email(optional)>’
}
},
“to”: {
“id”: ‘<unique-id-of-recipient(mandatory)>’,
“groupInfo”: { //If message comes from a group/team/room
“id”: ‘’,
“name”: ‘<group-name(optional)>’
}
},
“mergeIdentity”:’’,
“metaTags”: {// metatags to be captured for this message
“userLevelTags”: [],
“sessionLevelTags”: [[]],
“messageLevelTags”: []
},
“preferredChannelForResponse”: “” // the channel context to be used to generate a response,
}
They will know how to have the attachments within agentic