Back to Integrations
integrationHTTP Request node
integrationMailgun node

HTTP Request and Mailgun integration

Save yourself the work of writing custom integrations for HTTP Request and Mailgun and use n8n instead. Build adaptable and scalable Development, Core Nodes, and Communication workflows that work with your technology stack. All within a building experience you will love.

How to connect HTTP Request and Mailgun

  • Step 1: Create a new workflow
  • Step 2: Add and configure nodes
  • Step 3: Connect
  • Step 4: Customize and extend your integration
  • Step 5: Test and activate your workflow

Step 1: Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

HTTP Request and Mailgun integration: Create a new workflow and add the first step

Step 2: Add and configure HTTP Request and Mailgun nodes

You can find HTTP Request and Mailgun in the nodes panel. Drag them onto your workflow canvas, selecting their actions. Click each node, choose a credential, and authenticate to grant n8n access. Configure HTTP Request and Mailgun nodes one by one: input data on the left, parameters in the middle, and output data on the right.

HTTP Request and Mailgun integration: Add and configure HTTP Request and Mailgun nodes

Step 3: Connect HTTP Request and Mailgun

A connection establishes a link between HTTP Request and Mailgun (or vice versa) to route data through the workflow. Data flows from the output of one node to the input of another. You can have single or multiple connections for each node.

HTTP Request and Mailgun integration: Connect HTTP Request and Mailgun

Step 4: Customize and extend your HTTP Request and Mailgun integration

Use n8n's core nodes such as If, Split Out, Merge, and others to transform and manipulate data. Write custom JavaScript or Python in the Code node and run it as a step in your workflow. Connect HTTP Request and Mailgun with any of n8n’s 1000+ integrations, and incorporate advanced AI logic into your workflows.

HTTP Request and Mailgun integration: Customize and extend your HTTP Request and Mailgun integration

Step 5: Test and activate your HTTP Request and Mailgun workflow

Save and run the workflow to see if everything works as expected. Based on your configuration, data should flow from HTTP Request to Mailgun or vice versa. Easily debug your workflow: you can check past executions to isolate and fix the mistake. Once you've tested everything, make sure to save your workflow and activate it.

HTTP Request and Mailgun integration: Test and activate your HTTP Request and Mailgun workflow

Back up databases and files to Box with Mailgun email notifications

Scheduled Backup Automation – Mailgun & Box

This workflow automatically schedules, packages, and uploads backups of your databases, files, or configuration exports to Box cloud storage, then sends a completion email via Mailgun. It is ideal for small-to-medium businesses or solo developers who want hands-off, verifiable backups without writing custom scripts.

Pre-conditions/Requirements

Prerequisites
n8n instance (self-hosted or n8n.cloud)
Box account with a folder dedicated to backups
Mailgun account & verified domain
Access to the target database/server you intend to back up
Basic knowledge of environment variables to store secrets

Required Credentials
Box OAuth2** – For uploading the backup file(s)
Mailgun API Key** – For sending backup status notifications
(Optional) Database Credentials** – Only if the backup includes a DB dump triggered from inside n8n

Specific Setup Requirements

Variable Example Purpose
BOX_FOLDER_ID 1234567890 ID of the Box folder that stores backups
MAILGUN_DOMAIN mg.example.com Mailgun domain used for sending email
MAILGUN_FROM Backups <[email protected]> “From” address in status emails
NOTIFY_EMAIL [email protected] Recipient of backup status emails

How it works

This workflow automatically schedules, packages, and uploads backups of your databases, files, or configuration exports to Box cloud storage, then sends a completion email via Mailgun. It is ideal for small-to-medium businesses or solo developers who want hands-off, verifiable backups without writing custom scripts.

Key Steps:
Webhook (Scheduler Trigger): Triggers the workflow on a CRON schedule or external call.
Code (DB/File Dump)
: Executes bash or Node.js commands to create a tar/zip or SQL dump.
Move Binary Data**: Converts the created file into n8n binary format.
Set**: Attaches metadata (timestamp, file name).
Split In Batches* (optional): Splits multiple backup files for sequential uploads.
Box Node
*: Uploads each backup file into the specified Box folder.
HTTP Request (Verify Upload): Calls Box API to confirm upload success.
If
: Branches on success vs failure.
Mailgun Node**: Sends confirmation or error report email.
Sticky Notes**: Provide inline documentation inside the workflow canvas.

Set up steps

Setup Time: 15-20 minutes

Clone or import the workflow JSON into your n8n instance.
Create credentials:
Box OAuth2: paste Client ID, Client Secret, perform OAuth handshake.
Mailgun API: add Private API key and domain.
Update environment variables (BOX_FOLDER_ID, MAILGUN_DOMAIN, etc.) or edit the relevant Set node.
Modify the Code node to run your specific backup command, e.g.:
pg_dump -U $DB_USER -h $DB_HOST $DB_NAME > /tmp/db_backup.sql
tar -czf /tmp/full_backup_{{new Date().toISOString()}}.tar.gz /etc/nginx /var/www /tmp/db_backup.sql
Set the CRON schedule inside the Webhook node (or replace with a Cron node) to your desired frequency (daily, weekly, etc.).
Execute once manually to verify the Box upload and email notification.
Enable the workflow.

Node Descriptions

Core Workflow Nodes:
Webhook / Cron** – Acts as the time-based trigger for backups.
Code** – Creates the actual backup archive (tar, zip, SQL dump).
Move Binary Data** – Moves the generated file into binary property.
Set** – Adds filename and timestamp metadata for Box.
Split In Batches** – Handles multiple files when necessary.
Box** – Uploads the backup file to Box.
HTTP Request** – Optional re-check to ensure the file exists in Box.
If** – Routes the flow based on success or error.
Mailgun** – Sends success/failure notifications.
Sticky Note** – Explains credential handling and customization points.

Data Flow:
Webhook/Cron → Code → Move Binary Data → Set → Split In Batches → Box → HTTP Request → If → Mailgun

Customization Examples

Add Retention Policy (Auto-delete old backups)
// In a Code node before upload
const retentionDays = 30;
const cutoff = Date.now() - retentionDays * 246060*1000;

items = items.filter(item => {
return item.json.modifiedAt > cutoff; // keep only recent files
});
return items;

Parallel Upload to S3
// Duplicate the Box node, replace with AWS S3 node
// Use Merge node to combine results before the HTTP Request verification

Data Output Format

The workflow outputs structured JSON data:

{
"fileName": "full_backup_2023-10-31T00-00-00Z.tar.gz",
"boxFileId": "9876543210",
"uploadStatus": "success",
"timestamp": "2023-10-31T00:05:12Z",
"emailNotification": "sent"
}

Troubleshooting

Common Issues
“Invalid Box Folder ID” – Verify BOX_FOLDER_ID and ensure the OAuth user has write permissions.
Mailgun 401 Unauthorized – Check that you used the Private API key and the domain is verified.
Backup file too large – Enable chunked upload in Box node or increase client_max_body_size on reverse proxy.

Performance Tips
Compress backups with gzip or zstd to reduce upload time.
Run the database dump on the same host as n8n to avoid network overhead.

Pro Tips:
Store secrets as environment variables and reference them in Code nodes (process.env.MY_SECRET).
Chain backups with version numbers (YYYYMMDD_HHmm) for easy sorting.
Use n8n’s built-in execution logging to audit backup history.

This is a community workflow template provided “as-is” without warranty. Adapt and test in a safe environment before using in production.

Nodes used in this workflow

Popular HTTP Request and Mailgun workflows

Back up databases and files to Box with Mailgun email notifications

Scheduled Backup Automation – Mailgun & Box This workflow automatically schedules, packages, and uploads backups of your databases, files, or configuration exports to Box cloud storage, then sends a completion email via Mailgun. It is ideal for small-to-medium businesses or solo developers who want hands-off, verifiable backups without writing custom scripts. Pre-conditions/Requirements Prerequisites n8n instance (self-hosted or n8n.cloud) Box account with a folder dedicated to backups Mailgun account & verified domain Access to the target database/server you intend to back up Basic knowledge of environment variables to store secrets Required Credentials Box OAuth2** – For uploading the backup file(s) Mailgun API Key** – For sending backup status notifications (Optional) Database Credentials** – Only if the backup includes a DB dump triggered from inside n8n Specific Setup Requirements | Variable | Example | Purpose | |-------------------------|------------------------------------------|---------------------------------------| | BOX_FOLDER_ID | 1234567890 | ID of the Box folder that stores backups | | MAILGUN_DOMAIN | mg.example.com | Mailgun domain used for sending email | | MAILGUN_FROM | Backups <[email protected]> | “From” address in status emails | | NOTIFY_EMAIL | [email protected] | Recipient of backup status emails | How it works This workflow automatically schedules, packages, and uploads backups of your databases, files, or configuration exports to Box cloud storage, then sends a completion email via Mailgun. It is ideal for small-to-medium businesses or solo developers who want hands-off, verifiable backups without writing custom scripts. Key Steps: Webhook (Scheduler Trigger)**: Triggers the workflow on a CRON schedule or external call. Code (DB/File Dump)**: Executes bash or Node.js commands to create a tar/zip or SQL dump. Move Binary Data**: Converts the created file into n8n binary format. Set**: Attaches metadata (timestamp, file name). Split In Batches* *(optional): Splits multiple backup files for sequential uploads. Box Node**: Uploads each backup file into the specified Box folder. HTTP Request (Verify Upload)**: Calls Box API to confirm upload success. If**: Branches on success vs failure. Mailgun Node**: Sends confirmation or error report email. Sticky Notes**: Provide inline documentation inside the workflow canvas. Set up steps Setup Time: 15-20 minutes Clone or import the workflow JSON into your n8n instance. Create credentials: Box OAuth2: paste Client ID, Client Secret, perform OAuth handshake. Mailgun API: add Private API key and domain. Update environment variables (BOX_FOLDER_ID, MAILGUN_DOMAIN, etc.) or edit the relevant Set node. Modify the Code node to run your specific backup command, e.g.: pg_dump -U $DB_USER -h $DB_HOST $DB_NAME > /tmp/db_backup.sql tar -czf /tmp/full_backup_{{new Date().toISOString()}}.tar.gz /etc/nginx /var/www /tmp/db_backup.sql Set the CRON schedule inside the Webhook node (or replace with a Cron node) to your desired frequency (daily, weekly, etc.). Execute once manually to verify the Box upload and email notification. Enable the workflow. Node Descriptions Core Workflow Nodes: Webhook / Cron** – Acts as the time-based trigger for backups. Code** – Creates the actual backup archive (tar, zip, SQL dump). Move Binary Data** – Moves the generated file into binary property. Set** – Adds filename and timestamp metadata for Box. Split In Batches** – Handles multiple files when necessary. Box** – Uploads the backup file to Box. HTTP Request** – Optional re-check to ensure the file exists in Box. If** – Routes the flow based on success or error. Mailgun** – Sends success/failure notifications. Sticky Note** – Explains credential handling and customization points. Data Flow: Webhook/Cron → Code → Move Binary Data → Set → Split In Batches → Box → HTTP Request → If → Mailgun Customization Examples Add Retention Policy (Auto-delete old backups) // In a Code node before upload const retentionDays = 30; const cutoff = Date.now() - retentionDays * 246060*1000; items = items.filter(item => { return item.json.modifiedAt > cutoff; // keep only recent files }); return items; Parallel Upload to S3 // Duplicate the Box node, replace with AWS S3 node // Use Merge node to combine results before the HTTP Request verification Data Output Format The workflow outputs structured JSON data: { "fileName": "full_backup_2023-10-31T00-00-00Z.tar.gz", "boxFileId": "9876543210", "uploadStatus": "success", "timestamp": "2023-10-31T00:05:12Z", "emailNotification": "sent" } Troubleshooting Common Issues “Invalid Box Folder ID” – Verify BOX_FOLDER_ID and ensure the OAuth user has write permissions. Mailgun 401 Unauthorized – Check that you used the Private API key and the domain is verified. Backup file too large – Enable chunked upload in Box node or increase client_max_body_size on reverse proxy. Performance Tips Compress backups with gzip or zstd to reduce upload time. Run the database dump on the same host as n8n to avoid network overhead. Pro Tips: Store secrets as environment variables and reference them in Code nodes (process.env.MY_SECRET). Chain backups with version numbers (YYYYMMDD_HHmm) for easy sorting. Use n8n’s built-in execution logging to audit backup history. This is a community workflow template provided “as-is” without warranty. Adapt and test in a safe environment before using in production.
+2

Process Scanned Invoices with Google Drive, OCR & OpenAI to Google Sheets

This template allows you to automatically process scanned invoices from Google Drive, extract key information using AI, and organize the data in Google Sheets with email notifications. Overview This comprehensive workflow automates the entire invoice processing pipeline by monitoring a Google Drive folder for new invoice uploads, intelligently processing both PDF and image formats, extracting structured data using AI-powered information extraction, and automatically organizing the results in a Google Sheet while sending email notifications. The system handles various file formats and includes smart fallback mechanisms for challenging documents like CamScanner PDFs. How it Works File Monitoring: The workflow continuously monitors a specified Google Drive folder for new invoice files using a trigger that checks every minute for newly created files. File Processing: When new files are detected, the system downloads them and determines the file type (PDF or image) using a smart switch mechanism. Text Extraction: For PDFs: Attempts direct text extraction first For Images: Uses OCR.Space API for optical character recognition For problematic PDFs (like CamScanner): Falls back to OCR processing AI Information Extraction: Processes the extracted text through OpenAI's language model to identify and extract key invoice information including: Company name Total amount Currency Invoice date Invoice number Data Storage: Automatically appends the extracted information to a Google Sheet with links back to the original scanned documents. Notification: Sends formatted email notifications via Mailgun when new invoices are processed, including an HTML table summary. How to Use Setup Google Drive: Create a dedicated folder in Google Drive for invoice uploads and note the folder ID. Configure Credentials: Set up the following credential connections in n8n: Google Drive OAuth2 API Google Sheets OAuth2 API OpenAI API OCR.Space API Mailgun API Update Configuration: Replace the Google Drive folder ID with your target folder Replace the Google Sheets document ID with your destination spreadsheet Update email addresses in the Mailgun node Test the Workflow: Use the manual trigger to process existing invoices in your folder for initial testing. Activate: Enable the workflow to start automatic monitoring of new invoice uploads. Requirements External APIs: OpenAI API** - For AI-powered information extraction from invoice text OCR.Space API** - For optical character recognition of image-based invoices Mailgun API** - For sending email notifications Google Services: Google Drive API** - For monitoring folders and downloading files Google Sheets API** - For storing extracted invoice data Setup Prerequisites: Google Drive folder dedicated to invoice uploads Google Sheet with appropriate column headers (date, company name, total, currency, invoice number, scan link, etc.) Email domain configured with Mailgun (or alternative email service) OCR.Space account for image processing capabilities: https://ocr.space/OCRAPI Recommended Settings: Set the Google Drive trigger to check for new files every minute Ensure sufficient API rate limits for your expected invoice volume Configure proper error handling for failed OCR or AI extraction attempts

Build your own HTTP Request and Mailgun integration

Create custom HTTP Request and Mailgun workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

Use case

Save engineering resources

Reduce time spent on customer integrations, engineer faster POCs, keep your customer-specific functionality separate from product all without having to code.

Learn more

FAQs

  • Can HTTP Request connect with Mailgun?

  • Can I use HTTP Request’s API with n8n?

  • Can I use Mailgun’s API with n8n?

  • Is n8n secure for integrating HTTP Request and Mailgun?

  • How to get started with HTTP Request and Mailgun integration in n8n.io?

Need help setting up your HTTP Request and Mailgun integration?

Discover our latest community's recommendations and join the discussions about HTTP Request and Mailgun integration.
Moiz Contractor
theo
Jon
Dan Burykin
Tony

Looking to integrate HTTP Request and Mailgun in your company?

Over 3000 companies switch to n8n every single week

Why use n8n to integrate HTTP Request with Mailgun

Build complex workflows, really fast

Build complex workflows, really fast

Handle branching, merging and iteration easily.
Pause your workflow to wait for external events.

Code when you need it, UI when you don't

Simple debugging

Your data is displayed alongside your settings, making edge cases easy to track down.

Use templates to get started fast

Use 1000+ workflow templates available from our core team and our community.

Reuse your work

Copy and paste, easily import and export workflows.

Implement complex processes faster with n8n

red iconyellow iconred iconyellow icon