← ActiveCampaign

Create Deal with ActiveCampaign API

Pipedream makes it easy to connect APIs for ActiveCampaign and 900+ other apps remarkably fast.

Trigger workflow on
HTTP requests, schedules and app events
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

Create a workflow to Create Deal with the ActiveCampaign API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. 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
  2. Select a trigger to run your workflow on HTTP requests, schedules or app events
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger

Integrations

Create Deal with ActiveCampaign API on New Requests (Payload Only) from HTTP / Webhook API
HTTP / Webhook + ActiveCampaign
 
Try it
Create Deal with ActiveCampaign API on New Item in Feed from RSS API
RSS + ActiveCampaign
 
Try it
Create Deal with ActiveCampaign API on New Message from Discord API
Discord + ActiveCampaign
 
Try it
Create Deal with ActiveCampaign API on New Message In Channels from Slack API
Slack + ActiveCampaign
 
Try it
Create Deal with ActiveCampaign API on New Message in Channel from Discord Bot API
Discord Bot + ActiveCampaign
 
Try it

Details

This is a pre-built, open source component from Pipedream's GitHub repo. The component is 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.

Create Deal on ActiveCampaign
Description:Creates a new deal.
Version:0.1.2
Key:activecampaign-create-deal

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);
  },
};

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

Deal's title.

valueinteger

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

currencystring

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

descriptionstring

Deal's description.

accountstring

Deal's account id.

contactstring

Deal's primary contact's id.

groupstring

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.

stagestring

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.

ownerstring

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

percentinteger

Deal's percentage.

statusinteger

Deal's status. Valid values:

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

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

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 Use ActiveCampaign

Triggers

Campaign Link Clicked (Instant) from the ActiveCampaign API

Emit new event when a link from a campaign is clicked (will only run once for each unique link).

 
Try it
Campaign Opened (Instant) from the ActiveCampaign API

Emit new event when a contact opens a campaign (will trigger once per contact per campaign).

 
Try it
Campaign Starts Sending (Instant) from the ActiveCampaign API

Emit new event each time a campaign starts sending.

 
Try it
New Automation Webhook from the ActiveCampaign API

Emit new event each time an automation sends out webhook data.

 
Try it
New Campaign Bounce (Instant) from the ActiveCampaign API

Emit new event when a contact email address bounces from a sent campaign.

 
Try it

Actions

Activecampaign - Get contact by email with the ActiveCampaign API

Retrieves contact data from the ActiveCampaign CRM by email address

 
Try it
ActiveCampaign - Remove Contact Tag with the ActiveCampaign API
 
Try it
Add Contact to Automation with the ActiveCampaign API

Adds an existing contact to an existing automation.

 
Try it
Create Account with the ActiveCampaign API

Create a new account. See the docs here.

 
Try it
Create Contact with the ActiveCampaign API

Create a new contact. See the docs here.

 
Try it