Hello all, I’ve been using incoming mailgun Webhooks to pistons with $args for a while and it’s been working fine, unfortunately mailgun changed their outbound webhooks to use json payload, for the life of me I couldn’t find an answer if it’s possible to parase those incoming hooks at this time? The json content does show up In the piston log. Thanks
Webcore Logs:
testing on $args.recipient
Comparison (dynamic) event-data:campaigns:[], delivery-status:[attempt-no:1, certificate-verified:true, code:250, description:, message:OK, mx-host:gmail-smtp-in.l.google.com, session-seconds:0.5049421787261963, tls:true, utf8:true], envelope:[sender:XXXXXX, sending-ip:198.61.254.13, targets:XXXXXXX, transport:smtp], event:delivered, flags:[is-authenticated:true, is-routed:false, is-system-test:false, is-test-mode:false], id:239MfwdoSYCSYqy240v-MQ, log-level:info, message:[attachments:[], headers:[from:“XXXXXX”, message-id:20181024020117.1.8BDAAD53DD7A7249@XXXXX, subject:Test e-mail, to:], size:565], recipient:[email protected], recipient-domain:gmail.com, storage:key:XXXXXXXXX, url:https://sw.api.mailgun.net/XXXXX
Comparison (dynamic) null is (string) [email protected] = false
the Json payload (via webhook.site)
{
“signature”: {
“timestamp”: “1540346479”,
“token”: “XXXXX”,
“signature”: “XXXXXX”
},
“event-data”: {
“tags”: [],
“timestamp”: 1540346478.534998,
“storage”: {
“url”: “https://sw.api.mailgun.net/XXXXX”,
“key”: “XXXXX”
},
“recipient-domain”: “gmail.com”,
“id”: “XXXXX”,
“campaigns”: [],
“user-variables”: {},
“flags”: {
“is-routed”: false,
“is-authenticated”: true,
“is-system-test”: false,
“is-test-mode”: false
},
“log-level”: “info”,
“envelope”: {
“sending-ip”: “198.61.254.13”,
“sender”: “XXXXX”,
“transport”: “smtp”,
“targets”: “XXXXXX”
},
“message”: {
“headers”: {
“to”: “”,
“message-id”: “20181024020117.1.8BDAAD53DD7A7249@XXXXX”,
“from”: “XXXXX”,
“subject”: “Test e-mail”
},
“attachments”: [],
“size”: 565
},
“recipient”: "[email protected]",
“event”: “delivered”,
“delivery-status”: {
“tls”: true,
“mx-host”: “gmail-smtp-in.l.google.com”,
“attempt-no”: 1,
“description”: “”,
“session-seconds”: 0.5049421787261963,
“utf8”: true,
“code”: 250,
“message”: “OK”,
“certificate-verified”: true
}
}
}