Any ideas on where I should start? My first thought was to base it on this project: https://github.com/heaptracetechnology/gmail
Note: Zapier can already do this quite well but is limited to how many emails can be received and I'm not quite sure if it's real time or if it's polled on their platform, but I want this to be as real time as possible.
This also looks promising: https://github.com/huan/docker-simple-mail-forwarder and it isn't locked into Gmail's API (and would still be instantaneous-is).
I'm also considering AWS SES (Incoming) to parse to a AWS LAMBDA script if I can't make something work on Cloudron, but I'd prefer to build and run this on Clourdon.
Which of these three directions would you go?
Just tried it out: https://demo.espocrm.com/?lang=en_US#EmailFilter/create
That comes close, but just forwards an email to another email. I'm trying to convert can email to then parse it into a web hook.
So I've basically done this inside the packaging for Loomio by polling the
recvmailIMAP box for the app (see https://git.cloudron.io/jimcavoli/loomio-app/-/blob/master/pkg/imap_poller/loomio_relay.rb for code - in ruby because that's what I do most ). The issue over there is that
recvmailisn't playing nicely with simultaneous
sendmailright now. The upstream docker-compose arrangement uses the (somewhat long-unmaintained by all appearances)
mailinpackage (npm) at https://github.com/Flolagale/mailin. There are some other free services online that seem to do this, but most mail relays a la SendGrid, Postmark, etc. also do this as an option as well. There's many ways to approach it - yet another is that once n8n becomes available, it can also do this with its
HTTP Requestcomponents. That is just still waiting for good enough
proxyAuthsupport to make it not a complete vulnerability to deploy.
Integromat was almost EXACTLY what I needed, but it ended up polling every 15 minutes and the web hooks I need to create need to be triggered, coincidentally, before exactly 15 minutes since the code in these emails expire (which makes Integromat not a guarantee of a successful non-expired email).
Do any of the solutions you mentioned allow for instant trigger (email received) -> action (webhooks fired)?
I have no need of sending mail, just receiving it, and parsing the
text_bodyinto a custom webhook that
POSTSthose values. I'll check out n8n!
@jimcavoli I'm leaning towards using Amazon SES Incoming -> AWS LAMBDA Script -> web hook with
It sounds like the simplest option for me at this point, just gotta check what AWS charges (even though I'd rather not use LAMBDA, it's a weird language).
@lonk I'm hoping to get something like this set up soon as well. n8n looks like a great option, so am waiting on
proxyAuthand then the packaged app. Like you, I realized that aren't too many great out of the box solutions for this yet.
@lonk That's a totally valid, effective way to do it. Probably the most instantaneous of all the things mentioned, since it seems speed/latency is a priority for you. Lambda's not that bad to write code for - if you get pretty advanced with it, you can really run nearly any language on the platform, though the officially supported Java, Go, PowerShell, Node.js, C#, Python, and Ruby are the easiest options. You've got a lot of choices there.