I use Node-RED in Home Assistant (Hass.io running in Docker on Ubuntu 64). My current project is to move all messages -- texts, emails, iOS notifications, etc. generated by the various components in my system -- to iOS notifications only.
My Leviton OmniPro II is configured to send all of its notifications to a dedicated Gmail address. I'm able to retrieve those emails in a Node-RED flow and would like to now send the payload on to a Call Service node that notifies my iOS device. Here are the results from the Node-RED email node:
[{"id":"16a60954.5e121f","type":"api-call-service","z":"d5b4d090.56c5e","name":"Notify iOS","server":"36944218.4145ce","version":1,"service_domain":"notify","service":"ios_grant_lewis_iphone","entityId":"","data":"{\"message\":\"{{payload}}\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":510,"y":120,"wires":[[]]},{"id":"5c57e0e9.9bba5","type":"debug","z":"d5b4d090.56c5e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":490,"y":80,"wires":[]},{"id":"e1f4beff.b431f8","type":"e-mail in","z":"d5b4d090.56c5e","name":"","protocol":"IMAP","server":"imap.gmail.com","useSSL":true,"port":"993","box":"INBOX","disposition":"Read","criteria":"UNSEEN","repeat":"30","fetch":"auto","inputs":0,"x":100,"y":80,"wires":[["5c57e0e9.9bba5","16a60954.5e121f"]]},{"id":"36944218.4145ce","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true}]
As the above shows, there's something about the payload that's causing an API error. I've exhausted every avenue I can find -- change nodes, function nodes, etc -- trying to solve the problem, all without success. Any insight woudl be very much appreciated.