← HTTP / Webhook + ActiveCampaign integrations

Create Deal with ActiveCampaign API on New Requests from HTTP / Webhook API

Pipedream makes it easy to connect APIs for ActiveCampaign, HTTP / Webhook and 800+ other apps remarkably fast.

Trigger workflow on
New Requests from the HTTP / Webhook API
Next, do this
Create Deal with the ActiveCampaign API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

This integration creates a workflow with a HTTP / Webhook trigger and ActiveCampaign 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 Requests trigger
    1. Optional- Configure Body Only
    2. Optional- Configure Response Status Code
    3. Optional- Configure Response Content-Type
    4. Optional- Configure Response Body
    5. Connect your HTTP / Webhook account
  3. Configure the Create Deal action
    1. Connect your ActiveCampaign account
    2. Configure title
    3. Configure value
    4. Configure currency
    5. Optional- Configure description
    6. Optional- Configure account
    7. Optional- Configure contact
    8. Optional- Configure group
    9. Optional- Configure stage
    10. Optional- Configure owner
    11. Optional- Configure percent
    12. Optional- Configure status
    13. Optional- Configure fields
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger

Details

This integration uses pre-built, open source 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:Get a URL and emit the full HTTP event on every request (including headers and query parameters). You can also configure the HTTP response code, body, and more.
Version:0.1.1
Key:http-new-requests

Trigger Code

import http from "../../http.app.mjs";

// Core HTTP component
export default {
  key: "http-new-requests",
  name: "New Requests",
  description: "Get a URL and emit the full HTTP event on every request (including headers and query parameters). You can also configure the HTTP response code, body, and more.",
  version: "0.1.1",
  type: "source",
  props: {
    httpInterface: {
      type: "$.interface.http",
      customResponse: true,
    },
    emitBodyOnly: {
      type: "boolean",
      label: "Body Only",
      description: "This source emits an event representing the full HTTP request by default. Select `true` to emit the body only.",
      optional: true,
      default: false,
    },
    resStatusCode: {
      type: "string",
      label: "Response Status Code",
      description: "The status code to return in the HTTP response",
      optional: true,
      default: "200",
    },
    resContentType: {
      type: "string",
      label: "Response Content-Type",
      description: "The `Content-Type` of the body returned in the HTTP response",
      optional: true,
      default: "application/json",
    },
    resBody: {
      type: "string",
      label: "Response Body",
      description: "The body to return in the HTTP response",
      optional: true,
      default: "{ \"success\": true }",
    },
    http,
  },
  async run(event) {
    const summary = `${event.method} ${event.path}`;

    this.httpInterface.respond({
      status: this.resStatusCode,
      body: this.resBody,
      headers: {
        "content-type": this.resContentType,
      },
    });

    if (this.emitBodyOnly) {
      this.$emit(event.body, {
        summary,
      });
    } else {
      this.$emit(event, {
        summary,
      });
    }
  },
};

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
N/AhttpInterface$.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.
Body OnlyemitBodyOnlyboolean

This source emits an event representing the full HTTP request by default. Select true to emit the body only.

Response Status CoderesStatusCodestring

The status code to return in the HTTP response

Response Content-TyperesContentTypestring

The Content-Type of the body returned in the HTTP response

Response BodyresBodystring

The body to return in the HTTP response

HTTP / WebhookhttpappThis component uses the HTTP / Webhook app.

Trigger Authentication

The HTTP / Webhook API does not require authentication.

About HTTP / Webhook

Get a unique URL where you can send HTTP or webhook requests

Action

Description:Creates a new deal.
Version:0.1.2
Key:activecampaign-create-deal

Action Code

// legacy_hash_id: a_Mdi7Jj
import { axios } from "@pipedream/platform";

export default {
  key: "activecampaign-create-deal",
  name: "Create Deal",
  description: "Creates a new deal.",
  version: "0.1.2",
  type: "action",
  props: {
    activecampaign: {
      type: "app",
      app: "activecampaign",
    },
    title: {
      type: "string",
      description: "Deal's title.",
    },
    value: {
      type: "integer",
      description: "Deal's value in cents. (i.e. $456.78 => 45678). Must be greater than or equal to zero.",
    },
    currency: {
      type: "string",
      description: "Deal's currency in 3-digit ISO format, lowercased.",
    },
    description: {
      type: "string",
      description: "Deal's description.",
      optional: true,
    },
    account: {
      type: "string",
      description: "Deal's account id.",
      optional: true,
    },
    contact: {
      type: "string",
      description: "Deal's primary contact's id.",
      optional: true,
    },
    group: {
      type: "string",
      description: "Deal's pipeline id. Required if `deal.stage` is not provided. If `deal.group` is not provided, the stage's pipeline will be assigned to the deal automatically.",
      optional: true,
    },
    stage: {
      type: "string",
      description: "Deal's stage id. Required if `deal.group` is not provided. If `deal.stage` is not provided, the deal will be assigned with the first stage in the pipeline provided in `deal.group`.",
      optional: true,
    },
    owner: {
      type: "string",
      description: "Deal's owner id. Required if pipeline's auto-assign option is disabled.",
      optional: true,
    },
    percent: {
      type: "integer",
      description: "Deal's percentage.",
      optional: true,
    },
    status: {
      type: "integer",
      description: "Deal's status. Valid values:\n* `0` - Open\n* `1` - Won\n* `2` - Lost",
      optional: true,
    },
    fields: {
      type: "any",
      description: "Deal's custom field values [{customFieldId, fieldValue}]",
      optional: true,
    },
  },
  async run({ $ }) {
  // See the API docs: https://developers.activecampaign.com/reference#create-a-deal-new

    if (!this.title || !this.value || !this.currency) {
      throw new Error("Must provide title, value, and currency parameters.");
    }

    const config = {
      method: "post",
      url: `${this.activecampaign.$auth.base_url}/api/3/deals`,
      headers: {
        "Api-Token": `${this.activecampaign.$auth.api_key}`,
      },
      data: {
        deal: {
          title: this.title,
          description: this.description,
          account: this.account,
          contact: this.contact,
          value: parseInt(this.value),
          currency: this.currency,
          group: this.group,
          stage: this.stage,
          owner: this.owner,
          percent: parseInt(this.percent),
          status: parseInt(this.status),
          fields: this.fields,
        },
      },
    };
    return await axios($, config);
  },
};

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
ActiveCampaignactivecampaignappThis component uses the ActiveCampaign app.
titletitlestring

Deal's title.

valuevalueinteger

Deal's value in cents. (i.e. $456.78 => 45678). Must be greater than or equal to zero.

currencycurrencystring

Deal's currency in 3-digit ISO format, lowercased.

descriptiondescriptionstring

Deal's description.

accountaccountstring

Deal's account id.

contactcontactstring

Deal's primary contact's id.

groupgroupstring

Deal's pipeline id. Required if deal.stage is not provided. If deal.group is not provided, the stage's pipeline will be assigned to the deal automatically.

stagestagestring

Deal's stage id. Required if deal.group is not provided. If deal.stage is not provided, the deal will be assigned with the first stage in the pipeline provided in deal.group.

ownerownerstring

Deal's owner id. Required if pipeline's auto-assign option is disabled.

percentpercentinteger

Deal's percentage.

statusstatusinteger

Deal's status. Valid values:

  • 0 - Open
  • 1 - Won
  • 2 - Lost
fieldsfieldsany

Deal's custom field values [{customFieldId, fieldValue}]

Action Authentication

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

You can find your Base URL and API Key in your Developer Settings in your account. See the ActiveCampaign API docs for more info.

About ActiveCampaign

Email marketing, marketing automation, and CRM tools

More Ways to Connect ActiveCampaign + HTTP / Webhook