Back to Catalog

Templates by Vitali

Create e-mail responses with Fastmail and OpenAI

Workflow Description: This n8n workflow automates the drafting of email replies for Fastmail using OpenAI's GPT-4 model. Here’s the overall process: Email Monitoring: The workflow continuously monitors a specified IMAP inbox for new, unread emails. Email Data Extraction: When a new email is detected, it extracts relevant details such as the sender, subject, email body, and metadata. AI Response Generation: The extracted email content is sent to OpenAI's GPT-4, which generates a personalized draft response. Get Fastmail Session and Mailbox IDs: Connects to the Fastmail API to retrieve necessary session details and mailbox IDs. Draft Identification: Identifies the "Drafts" folder in the mailbox. Draft Preparation: Compiles all the necessary information to create the draft, including the generated response, original email details, and specified recipient. Draft Uploading: Uploads the prepared draft email to the "Drafts" folder in the Fastmail mailbox. Prerequisites: IMAP Email Account: You need to configure an IMAP email account in n8n to monitor incoming emails. Fastmail API Credentials: A Fastmail account with JMAP API enabled. You should set up HTTP Header authentication in n8n with your Fastmail API credentials. OpenAI API Key: An API key from OpenAI to access GPT-4. Make sure to configure the OpenAI credentials in n8n. Configuration Steps: Email Trigger (IMAP) Node: Provide your email server settings and credentials to monitor emails. HTTP Request Nodes for Fastmail: Set up HTTP Header authentication in n8n using your Fastmail API credentials. Replace the httpHeaderAuth credential IDs with your configured credential IDs. OpenAI Node: Configure the OpenAI API key in n8n. Replace the openAiApi credential ID with your configured credential ID. By following these steps and setting up the necessary credentials, you can seamlessly automate the creation of email drafts in response to new emails using AI-generated content. This workflow helps improve productivity and ensures timely, personalized communication.

VitaliBy Vitali
3298

Masked email management for Fastmail

Template Description This n8n workflow is designed to manage Fastmail masked email addresses using the Fastmail API. The workflow provides the following functionalities: Retrieve all masked emails: Fetches all masked email addresses associated with the Fastmail account. Create masked email: Allows creating a new masked email with a specified state (pending, enabled, etc.). Update masked email state: Updates the state of a masked email such as enabling, disabling, or deleting it. Generate HTML template: Constructs an HTML table to display the masked emails in a user-friendly format. Steps to Make it Work Webhook Node: This node listens for incoming requests to manage masked emails. Needs Basic Authentication credentials to secure the endpoint. Session Node: Sends a request to obtain session information from Fastmail's API. Requires an HTTP Header Auth credential with your Fastmail API token. Switch Node: Routes the workflow based on the state of the incoming masked email request (pending, enabled, disabled, deleted). HTTP Request Nodes: These nodes handle various Fastmail API calls for masked emails (get, set, update, delete). All HTTP Request nodes require an HTTP Header Auth credential attached, using the Fastmail API token. Set Node: Gathers the retrieved masked email list into an array for further processing. HTML Node: Generates an HTML template to render the masked email addresses in a table format. Respond to Webhook Node: Sends back the HTML table to the client in response to the webhook request. Needed Credentials Fastmail Masked E-Mail Addresses: An API token from Fastmail's API. Each HTTP call to Fastmail requires this credential for authentication. Note Ensure that you correctly configure authentication for the API calls and webhook security. Use your actual Fastmail API credentials with the correct scope. The workflow assumes that the Fastmail API is correctly configured and accessible from your n8n instance. Update URLs and credentials IDs according to your n8n configuration.

VitaliBy Vitali
544

Create single new masked email address with Fastmail

Template Description This n8n workflow template allows you to create a masked email address using the Fastmail API, triggered by a webhook. This is especially useful for generating disposable email addresses for privacy-conscious users or for testing purposes. Workflow Details: Webhook Trigger: The workflow is initiated by sending a POST request to a specific webhook. You can include state and description in your request body to customize the masked email's state and description. Session Retrieval: The workflow makes an HTTP request to the Fastmail API to retrieve session information. It uses this data to authenticate further requests. Create Masked Email: Using the retrieved session data, the workflow sends a POST request to Fastmail's JMAP API to create a masked email. It uses the provided state and description from the webhook payload. Prepare Output: Once the masked email is successfully created, the workflow extracts the email address and attaches the description for further processing. Respond to Webhook: Finally, the workflow responds to the original POST request with the newly created masked email and its description. Requirements: Fastmail API Access: You will need valid API credentials for Fastmail configured with HTTP Header Authentication. Authorization Setup: Optionally set up authorization if your webhook is exposed to the internet to prevent misuse. Custom Webhook Request: Use a tool like curl or create a shortcut on macOS/iOS to send the POST request to the webhook with the necessary JSON payload, like so: bash curl -X POST -H 'Content-Type: application/json' https://your-n8n-instance/webhook/87f9abd1-2c9b-4d1f-8c7f-2261f4698c3c -d '{"state": "pending", "description": "my mega fancy masked email"}' This template simplifies the process of integrating masked email functionality into your projects or workflows and can be extended for various use cases. Feel free to use the companion shortcut I've also created. Please update the authorization header in the shortcut if needed. https://www.icloud.com/shortcuts/ac249b50eab34c04acd9fb522f9f7068

VitaliBy Vitali
483
All templates loaded