← Mercury

New Transaction from Mercury API

Pipedream makes it easy to connect APIs for Mercury and 1000+ other apps remarkably fast.

Trigger workflow on
New Transaction from the Mercury API
Next, do this
Connect to 1000+ APIs using code and no-code building blocks
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜

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

Adyen logo
Brex logo
Carta logo
Checkr logo
Chameleon logo
DevRev logo
LinkedIn logo
Netflix logo
New Relic logo
OnDeck logo
Replicated logo
Scale AI logo
Teamwork logo
Warner Bros. logo
Xendit logo

Developers Pipedream

Getting Started

Trigger a workflow on New Transaction with Mercury API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the New Transaction trigger
    1. Connect your Mercury account
    2. Configure timer
    3. Select a Account
  2. Add steps to connect to 1000+ APIs using code and no-code building blocks
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger


Send Message with Discord Webhook API on New Transaction from Mercury API
Mercury + Discord Webhook
Try it
Add Multiple Rows with Google Sheets API on New Transaction from Mercury API
Mercury + Google Sheets
Try it
Get Film with SWAPI API on New Transaction from Mercury API
Mercury + SWAPI - Star Wars
Try it
Create Multiple Records with Airtable API on New Transaction from Mercury API
Mercury + Airtable
Try it
Custom Request with HTTP / Webhook API on New Transaction from Mercury API
Mercury + HTTP / Webhook
Try it


This is a pre-built, source-available 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.

New Transaction on Mercury
Description:Emits an event for each new transaction in an account.


const mercury = require("../../mercury.app.js");
const { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } = require("@pipedream/platform");

module.exports = {
  key: "mercury-new-transaction",
  name: "New Transaction",
  description: "Emits an event for each new transaction in an account.",
  version: "0.0.2",
  dedupe: "unique",
  type: "source",
  props: {
    db: "$.service.db",
    timer: {
      type: "$.interface.timer",
      default: {
    account: {
      propDefinition: [
  methods: {
    getMeta(transaction) {
      const {
        id, counterpartyName: summary, postedAt,
      } = transaction;
      const ts = new Date(postedAt).getTime();
      return {
  async run() {
    const lastRunTime = this.db.get("lastRunTime")
      ? new Date(this.db.get("lastRunTime"))
      : this.mercury.daysAgo(1);
    const params = {
      limit: 100,
      offset: 0,
      start: lastRunTime.toISOString().split("T")[0],
    let totalTransactions = params.limit;
    while (totalTransactions == params.limit) {
      const results = await this.mercury.getTransactions(this.account, params);
      const { transactions } = results;
      totalTransactions = transactions.length;
      for (const transaction of transactions) {
        this.$emit(transaction, this.getMeta(transaction));
      params.offset += params.limit;
    this.db.set("lastRunTime", new Date());


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.
MercurymercuryappThis component uses the Mercury app.
N/Adb$.service.dbThis component uses $.service.db to maintain state between component invocations.
AccountaccountstringSelect a value from the drop down menu.


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

In order to get Mercury's API key, log into your Mercury account and go to the Settings page to generate a new one.