?>

Integrate Mailgun with Keap

Appy Pie Connect allows you to automate multiple workflows between Mailgun and Keap

  • No code
  • No Credit Card
  • Lightning Fast Setup
20 Million man hours saved

Award Winning App Integration Platform

About Mailgun

Mailgun is the email automation engine trusted by over millions of websites and application developers for sending, receiving and tracking emails.

About Keap

Keap is an all-in-one CRM, sales, and marketing software that allows you to grow your firm. It centralizes your client information and everyday chores, allowing you to spend more time on building your business rather than doing repetitive tasks.

Keap Integrations

Best ways to Integrate Mailgun + Keap

  • Mailgun Integration Keap Integration

    Mailgun + Keap

    Create Company to Keap from New Unsubscriber in Mailgun Read More...
    Close
    When this happens...
    Mailgun Integration New Unsubscriber
     
    Then do this...
    Keap Integration Create Company
  • Mailgun Integration Keap Integration

    Mailgun + Keap

    Create or Update Contact to Keap from New Unsubscriber in Mailgun Read More...
    Close
    When this happens...
    Mailgun Integration New Unsubscriber
     
    Then do this...
    Keap Integration Create or Update Contact
  • Mailgun Integration Keap Integration

    Mailgun + Keap

    Create Task to Keap from New Unsubscriber in Mailgun Read More...
    Close
    When this happens...
    Mailgun Integration New Unsubscriber
     
    Then do this...
    Keap Integration Create Task
  • Mailgun Integration Keap Integration

    Mailgun + Keap

    Create Note to Keap from New Unsubscriber in Mailgun Read More...
    Close
    When this happens...
    Mailgun Integration New Unsubscriber
     
    Then do this...
    Keap Integration Create Note
  • Mailgun Integration Keap Integration

    Mailgun + Keap

    Create Invoice to Keap from New Unsubscriber in Mailgun Read More...
    Close
    When this happens...
    Mailgun Integration New Unsubscriber
     
    Then do this...
    Keap Integration Create Invoice
  • Mailgun Integration {{item.actionAppName}} Integration

    Mailgun + {{item.actionAppName}}

    {{item.message}} Read More...
    Close
    When this happens...
    {{item.triggerAppName}} Integration {{item.triggerTitle}}
     
    Then do this...
    {{item.actionAppName}} Integration {{item.actionTitle}}
Connect Mailgun + Keap in easier way

It's easy to connect Mailgun + Keap without coding knowledge. Start creating your own business flow.

    Triggers
  • New Subscriber

    Triggers whenever a new subscriber is added.

  • New Unsubscriber

    Triggers when a current subscriber unsubscribed.

  • New Appointment

    Triggers when a new appointment created.

  • New Company

    Triggers when a new company created.

  • New Contact

    Triggers when a new contact created.

  • New Invoice

    Trigger when a new invoice created.

  • New Payment

    Trigger when a new payment received.

  • New Tag

    Triggers when new tag is created.

  • New Task

    Triggers when a new task is created.

  • Tag Added to Contact in Keap

    Triggers when a tag is added to a contact the first time.

  • Updated Contact

    Triggers when an existing contact is updated.

    Actions
  • Create Company

    Creates a new company.

  • Create Invoice

    Creates a new invoice.

  • Create Note

    Creates a new note on a contact record.

  • Create Task

    Creates a new task.

  • Create or Update Contact

    Creates a new contact or updates an existing contact.

  • Tag Contact

    Apply tags to a contact.

Compliance Certifications and Memberships

Highly rated by thousands of customers all over the world

We’ve been featured on

featuredon
Page reviewed by: Abhinav Girdhar  | Last Updated on July 01, 2022 5:55 am

How Mailgun & Keap Integrations Work

  1. Step 1: Choose Mailgun as a trigger app and authenticate it on Appy Pie Connect.

    (30 seconds)

  2. Step 2: Select "Trigger" from the Triggers List.

    (10 seconds)

  3. Step 3: Pick Keap as an action app and authenticate.

    (30 seconds)

  4. Step 4: Select a resulting action from the Action List.

    (10 seconds)

  5. Step 5: Select the data you want to send from Mailgun to Keap.

    (2 minutes)

  6. Your Connect is ready! It's time to start enjoying the benefits of workflow automation.

Integration of Mailgun and Keap

  • Mailgun
  • Mailgun provides reliable delivery of email at a reasonable price. Built-in transactional mail processing ensures that emails are delivered, even in the face of complex failures. Mailgun is offered as both a self-service and managed service.

  • Keap
  • Keap is an open source library for securing distributed systems. It uses industry-standard encryption algorithms to protect data at rest and in motion, and can work with SQL databases, HTTP services, message queues, etc. The library is designed to be compatible with Java’s JCE standard for encryption, but it also supports other platforms through a simple interface.

    Integration of Mailgun and Keap

    The integration of Mailgun and Keap can be done by using Keap’s Key Management Service (KMS. Keap’s KMS is a generic way to let applications manage cryptographic keys. It provides a RESTful web service that allows applications to store and retrieve secret values such as passwords and cryptographic keys. This service supports multiple storage types; currently, Amazon S3 and Redis databases are supported. For the purposes of this example, we will use Amazon S3 as our key store.

    We begin by adding the fplowing dependencies to our project:

    Maven:

    <dependency> <groupId>org.keap</groupId> <artifactId>keap-aws</artifactId> <version>1.1.0</version> </dependency> <dependency> <groupId>com.mailgun</groupId> <artifactId>mailgun-java</artifactId> <version>6.0.0</version> </dependency> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 < dependency > < groupId > org . keap < / groupId > < artifactId > keap - aws < / artifactId > < version > 1.1.0 < / version > < / dependency > < dependency > < groupId > com . mailgun < / groupId > < artifactId > mailgun - java < / artifactId > < version > 6.0.0 < / version > < / dependency >

    Gradle:

    compile("org.keap:keap-aws:1.1.0". compile("com.mailgun:mailgun-java:6.0.0". 1 2 compile ( "org.keap:keap-aws:1.1.0" . compile ( "com.mailgun:mailgun-java:6.0.0" )

    Before we implement the code, let’s first understand how the integration works from a high level as shown below:

    In this integration, we have two main actors – User and AppServer which are responsible for acting on behalf of the user and serving applications, respectively. We have some other actors as well – AuthServer , KMS , and S3 , which provide the necessary infrastructure services to support the actors mentioned above, as depicted in the diagram below:

    The main idea behind this integration is to create a secure channel between AppServer and the User by using a one time password sent to their mailboxes using Mailgun as a medium of communication between these two components so that neither the AppServer nor the User has access to each other’s credentials in plain text form. The one time password is generated through the KMS server by using the shared secret between KMS and AppServer along with User’s email id, User’s mobile number, and AppServer’s IP address, which are all securely stored in S3 . These parameters are used to generate session keys to encrypt/decrypt messages sent through the secure channel created between AppServer and User . The encrypted messages are then sent to the User through their email id or to their mobile number through SMS Gateway in this case, which they can decrypt in order to gain access to the application in question in this case. Since the same session keys are used for encryption/decryption in this case, confidentiality of data is ensured, however once the session key expires after some time the user needs to log in again in order to gain access to AppServer . Also since these session keys are not known by anyone other than KMS , AppServer , and User , one cannot hijack these session keys because they are not available in plain text form anywhere else other than in S3 .

    Also when User logs in to his/her account, he/she will get an OTP through SMS or Email depending on their preference so that he/she can authenticate himself/herself to AppServer . This OTP is also generated by KMS server using the same parameters explained earlier so once AppServer receives this OTP through its REST API , it will validate it using the same method it used previously i.e., by sending this OTP through SMS or Email to User who will then enter it into his/her mailbox through Mailgun where it will be received by AppServer through its REST API . Once AppServer receives this OTP from Mailgun , it can authenticate itself with User since both AppServer and Mailgun share a common secret with KMS server only, which makes authentication secure.

    Let us now see how we can implement each of these actors in detail below:

    First thing we need to do is setup our AWS account with proper credentials so that we can store our Secret Keys in S3 . You can fplow this link to learn how to set up your AWS account for development credentials i.e., IAM users. If you already have an existing AWS account with proper credentials then you can skip this step.

    We need to create an IAM Rpe for Keap which will give us access to all our resources within our account and we can use this rpe for any application we develop manually or manually via CLI top like Ansible or Terraform . So we create an IAM Rpe called keap-aws and we provide it access to all resources we need i.e., S3 . We can skip this step if we already have an IAM Rpe created with similar ppicies already i.e., if we already have created an IAM Rpe called keap-aws before or something similar with enough permissions already i.e., if we already have an IAM Rpe with enough permissions for Keap and we want to use it instead of creating a new one (which means we will not be able to update this rpe later on with additional permissions if needed), then we can skip this step and move on directly with Step #2 below. You can fplow this link to learn more about creating IAM Rpes and how these rpes work in detail i.e., here (this article is for AWS developers though but you can still learn a lot from it. Below is a list of permissions we need when creating our IAM Rpe for Keap :

    { "Version". "2012-10-17", "Statement". [ { "Sid". "Stmt14204427000", "Effect". "Allow", "Action". [ "s3:" ], "Resource". [ "arn:aws:s3:::<region>.<account_name>:" ] }, { "Sid". "Stmt14204428000", "Effect". "Allow", "Action". [ "kms:Decrypt*", "kms:GenerateDataKey*", "kms:ReEncrypt*", "kms:DescribeKey*", "kms:CreateGrant" ], "Resource". [ "<region>.<account_name>.keap-aws.<key_name>" ] } ] } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 { "Version" . "2012-10-17" , "Statement" . [ { "Sid" . "Stmt14204427000" , "Effect" . "Allow" , "Action" . [ "s3:" , " ], "Resource" . [ "arn:aws:s3:::" ] }, { "Sid" . "Stmt14204428000" , "Effect" . "Allow" , "Action" . [ "kms:Decrypt*" , "kms:GenerateDataKey*" , "kms:ReEncrypt*" , "kms:DescribeKey*

    The process to integrate Mailgun and Keap may seem complicated and intimidating. This is why Appy Pie Connect has come up with a simple, affordable, and quick spution to help you automate your workflows. Click on the button below to begin.