← All N8N workflows
AI & researchEmail Read ImapFilterHTTP RequestOpen AiEdit Fields

http request and get mailbox ids and split out

Configured with Email Read Imap, Filter, HTTP Request, Open Ai, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
Web / APISessionHTTP RequestWeb / APIGet Mailbox IDsHTTP RequestTransformSplit OutSplit OutMessagingEmail Trigger (IMAP)Email Read ImapTransformGet fields from sourceemailEdit FieldsAI & modelsOpenAIOpen AiRoutingFilter for draftsfolderFilterWeb / APIupload draft emailHTTP RequestTransformgather data for draftemailEdit Fields

Node categories in this workflow

  • Web / API
  • Transform
  • Messaging
  • AI & models
  • Routing

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
SessionWeb / APIHTTP RequestSee node parameters
Get Mailbox IDsWeb / APIHTTP RequestPOST
Split OutTransformSplit OutSee node parameters
Email Trigger (IMAP)MessagingEmail Read ImapSee node parameters
Get fields from source emailTransformEdit FieldsSee node parameters
OpenAIAI & modelsOpen AiSee node parameters
Filter for drafts folderRoutingFilterSee node parameters
upload draft emailWeb / APIHTTP RequestPOST
gather data for draft emailTransformEdit FieldsSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • httpHeaderAuth
  • imap
  • openAiApi

Workflow notes

Get Mailbox IDs

https://api.fastmail.com/.well-known/jmap

https://api.fastmail.com/jmap/session

Workflow Description:

Workflow Description:

This n8n workflow automates the drafting of email replies for Fastmail using OpenAI's GPT-4 model. Here’s the overall process:

  1. Email Monitoring: The workflow continuously monitors a specified IMAP inbox for new, unread emails.
  2. Email Data Extraction: When a new email is detected, it extracts relevant details such as the sender, subject, email body, and metadata.
  3. AI Response Generation: The extracted email content is sent to OpenAI's GPT-4, which generates a personalized draft response.
  4. Get Fastmail Session and Mailbox IDs: Connects to the Fastmail API to retrieve necessary session details and mailbox IDs.
  5. Draft Identification: Identifies the "Drafts" folder in the mailbox.
  6. Draft Preparation: Compiles all the necessary information to create the draft, including the generated response, original email details, and specified recipient.
  7. Draft Uploading: Uploads the prepared draft email to the "Drafts" folder in the Fastmail mailbox.
Prerequisites:

Prerequisites:

  1. IMAP Email Account: You need to configure an IMAP email account in n8n to monitor incoming emails.
  2. Fastmail API Credentials: A Fastmail account with JMAP API enabled. You should set up HTTP Header authentication in n8n with your Fastmail API credentials.
  3. OpenAI API Key: An API key from OpenAI to access GPT-4. Make sure to configure the OpenAI credentials in n8n.
http request and get mailbox ids and split out

http request and get mailbox ids and split out

Purpose and structure

This folder contains the http request and get mailbox ids and split out workflow. Its executable nodes use emailReadImap, filter, httpRequest, openAi, set, splitOut. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

Inspect connections; no recognized trigger.

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Splitout/0587_Splitout_Filter_Send_Webhook.json MIT; preserve source notices.

More in AI & research