I want to create an app that turns an email into a web hook
-
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?
-
@lonk Try EspoCRM?
-
@marcusquinn said in I want to create an app that turns an email into a web hook:
EspoCRM
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.
-
@lonk Not sure, it connects to emails, has mail filters and events, and has webhooks (... Administration).
Maybe Integromat would give a quick & dirty fix?
Otherwise maybe it's app packaging the above for you
-
So I've basically done this inside the packaging for Loomio by polling the
recvmail
IMAP 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 thatrecvmail
isn't playing nicely with simultaneoussendmail
right now. The upstream docker-compose arrangement uses the (somewhat long-unmaintained by all appearances)mailin
package (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 itsEmailReadImap
andHTTP Request
components. That is just still waiting for good enoughproxyAuth
support to make it not a complete vulnerability to deploy. -
@marcusquinn said in I want to create an app that turns an email into a web hook:
Integromat
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).
-
@jimcavoli said in I want to create an app that turns an email into a web hook:
n8n
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
sender
,recipient
,subject
, andtext_body
into a custom webhook thatPOSTS
those values. I'll check out n8n! -
@jimcavoli I'm leaning towards using Amazon SES Incoming -> AWS LAMBDA Script -> web hook with
from
,recipient
,subject
, andtext_content
in thePOST
.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
proxyAuth
and 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.