IMAP

Connect Pipedream to any IMAP email provider to trigger custom workflows.

Integrate the IMAP API with the Formatting API

Setup the IMAP API trigger to run a workflow which integrates with the Formatting API. Pipedream's integration platform allows you to integrate IMAP and Formatting remarkably fast. Free for developers.

[Data] Convert JSON to String with Formatting API on New Email from IMAP API
IMAP + Formatting
 
Try it
[Data] Parse JSON with Formatting API on New Email from IMAP API
IMAP + Formatting
 
Try it
[Date/Time] Add/Subtract Time with Formatting API on New Email from IMAP API
IMAP + Formatting
 
Try it
[Date/Time] Compare Dates with Formatting API on New Email from IMAP API
IMAP + Formatting
 
Try it
[Date/Time] Format with Formatting API on New Email from IMAP API
IMAP + Formatting
 
Try it
New Email from the IMAP API

Emit new event for each new email in a mailbox

 
Try it
[Data] Convert JSON to String with the Formatting API

Convert an object to a JSON format string

 
Try it
[Data] Parse JSON with the Formatting API

Parse a JSON string

 
Try it
[Date/Time] Add/Subtract Time with the Formatting API

Add or subtract time from a given input

 
Try it
[Date/Time] Compare Dates with the Formatting API

Get the duration between two dates in days, hours, minutes, and seconds along with checking if they are the same.

 
Try it
[Date/Time] Format with the Formatting API

Format a date string to another date string

 
Try it

Overview of IMAP

Using Pipedream's IMAP API, developers can automate interactions with their email inbox, enabling serverless workflows that perform actions based on incoming emails. This could include parsing email contents, triggering events upon receiving emails from specific senders, attaching labels, and much more. By leveraging IMAP, Pipedream can act as a bridge between your email and other services, streamlining processes that would otherwise require manual intervention.

Connect IMAP

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { once } from "events";
import imaps from "imap-simple";
import cycle from "cycle";

export default defineComponent({
  props: {
    imap: {
      type: "app",
      app: "imap",
    }
  },
  async run({steps, $}) {
    const { host, port, email, password } = this.imap.$auth;

    const connection = await imaps.connect({
      imap: {
        host,
        port,
        user: email,
        password,
        tls: true,
        tlsOptions: { servername: host },
        authTimeout: 3000
      },
    });

    const boxes = await connection.getBoxes();
    // Filter out circular references to parents
    const filteredBoxes = cycle.decycle(boxes);
    $.export("results", filteredBoxes);

    connection.end();
    await once(connection.imap, "end");
  },
})

Connect Formatting

1
2
3
4
5
6
export default defineComponent({
  async run({ steps, $ }) {
    const text = ' Hello world! ';
    return text.trim()
  },
})