← Mailgun + Pipedrive integrations

Add Activity with Pipedrive API on New Click (Instant) from Mailgun API

Pipedream makes it easy to connect APIs for Pipedrive, Mailgun and 2,500+ other apps remarkably fast.

Trigger workflow on
New Click (Instant) from the Mailgun API
Next, do this
Add Activity with the Pipedrive API
No credit card required
Intro to Pipedream
Watch us build a workflow
Watch us build a workflow
8 min
Watch now ➜

Trusted by 1,000,000+ developers from startups to Fortune 500 companies

Adyen logo
Appcues logo
Bandwidth logo
Checkr logo
ChartMogul logo
Dataminr logo
Gopuff logo
Gorgias logo
LinkedIn logo
Logitech logo
Replicated logo
Rudderstack logo
SAS logo
Scale AI logo
Webflow logo
Warner Bros. logo
Adyen logo
Appcues logo
Bandwidth logo
Checkr logo
ChartMogul logo
Dataminr logo
Gopuff logo
Gorgias logo
LinkedIn logo
Logitech logo
Replicated logo
Rudderstack logo
SAS logo
Scale AI logo
Webflow logo
Warner Bros. logo

Developers Pipedream

Getting Started

This integration creates a workflow with a Mailgun trigger and Pipedrive action. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Select this integration
  2. Configure the New Click (Instant) trigger
    1. Connect your Mailgun account
    2. Select a Domain Name
    3. Configure Mailgun webhook signing key
  3. Configure the Add Activity action
    1. Connect your Pipedrive account
    2. Configure Subject
    3. Select a Type
    4. Optional- Select a User ID
    5. Optional- Select a Deal ID
    6. Optional- Select a Lead ID
    7. Optional- Select a Organization ID
    8. Optional- Select a Project ID
    9. Optional- Configure Due Date
    10. Optional- Configure Due Time
    11. Optional- Configure Duration
    12. Optional- Configure Busy
    13. Optional- Configure Done
    14. Optional- Configure Location
    15. Optional- Select one or more Participants
    16. Optional- Select one or more Attendees
    17. Optional- Configure Public Description
    18. Optional- Configure Note
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger

Details

This integration uses pre-built, source-available components from Pipedream's GitHub repo. These components are developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Trigger

Description:Emit new event when the email recipient clicked on a link in the email. Open tracking must be enabled in the Mailgun control panel, and the CNAME record must be pointing to mailgun.org. See more at the Mailgun User's Manual [Tracking Messages](https://documentation.mailgun.com/en/latest/user_manual.html#tracking-messages) section
Version:0.0.3
Key:mailgun-new-click

Mailgun Overview

The Mailgun API on Pipedream is a potent tool for automating email operations without the overhead of managing a full-fledged email server. It offers capabilities to send, receive, track, and store emails with ease. With Pipedream's serverless platform, you can trigger workflows using Mailgun events, such as inbound emails or delivery status changes, and connect them to hundreds of other services to streamline communication, marketing, and notification systems within your ecosystem.

Trigger Code

import common from "../common/http-based.mjs";

export default {
  ...common,
  key: "mailgun-new-click",
  name: "New Click (Instant)",
  description: "Emit new event when the email recipient clicked on a link in the email. " +
    "Open tracking must be enabled in the Mailgun control panel, and the CNAME record " +
    "must be pointing to mailgun.org. See more at the Mailgun User's Manual [Tracking Messages]" +
    "(https://documentation.mailgun.com/en/latest/user_manual.html#tracking-messages) " +
    "section",
  version: "0.0.3",
  dedupe: "unique",
  type: "source",
  methods: {
    ...common.methods,
    getEventName() {
      return [
        "clicked",
      ];
    },
    getEventType() {
      return [
        "CLICKED",
        "clicked",
      ];
    },
  },
};

Trigger Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
MailgunmailgunappThis component uses the Mailgun app.
Domain NamedomainstringSelect a value from the drop down menu.
Mailgun webhook signing keywebhookSigningKeystring

Your Mailgun webhook signing key, found in your Mailgun dashboard, located under Settings on the left-hand nav and then in API Keys look for webhook signing key. Required to compute the authentication signature of events.

N/Ahttp$.interface.httpThis component uses $.interface.http to generate a unique URL when the component is first instantiated. Each request to the URL will trigger the run() method of the component.

Trigger Authentication

Mailgun uses API keys for authentication. When you connect your Mailgun account, Pipedream securely stores the keys so you can easily authenticate to Mailgun APIs in both code and no-code steps.

About Mailgun

Mailgun is an email automation service built for developers. Powerful transactional email APIs enable you to send, receive, and track emails.

Action

Description:Adds a new activity. Includes `more_activities_scheduled_in_context` property in response's `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data). See the Pipedrive API docs for Activities [here](https://developers.pipedrive.com/docs/api/v1/#!/Activities). For info on [adding an activity in Pipedrive](https://developers.pipedrive.com/docs/api/v1/Activities#addActivity)
Version:0.1.7
Key:pipedrive-add-activity

Pipedrive Overview

Pipedrive API on Pipedream allows you to create powerful sales automation and data management workflows. With access to Pipedrive's CRM capabilities, you can automate deal updates, contact management, and sales reporting. Whether you're syncing customer information across platforms or triggering actions based on deal stages, Pipedream makes these integrations seamless.

Action Code

import { ConfigurationError } from "@pipedream/platform";
import constants from "../../common/constants.mjs";
import { parseObject } from "../../common/utils.mjs";
import pipedriveApp from "../../pipedrive.app.mjs";

export default {
  key: "pipedrive-add-activity",
  name: "Add Activity",
  description: "Adds a new activity. Includes `more_activities_scheduled_in_context` property in response's `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data). See the Pipedrive API docs for Activities [here](https://developers.pipedrive.com/docs/api/v1/#!/Activities). For info on [adding an activity in Pipedrive](https://developers.pipedrive.com/docs/api/v1/Activities#addActivity)",
  version: "0.1.7",
  type: "action",
  props: {
    pipedriveApp,
    subject: {
      type: "string",
      label: "Subject",
      description: "Subject of the activity",
    },
    type: {
      type: "string",
      label: "Type",
      description: "Type of the activity. This is in correlation with the `key_string` parameter of ActivityTypes.",
      async options() {
        const { data: activityTypes } = await this.pipedriveApp.getActivityTypes();
        return activityTypes.map(({
          key_string: value, name,
        }) => ({
          label: name,
          value,
        }));
      },
    },
    ownerId: {
      propDefinition: [
        pipedriveApp,
        "userId",
      ],
      description: "ID of the user whom the activity will be assigned to. If omitted, the activity will be assigned to the authorized user.",
    },
    dealId: {
      propDefinition: [
        pipedriveApp,
        "dealId",
      ],
    },
    leadId: {
      propDefinition: [
        pipedriveApp,
        "leadId",
      ],
    },
    orgId: {
      propDefinition: [
        pipedriveApp,
        "organizationId",
      ],
      description: "ID of the organization this activity will be associated with",
    },
    projectId: {
      propDefinition: [
        pipedriveApp,
        "projectId",
      ],
      description: "ID of the project this activity will be associated with",
    },
    dueDate: {
      type: "string",
      label: "Due Date",
      description: "Due date of the activity. Format: `YYYY-MM-DD`",
      optional: true,
    },
    dueTime: {
      type: "string",
      label: "Due Time",
      description: "Due time of the activity in UTC. Format: `HH:MM`",
      optional: true,
    },
    duration: {
      type: "string",
      label: "Duration",
      description: "Duration of the activity. Format: `HH:MM`",
      optional: true,
    },
    busy: {
      type: "boolean",
      label: "Busy",
      description: "Set the activity as 'Busy' or 'Free'. If the flag is set to true, your customers will not be able to book that time slot through any Scheduler links",
      optional: true,
    },
    done: {
      type: "boolean",
      label: "Done",
      description: "Whether the activity is done or not.",
      optional: true,
    },
    location: {
      type: "object",
      label: "Location",
      description: "The address of the activity. Pipedrive will automatically check if the location matches a geo-location on Google maps.",
      optional: true,
    },
    participants: {
      type: "string[]",
      label: "Participants",
      description: "List of multiple persons (participants) this activity will be associated with. If omitted, single participant from `person_id` field is used. It requires a structure as follows: `[{\"person_id\":1,\"primary\":true}]`",
      optional: true,
      propDefinition: [
        pipedriveApp,
        "personId",
      ],
    },
    attendees: {
      type: "string[]",
      label: "Attendees",
      description: "Attendees of the activity. This can be either your existing Pipedrive contacts or an external email address. It requires a structure as follows: `[{\"email\":\"mail@example.org\"}]`",
      optional: true,
      async options({ prevContext }) {
        if (prevContext?.cursor === false) {
          return [];
        }
        const {
          data: persons,
          additional_data: additionalData,
        } = await this.pipedriveApp.getPersons({
          cursor: prevContext.cursor,
          limit: constants.DEFAULT_PAGE_LIMIT,
        });

        return {
          options: persons?.flatMap(({
            name, emails,
          }) => emails?.map(({ value }) => ({
            label: name,
            value,
          })).filter((option) => option?.value)),
          context: {
            cursor: additionalData.next_cursor,
          },
        };
      },
    },
    publicDescription: {
      type: "string",
      label: "Public Description",
      description: "Additional details about the activity that will be synced to your external calendar. Unlike the note added to the activity, the description will be publicly visible to any guests added to the activity.",
      optional: true,
    },
    note: {
      type: "string",
      label: "Note",
      description: "Note of the activity (HTML format)",
      optional: true,
    },
  },
  async run({ $ }) {
    const {
      pipedriveApp,
      dueDate,
      dueTime,
      ownerId,
      dealId,
      leadId,
      orgId,
      projectId,
      location,
      participants,
      attendees,
      publicDescription,
      ...data
    } = this;

    try {
      const resp =
        await pipedriveApp.addActivity({
          due_date: dueDate,
          due_time: dueTime,
          owner_id: ownerId,
          deal_id: dealId,
          lead_id: leadId,
          participants: parseObject(participants)?.map((value, idx) => ({
            person_id: value,
            primary: !idx,
          })),
          org_id: orgId,
          project_id: projectId,
          location: parseObject(location),
          public_description: publicDescription,
          attendees: parseObject(attendees)?.map((value) => ({
            email: value,
          })),
          ...data,
        });

      $.export("$summary", "Successfully added activity");

      return resp;
    } catch ({ error }) {
      throw new ConfigurationError(error);
    }
  },
};

Action Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI.

LabelPropTypeDescription
PipedrivepipedriveAppappThis component uses the Pipedrive app.
Subjectsubjectstring

Subject of the activity

TypetypestringSelect a value from the drop down menu.
User IDownerIdintegerSelect a value from the drop down menu.
Deal IDdealIdstringSelect a value from the drop down menu.
Lead IDleadIdstringSelect a value from the drop down menu.
Organization IDorgIdintegerSelect a value from the drop down menu.
Project IDprojectIdstringSelect a value from the drop down menu.
Due DatedueDatestring

Due date of the activity. Format: YYYY-MM-DD

Due TimedueTimestring

Due time of the activity in UTC. Format: HH:MM

Durationdurationstring

Duration of the activity. Format: HH:MM

Busybusyboolean

Set the activity as 'Busy' or 'Free'. If the flag is set to true, your customers will not be able to book that time slot through any Scheduler links

Donedoneboolean

Whether the activity is done or not.

Locationlocationobject

The address of the activity. Pipedrive will automatically check if the location matches a geo-location on Google maps.

Participantsparticipantsstring[]Select a value from the drop down menu.
Attendeesattendeesstring[]Select a value from the drop down menu.
Public DescriptionpublicDescriptionstring

Additional details about the activity that will be synced to your external calendar. Unlike the note added to the activity, the description will be publicly visible to any guests added to the activity.

Notenotestring

Note of the activity (HTML format)

Action Authentication

Pipedrive uses OAuth authentication. When you connect your Pipedrive account, Pipedream will open a popup window where you can sign into Pipedrive and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Pipedrive API.

Pipedream requests the following authorization scopes when you connect your account:

About Pipedrive

Pipedrive is the easy-to-use, #1 user-rated CRM tool. Get more qualified leads and grow your business with Pipedrive's sales CRM.

More Ways to Connect Pipedrive + Mailgun

Add Activity with Pipedrive API on New Bounce from Mailgun API
Mailgun + Pipedrive
 
Try it
Add Deal with Pipedrive API on New Bounce from Mailgun API
Mailgun + Pipedrive
 
Try it
Add Organization with Pipedrive API on New Bounce from Mailgun API
Mailgun + Pipedrive
 
Try it
Add Person with Pipedrive API on New Bounce from Mailgun API
Mailgun + Pipedrive
 
Try it
Search persons with Pipedrive API on New Bounce from Mailgun API
Mailgun + Pipedrive
 
Try it
New Bounce (Instant) from the Mailgun API

Emit new event when the email recipient could not be reached.

 
Try it
New Click (Instant) from the Mailgun API

Emit new event when the email recipient clicked on a link in the email. Open tracking must be enabled in the Mailgun control panel, and the CNAME record must be pointing to mailgun.org. See more at the Mailgun User's Manual Tracking Messages section

 
Try it
New Complaint (Instant) from the Mailgun API

Emit new event when the email recipient clicked on the spam complaint button within their email client. Feedback loops enable the notification to be received by Mailgun.

 
Try it
New Delivery (Instant) from the Mailgun API

Emit new event when an email is sent and accepted by the recipient email server.

 
Try it
New Delivery Failure (Instant) from the Mailgun API

Emit new event when an email can't be delivered to the recipient email server.

 
Try it
Create Mailing List Member with the Mailgun API

Add to an existing mailing list. See the docs here

 
Try it
Create Route with the Mailgun API

Create a new route. See the docs here

 
Try it
Delete Mailing List Member with the Mailgun API

Delete a mailing list member by address. See the docs here

 
Try it
Get Mailing List Member with the Mailgun API

Retrieve a mailing list member by address. See the docs here

 
Try it
Get Mailing List Members with the Mailgun API

List all mailing list members. See the docs here

 
Try it

Explore Other Apps

1
-
24
of
2,500+
apps by most popular

HTTP / Webhook
HTTP / Webhook
Get a unique URL where you can send HTTP or webhook requests
Node
Node
Anything you can do with Node.js, you can do in a Pipedream workflow. This includes using most of npm's 400,000+ packages.
Python
Python
Anything you can do in Python can be done in a Pipedream Workflow. This includes using any of the 350,000+ PyPi packages available in your Python powered workflows.
Pipedream Utils
Pipedream Utils
Utility functions to use within your Pipedream workflows
OpenAI (ChatGPT)
OpenAI (ChatGPT)
OpenAI is an AI research and deployment company with the mission to ensure that artificial general intelligence benefits all of humanity. They are the makers of popular models like ChatGPT, DALL-E, and Whisper.
Premium
Salesforce
Salesforce
Cloud-based customer relationship management (CRM) platform that helps businesses manage sales, marketing, customer support, and other business activities, ultimately aiming to improve customer relationships and streamline operations.
Premium
HubSpot
HubSpot
HubSpot's CRM platform contains the marketing, sales, service, operations, and website-building software you need to grow your business.
Premium
Zoho CRM
Zoho CRM
Zoho CRM is an online Sales CRM software that manages your sales, marketing, and support in one CRM platform.
Premium
Stripe
Stripe
Stripe powers online and in-person payment processing and financial solutions for businesses of all sizes.
Shopify
Shopify
Shopify is a complete commerce platform that lets anyone start, manage, and grow a business. You can use Shopify to build an online store, manage sales, market to customers, and accept payments in digital and physical locations.
Premium
WooCommerce
WooCommerce
WooCommerce is the open-source ecommerce platform for WordPress.
Premium
Snowflake
Snowflake
A data warehouse built for the cloud
Premium
MongoDB
MongoDB
MongoDB is an open source NoSQL database management program.
Supabase
Supabase
Supabase is an open source Firebase alternative.
MySQL
MySQL
MySQL is an open-source relational database management system.
PostgreSQL
PostgreSQL
PostgreSQL is a free and open-source relational database management system emphasizing extensibility and SQL compliance.
Premium
AWS
AWS
Amazon Web Services (AWS) offers reliable, scalable, and inexpensive cloud computing services.
Premium
Twilio SendGrid
Twilio SendGrid
Send marketing and transactional email through the Twilio SendGrid platform with the Email API, proprietary mail transfer agent, and infrastructure for scalable delivery.
Amazon SES
Amazon SES
Amazon SES is a cloud-based email service provider that can integrate into any application for high volume email automation
Premium
Klaviyo
Klaviyo
Email Marketing and SMS Marketing Platform
Premium
Zendesk
Zendesk
Zendesk is award-winning customer service software trusted by 200K+ customers. Make customers happy via text, mobile, phone, email, live chat, social media.
Premium
ServiceNow
ServiceNow
The smarter way to workflow
Notion
Notion
Notion is a new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team.
Slack
Slack
Slack is a channel-based messaging platform. With Slack, people can work together more effectively, connect all their software tools and services, and find the information they need to do their best work — all within a secure, enterprise-grade environment.