Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. App Packaging & Development
  3. I want to create an app that turns an email into a web hook

I want to create an app that turns an email into a web hook

Scheduled Pinned Locked Moved App Packaging & Development
12 Posts 4 Posters 2.1k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LonkleL Offline
      LonkleL Offline
      Lonkle
      wrote on last edited by
      #1

      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.

      LonkleL 1 Reply Last reply
      0
      • LonkleL Lonkle

        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.

        LonkleL Offline
        LonkleL Offline
        Lonkle
        wrote on last edited by Lonkle
        #2

        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?

        marcusquinnM 1 Reply Last reply
        0
        • LonkleL Lonkle

          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?

          marcusquinnM Offline
          marcusquinnM Offline
          marcusquinn
          wrote on last edited by
          #3

          @lonk Try EspoCRM?

          Web Design https://www.evergreen.je
          Development https://brandlight.org
          Life https://marcusquinn.com

          LonkleL 1 Reply Last reply
          0
          • marcusquinnM marcusquinn

            @lonk Try EspoCRM?

            LonkleL Offline
            LonkleL Offline
            Lonkle
            wrote on last edited by
            #4

            @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.

            marcusquinnM 1 Reply Last reply
            0
            • LonkleL Lonkle

              @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.

              marcusquinnM Offline
              marcusquinnM Offline
              marcusquinn
              wrote on last edited by
              #5

              @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 🙂

              Web Design https://www.evergreen.je
              Development https://brandlight.org
              Life https://marcusquinn.com

              jimcavoliJ LonkleL 2 Replies Last reply
              0
              • marcusquinnM marcusquinn

                @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 🙂

                jimcavoliJ Offline
                jimcavoliJ Offline
                jimcavoli
                App Dev
                wrote on last edited by
                #6

                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 that recvmail isn't playing nicely with simultaneous sendmail 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 its EmailReadImap and HTTP Request components. That is just still waiting for good enough proxyAuth support to make it not a complete vulnerability to deploy.

                LonkleL 1 Reply Last reply
                2
                • marcusquinnM marcusquinn

                  @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 🙂

                  LonkleL Offline
                  LonkleL Offline
                  Lonkle
                  wrote on last edited by Lonkle
                  #7

                  @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).

                  1 Reply Last reply
                  1
                  • jimcavoliJ jimcavoli

                    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 that recvmail isn't playing nicely with simultaneous sendmail 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 its EmailReadImap and HTTP Request components. That is just still waiting for good enough proxyAuth support to make it not a complete vulnerability to deploy.

                    LonkleL Offline
                    LonkleL Offline
                    Lonkle
                    wrote on last edited by Lonkle
                    #8

                    @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, and text_body into a custom webhook that POSTS those values. I'll check out n8n!

                    jimcavoliJ 1 Reply Last reply
                    1
                    • LonkleL Lonkle

                      @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, and text_body into a custom webhook that POSTS those values. I'll check out n8n!

                      jimcavoliJ Offline
                      jimcavoliJ Offline
                      jimcavoli
                      App Dev
                      wrote on last edited by
                      #9

                      @lonk Pretty much either of them, to my understanding, save my custom ruby code. That's polled at whatever frequency by the scheduler.

                      LonkleL 1 Reply Last reply
                      0
                      • jimcavoliJ jimcavoli

                        @lonk Pretty much either of them, to my understanding, save my custom ruby code. That's polled at whatever frequency by the scheduler.

                        LonkleL Offline
                        LonkleL Offline
                        Lonkle
                        wrote on last edited by
                        #10

                        @jimcavoli I'm leaning towards using Amazon SES Incoming -> AWS LAMBDA Script -> web hook with from, recipient, subject, and text_content in the POST.

                        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).

                        T jimcavoliJ 2 Replies Last reply
                        1
                        • LonkleL Lonkle

                          @jimcavoli I'm leaning towards using Amazon SES Incoming -> AWS LAMBDA Script -> web hook with from, recipient, subject, and text_content in the POST.

                          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).

                          T Offline
                          T Offline
                          thetomester13
                          App Dev
                          wrote on last edited by
                          #11

                          @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.

                          1 Reply Last reply
                          0
                          • LonkleL Lonkle

                            @jimcavoli I'm leaning towards using Amazon SES Incoming -> AWS LAMBDA Script -> web hook with from, recipient, subject, and text_content in the POST.

                            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).

                            jimcavoliJ Offline
                            jimcavoliJ Offline
                            jimcavoli
                            App Dev
                            wrote on last edited by
                            #12

                            @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.

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                              • Login

                              • Don't have an account? Register

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Bookmarks
                              • Search