← Constant Contact + QuickBooks integrations

Create Sales Receipt with QuickBooks API on New Contact Added from Constant Contact API

Pipedream makes it easy to connect APIs for QuickBooks, Constant Contact and 3,000+ other apps remarkably fast.

Trigger workflow on
New Contact Added from the Constant Contact API
Next, do this
Create Sales Receipt with the QuickBooks 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 Constant Contact trigger and QuickBooks 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 Contact Added trigger
    1. Connect your Constant Contact account
    2. Configure Polling interval
  3. Configure the Create Sales Receipt action
    1. Connect your QuickBooks account
    2. Configure Enter Line Items as Objects
    3. Optional- Select a Currency Code
  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 a new contact is created.
Version:0.0.2
Key:constant_contact-new-contact-added

Constant Contact Overview

The Constant Contact API allows users to automate email marketing efforts by managing contacts, sending emails, and tracking results. With Pipedream, you can connect Constant Contact to other apps to create powerful workflows. You can trigger events, sync contact lists, automate email campaigns, and analyze email performance with ease. Pipedream's serverless platform offers a streamlined approach to integrating Constant Contact's functionalities into diverse, automated sequences.

Trigger Code

import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
import constantContact from "../../constant_contact.app.mjs";

export default {
  key: "constant_contact-new-contact-added",
  name: "New Contact Added",
  description: "Emit new event when a new contact is created.",
  type: "source",
  version: "0.0.2",
  dedupe: "unique",
  props: {
    constantContact,
    db: "$.service.db",
    timer: {
      label: "Polling interval",
      description: "Pipedream will poll the Constant Contact on this schedule",
      type: "$.interface.timer",
      default: {
        intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL,
      },
    },
  },
  methods: {
    _getLastDate() {
      return this.db.get("lastDate");
    },
    _setLastDate(lastDate) {
      this.db.set("lastDate", lastDate);
    },
    async startEvent(maxResults) {
      const lastDate = this._getLastDate();
      const responseArray = [];

      const items = this.constantContact.paginate({
        fn: this.constantContact.listContacts,
        field: "contacts",
        params: {
          created_after: lastDate,
          sort: "contacts.created_at.desc",
          limit: 500,
        },
        maxResults,
      });

      for await (const item of items) {
        responseArray.push(item);
      }

      if (!responseArray.length) {
        console.log("No new contacts found");
        return;
      }

      this._setLastDate(responseArray[0].created_at);

      for (const responseItem of responseArray.reverse()) {
        this.$emit(
          responseItem,
          {
            id: responseItem.contact_id,
            summary: `A new contact with id "${responseItem.contact_id}" was created!`,
            ts: responseItem.created_at,
          },
        );
      }
    },
  },
  hooks: {
    async deploy() {
      await this.startEvent(25);
    },
  },
  async run() {
    await this.startEvent();
  },
};

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
Constant ContactconstantContactappThis component uses the Constant Contact app.
N/Adb$.service.dbThis component uses $.service.db to maintain state between executions.
Polling intervaltimer$.interface.timer

Pipedream will poll the Constant Contact on this schedule

Trigger Authentication

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

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

account_readaccount_updatecontact_datacampaign_dataoffline_access

About Constant Contact

We deliver for small businesses and nonprofits with the right tools to simplify and amplify your digital marketing and generate powerful results.

Action

Description:Creates a sales receipt. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/salesreceipt#create-a-salesreceipt)
Version:0.0.12
Key:quickbooks-create-sales-receipt

QuickBooks Overview

The QuickBooks API allows for streamlined financial management within Pipedream's ecosystem, enabling automated accounting and data syncing across various platforms. With this API, you can manipulate invoices, manage sales receipts, handle expenses, and synchronize customer data. It's a robust tool for financial oversight and automation that can save time and reduce errors for businesses of all sizes.

Action Code

import quickbooks from "../../quickbooks.app.mjs";
import { parseLineItems } from "../../common/utils.mjs";
import { ConfigurationError } from "@pipedream/platform";

export default {
  key: "quickbooks-create-sales-receipt",
  name: "Create Sales Receipt",
  description: "Creates a sales receipt. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/salesreceipt#create-a-salesreceipt)",
  version: "0.0.12",
  annotations: {
    destructiveHint: false,
    openWorldHint: true,
    readOnlyHint: false,
  },
  type: "action",
  props: {
    quickbooks,
    lineItemsAsObjects: {
      propDefinition: [
        quickbooks,
        "lineItemsAsObjects",
      ],
      reloadProps: true,
    },
    currencyRefValue: {
      propDefinition: [
        quickbooks,
        "currency",
      ],
      optional: true,
    },
  },
  async additionalProps() {
    const props = {};
    if (this.lineItemsAsObjects) {
      props.lineItems = {
        type: "string[]",
        label: "Line Items",
        description: "Line items of a sales receipt. Set DetailType to `SalesItemLineDetail` or `GroupLineDetail`. Example: `{ \"DetailType\": \"SalesItemLineDetail\", \"Amount\": 100.0, \"SalesItemLineDetail\": { \"ItemRef\": { \"name\": \"Services\", \"value\": \"1\" } } }` [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/salesreceipt#create-a-salesreceipt) for more information.",
      };
      return props;
    }
    props.numLineItems = {
      type: "integer",
      label: "Number of Line Items",
      description: "The number of line items to enter",
      reloadProps: true,
    };
    if (!this.numLineItems) {
      return props;
    }
    for (let i = 1; i <= this.numLineItems; i++) {
      props[`item_${i}`] = {
        type: "string",
        label: `Line ${i} - Item ID`,
        options: async ({ page }) => {
          return this.quickbooks.getPropOptions({
            page,
            resource: "Item",
            mapper: ({
              Id: value, Name: label,
            }) => ({
              value,
              label,
            }),
          });
        },
      };
      props[`amount_${i}`] = {
        type: "string",
        label: `Line ${i} - Amount`,
      };
    }
    return props;
  },
  methods: {
    buildLineItems() {
      const lineItems = [];
      for (let i = 1; i <= this.numLineItems; i++) {
        lineItems.push({
          DetailType: "SalesItemLineDetail",
          Amount: this[`amount_${i}`],
          SalesItemLineDetail: {
            ItemRef: {
              value: this[`item_${i}`],
            },
          },
        });
      }
      return lineItems;
    },
  },
  async run({ $ }) {
    const lines = this.lineItemsAsObjects
      ? parseLineItems(this.lineItems)
      : this.buildLineItems();

    lines.forEach((line) => {
      if (line.DetailType !== "SalesItemLineDetail" && line.DetailType !== "GroupLineDetail") {
        throw new ConfigurationError("Line Item DetailType must be `SalesItemLineDetail` or `GroupLineDetail`");
      }
    });

    const response = await this.quickbooks.createSalesReceipt({
      $,
      data: {
        Line: lines,
        CurrencyRef: this.currencyRefValue && {
          value: this.currencyRefValue,
        },
      },
    });

    if (response) {
      $.export("summary", `Successfully created sales receipt with ID ${response.SalesReceipt.Id}`);
    }

    return response;
  },
};

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
QuickBooksquickbooksappThis component uses the QuickBooks app.
Enter Line Items as ObjectslineItemsAsObjectsboolean

Enter line items as an array of objects

Currency CodecurrencyRefValuestringSelect a value from the drop down menu.

Action Authentication

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

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

com.intuit.quickbooks.accountingopenidprofileemail

About QuickBooks

QuickBooks Online is designed to help you manage your business finances with ease.

More Ways to Connect QuickBooks + Constant Contact

Create Bill with Quickbooks API on New Contact Added from Constant Contact API
Constant Contact + QuickBooks
 
Try it
Create Customer with Quickbooks API on New Contact Added from Constant Contact API
Constant Contact + QuickBooks
 
Try it
Create Invoice with Quickbooks API on New Contact Added from Constant Contact API
Constant Contact + QuickBooks
 
Try it
Create Payment with Quickbooks API on New Contact Added from Constant Contact API
Constant Contact + QuickBooks
 
Try it
Get Bill with Quickbooks API on New Contact Added from Constant Contact API
Constant Contact + QuickBooks
 
Try it
New Contact Added from the Constant Contact API

Emit new event when a new contact is created.

 
Try it
New Customer Created from the QuickBooks API

Emit new event when a new customer is created.

 
Try it
New Customer Updated from the QuickBooks API

Emit new event when a customer is updated.

 
Try it
New Employee Created from the QuickBooks API

Emit new event when a new employee is created.

 
Try it
New Employee Updated from the QuickBooks API

Emit new event when an employee is updated.

 
Try it
Add Contact with the Constant Contact API

Add a single contact. See the documentation

 
Try it
Remove Contact with the Constant Contact API

Delete a specific contact identified by contact_id. See the documentation

 
Try it
Update Contact with the Constant Contact API

Update an existing contact. See the documentation

 
Try it
Create AP Aging Detail Report with the QuickBooks API

Creates an AP aging report in Quickbooks Online. See the documentation

 
Try it
Create Bill with the QuickBooks API

Creates a bill. See the documentation

 
Try it

Explore Other Apps

1
-
24
of
3,000+
apps by most popular

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.
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.
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.
Anthropic (Claude)
Anthropic (Claude)
AI research and products that put safety at the frontier. Introducing Claude, a next-generation AI assistant for your tasks, no matter the scale.
Google Sheets
Google Sheets
Use Google Sheets to create and edit online spreadsheets. Get insights together with secure sharing in real-time and from any device.
Telegram
Telegram
Telegram, is a cloud-based, cross-platform, encrypted instant messaging (IM) service.
Google Drive
Google Drive
Google Drive is a file storage and synchronization service which allows you to create and share your work online, and access your documents from anywhere.
HTTP / Webhook
HTTP / Webhook
Get a unique URL where you can send HTTP or webhook requests
Google Calendar
Google Calendar
With Google Calendar, you can quickly schedule meetings and events and get reminders about upcoming activities, so you always know what’s next.
Schedule
Schedule
Trigger workflows on an interval or cron schedule.
Pipedream Utils
Pipedream Utils
Utility functions to use within your Pipedream workflows
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.
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.
AWS
AWS
Premium
Amazon Web Services (AWS) offers reliable, scalable, and inexpensive cloud computing services.
Twilio SendGrid
Twilio SendGrid
Premium
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
Klaviyo
Klaviyo
Premium
Klaviyo unifies your data, channels, and AI agents in one platform—text, WhatsApp, email marketing, and more—driving growth with every interaction.
Zendesk
Zendesk
Premium
Zendesk is award-winning customer service software trusted by 200K+ customers. Make customers happy via text, mobile, phone, email, live chat, social media.
ServiceNow
ServiceNow
Premium
Beta
The smarter way to workflow
Slack
Slack
Slack is the AI-powered platform for work bringing all of your conversations, apps, and customers together in one place. Around the world, Slack is helping businesses of all sizes grow and send productivity through the roof.
Microsoft Teams
Microsoft Teams
Microsoft Teams has communities, events, chats, channels, meetings, storage, tasks, and calendars in one place.