by Lucas Perret
This workflow enriches new accounts in Pipedrive using Datagma API by adding data about ICP (ideal customer profile). Instead of Pipedrive, you can use any other CRM. In this example, ideal buyers are heads of sales/business development. Prerequisites Pipedrive account and Pipedrive credentials How it works Pipedrive trigger node starts the workflow when a new company is created. HTTP Request node queries data from Datagma. Pipedrive node updates Pipedrive contact with new data from Datagma. The Item Lists node simplifies returned data from Datagma that contain lists (arrays), enabling you to easily modify the structure for further processing without the need to use Function nodes and write custom JavaScript. IF node identifies if the lead corresponds ICP. HTTP Request node searches for emails in Datagma. Set node prepares data for further merging. Merge node combines data from multiple streams. Pipedrive node adds a new person in Pipedrive.
by Paulo Ramirez
Receive realtime call-event data from telli Purpose and Problem Solved This template automates the process of receiving and acting upon real-time call event data from telli, an AI-powered voice agent platform. It solves the challenge of manually updating CRM records and initiating follow-up actions based on call outcomes. By leveraging webhooks and n8n's powerful workflow capabilities, this template enables businesses to instantly update their Airtable CRM and trigger appropriate follow-up actions, enhancing efficiency and responsiveness in customer interactions. Prerequisites An active telli account with API access and webhook capabilities An Airtable base set up as your CRM n8n instance (cloud or self-hosted) Airtable Specifications Create an Airtable base with the following table and fields: Table: Contacts Fields: Name (Single line text) Phone (Phone number) Email (Email) Appointment_Booked (Checkbox) Interest (Single select: High, Medium, Low) Last_Call_Date (Date) Notes (Long text) Step-by-Step Setup Instructions Webhook Configuration in telli: Log into your telli dashboard Navigate to the webhook settings Set the endpoint URL to your n8n Webhook node URL Select the "call_ended" event to trigger the webhook n8n Workflow Setup: Create a new workflow in n8n Add a Webhook node as the trigger Configure the Webhook node to receive POST requests Parse Webhook Data: Add a Set node to extract relevant information from the webhook payload Map fields such as call_outcome, appointment_booked, and interest Decision Logic: Add a Switch node to create different paths based on the call outcome Create branches for scenarios like "Appointment Booked", "Interested", and "Not Interested" Airtable Integration: Add Airtable nodes for each outcome to update the Contacts table Configure the nodes to update fields like Appointment_Booked, Interest, and Last_Call_Date Follow-up Actions: For "Interested" but not booked outcomes, add an Email node to trigger a follow-up email campaign For "Appointment Booked", add a node to create a calendar event or task Testing and Activation: Use the n8n testing feature to simulate webhook calls and verify each path Once satisfied, activate the workflow Example Workflow Webhook receives a "call_ended" event from telli Set node extracts call_outcome: appointment_booked = true, interest = true Switch node directs to the "Appointment Booked" path Airtable node updates the contact record: Set Appointment_Booked to true Set Interest to "High" Update Last_Call_Date Calendar node creates an appointment for the booked slot Example Payload Below is an example of the payload you might receive from telli when a call ends: { "event": "call_ended", "call": { "call_id": "b4a05730-2abc-4eb0-8066-2e4d23b53ba9", "attempt": 1, "from_number": "+17755719467", "to_number": "+16506794960", "external_contact_id": "external-123", "contact_id": "6bd1e7e0-6d00-4c0b-ad5b-daa72457a27d", "agent_id": "d8931604-92ad-45cf-9071-d9cd2afbad0c", "triggered_at": 1731956924302, "started_at": 1731956932264, "booked_slot_for": "2025-02-24T15:30:00Z", "ended_at": 1731957002078, "call_length_min": 2, "call_status": "COMPLETED", "transcript": "Agent: Hello...", "transcriptObject": [ { "role": "agent", "content": "Hello..." } ], "call_analysis": { "summary": { "value": true, "details": "A call between an agent and a customer talking about buying an ice cream machine" }, "appointment": { "value": true, "details": "2025-02-18T15:30:00Z" }, "interest": { "value": true, "details": "The customer is interested in buying an ice cream machine" } } } } In this example, you can see that the call resulted in a booked appointment and showed customer interest. Your n8n workflow would process this data, updating the Airtable CRM and triggering any necessary follow-up actions. By implementing this template, businesses can automate their post-call processes, ensuring timely follow-ups and accurate CRM updates. This real-time integration between telli's AI voice agents and your Airtable CRM streamlines operations, improves customer engagement, and increases the efficiency of your sales and support teams.
by Yang
Who is this for? This workflow is for digital marketers, small business owners, lead generation agencies, and VAs who need a scalable way to find and store local business leads using AI. It’s especially useful for teams that want to enrich leads with real-time news insights and save the structured data to Airtable. What problem is this workflow solving? Manually researching local businesses and staying up to date with relevant news is time-consuming and inefficient. This automation eliminates that burden by using Dumpling AI chat agents to generate leads and context, GPT-4o to summarize, and Airtable to store everything in one place. What this workflow does This AI workflow listens for a manual trigger in n8n and executes the following steps: Extracts local business leads using a Local Business Agent from Dumpling AI. Pulls current news related to the business type or location using a News Agent from Dumpling AI. Uses GPT-4o to combine both responses into a human-readable summary. Extracts structured lead data like name, category, and city. Saves the summary and lead data into Airtable for easy follow-up. Setup 1. Create AI Agents in Dumpling AI Sign in at Dumpling AI Create two separate agents: Local Business Agent: Designed to respond with structured lists of businesses by location and category. News Agent: Designed to fetch relevant recent news and summaries about a specific industry or region. After setting up each agent, copy the Agent Key from Dumpling AI. These keys will be required in the headers of your HTTP Request nodes in n8n. 2. Manual Trigger This workflow begins with a manual trigger inside n8n, Which is the When chat message is recieved. This makes it easy to test and reuse, especially during setup. 3. Get Local Business Data from Dumpling AI The first HTTP Request node sends a prompt like List 5 top real estate companies in Atlanta with full address and services. Include your Local Business Agent Key in the x-agent-key header. The response will return a structured list of business leads. 4. Get News Context from Dumpling AI The second HTTP Request node sends a prompt such as Give me the latest news related to the real estate market in Atlanta. Use your News Agent Key in the header. This fetches a brief set of recent news summaries relevant to the businesses being researched. 5. Use GPT-4o to Merge and Summarize The GPT node combines the list of businesses and news into one coherent summary. You can modify the prompt to output in paragraph format, bullet points, or structured notes. 6. Save Lead to Airtable The Airtable node sends all structured fields into your selected base and table. Be sure to connect your Airtable account and confirm the columns match exactly. How to customize this workflow Replace the prompt inside the HTTP node to focus on different types of businesses or cities. Expand the GPT output to include additional lead info like websites, phone numbers, or emails if the agent includes them. Add a webhook trigger to allow this flow to be run via a chatbot, external app, or button. Link to HubSpot or another CRM to sync the leads automatically. Duplicate the process to run for multiple industries in parallel. Final Notes You must create and configure your Dumpling AI agents first before running this workflow. The Agent Keys from Dumpling AI are required in both HTTP Request nodes. This flow is modular and flexible, ready for deeper CRM integrations. The manual trigger is great for testing, but you can add a Webhook node to automate it. This workflow helps you launch an intelligent lead gen process that combines location-targeted business discovery, AI-generated insights, and structured CRM-friendly output, all powered by Dumpling AI and OpenAI.
by Pedro Santos
🤖 AI Agent Web Search using SearchApi & LLM Who is this for? This workflow is ideal for anyone conducting online research, including students, researchers, content creators, and professionals looking for accurate, up-to-date, and verifiable information. It also serves as an excellent foundation for building more sophisticated AI-driven applications. What problem does this workflow solve? / Use case This workflow automates web searches by enabling an AI agent to efficiently retrieve and summarize external, verifiable information, ensuring accuracy through source citations. What this workflow does Connects an AI agent node to SearchApi.io as an integrated search tool. Empowers the AI agent to perform real-time web searches using various SearchApi engines (e.g., Google, Bing). Allows the AI agent to dynamically determine search parameters based on user interaction, delivering contextually relevant results. Ensures responses include clearly cited sources for validation and further exploration. Setup Install the SearchApi community node: Open Settings → Community Nodes inside your self‑hosted n8n instance. Fill npm Package Name with @searchapi/n8n-nodes-searchapi. Accept the risk prompt, and hit Install. It should now appear as a node when you search for it. API Configuration: Set up your SearchApi.io credentials in n8n. Add your preferred LLM provider credentials (e.g., OpenRouter API). Input Requirements: Provide the YouTube video ID (e.g., wBuULAoJxok). Connect LLM Integration: Configure the summarization chain with your chosen model and parameters for text splitting. How to customize this workflow to your needs Integrate additional nodes to structure or store search results (e.g., saving to databases, Notion, Google Sheets). Extend chatbot capabilities to integrate with messaging platforms (Slack, Discord) or email notifications. Adjust search parameters and filters within the AI agent node to tailor information retrieval. Example Usage Input**: User asks, "What are the latest developments in AI regulation?" Output**: AI retrieves, summarizes, and cites recent, authoritative articles and news sources from the web.
by TechDennis
Edit an existing image with OpenAI ImageGen1 via API Request Transform your creative pipeline by letting n8n call OpenAI ImageGen1’s edit image endpoint, automatically replacing or augmenting parts of any image you supply and returning a brand-new version in seconds. Designers, marketers, and product teams can eliminate repetitive manual edits and test more variations, faster. Who is this for? Content creators who need quick, on-brand image tweaks Marketers running A/B visual tests at scale Developers exploring the new ImageGen1 API inside low-code automations Use case / problem solved Opening design software to mask, fill, or swap objects is slow and error-prone. This workflow feeds an input image plus a prompt to OpenAI ImageGen1, receives the edited output, and passes it on to any service you like—perfect for bulk-editing product shots, social visuals, or UI mocks. What this workflow does Read or receive the source image (Webhook → Binary Data). Call OpenAI ImageGen1 with an HTTP Request node, sending the image and edit prompt. Parse the JSON response to capture the returned image URL. Download & hand off the edited file (e.g., upload to S3, post to Slack, or store in Drive). Setup Add your OpenAI API key in the API KEY node. Follow the notes on the workflow for more information. (Optional) Point the final node to your preferred storage or chat tool. > 📝 A sticky note in the workflow summarizes these steps and links to the OpenAI documentation. How to customize this workflow Trigger alternatives**: Replace the Chat with Google Drive, Airtable, etc. Chained edits**: Loop the output back for successive prompts. Conditional flows**: Add an If node to branch actions by image size or category. With renamed nodes, color-coded sticky notes, and a concise setup guide, you’ll be editing images via OpenAI ImageGen1 in under five minutes—no code, maximum creativity.
by KlickTipp
Community Node Disclaimer: This workflow uses KlickTipp community nodes. How It Works This workflow automates personalized WhatsApp message template delivery triggered by events in KlickTipp or by messages sent to the Whatsapp Business account. When a contact triggers an Outbound, the workflow uses a pre-approved WhatsApp message template to send dynamic, real-time messages through the WhatsApp Business Cloud API. When receiving messages it checks whether a cancellation should be processed or if a auto-response is sent. This setup is ideal for time-sensitive campaigns such as: Birthday greetings Discount or promo notifications Follow-ups on product or service interest Key Features KlickTipp Trigger Starts the workflow when a specific outbound is triggered Typical use case: subcriber receives activation Tag and triggers an Outbound which sends a webhook call to trigger WhatsApp messaging. WhatsApp Business Cloud - Message Trigger Listens to messages from the contact and processes answers with answering auto-responder or by tagging the contact in KlickTipp. WhatsApp Business Cloud - Sending Template Messages Sends WhatsApp message templates using a pre-approved template. Template placeholders are filled with data from KlickTipp custom fields. Setup Instructions Set up the KlickTipp and Whatsapp nodes in your n8n instance. Authenticate your WhatsApp and KlickTipp accounts. Create the necessary custom fields to match the data structure Verify and customize field assignments in the workflow to align with your specific form and subscriber list setup. | Field Label | Field Type | |--------------------------------|-------------| | Whatsapp_Produkt/Dienstleistung | Single line | | | Whatsapp_Name/Unternehmen | Single line | | Whatsapp_Link_Endung | Single line | Testing & Deployment Use a real test contact with all required fields filled. Trigger the Outbound in KlickTipp using the activation tag and answer with a message to the template. Run the scenario once in n8n to verify successful delivery of the whatsapp message template to your test contact as well as the reception of the auto-responder and the subscription and tagging in KlickTipp to stop further messages. Campaign Expansion Ideas Connect campaign to process keywords like "STOP" from WhatsApp messages Pair WhatsApp with welcome email series for onboarding. Use tags like product_interest_X for precise segmentation. A/B test templates with different CTA formats or timings. Monitor CTRs via dynamic URLs in WhatsApp templates. Benefits Multi-channel engagement:** Adds WhatsApp to your marketing toolkit. Dynamic content:** Personalizes messages using contact data. KlickTipp campaign control** Whatsapp contacts can for example signal with messages like "STOP" to receive the according Tag in KlickTipp in order to start/end automations. > 💡 Pro Tip: Customize the domain link ending per campaign or product line. This allows targeted redirects, e.g., meinshop.de/ProduktA or `mein Ressources: Send WhatsApp Templates with KlickTipp Use KlickTipp Community Node in n8n Automate Workflows: KlickTipp Integration in n8n
by Mutasem
Use case This workflow uses Gmail to send outreach emails to new Hubspot contacts that have yet to be contacted (usually unknown contacts), and records the outreach in Hubspot. Setup Setup HubSpot Oauth2 creds (Be careful with scopes. They have to be exact, not less or more. Yes, it's not simple, but it's well documented in the n8n docs. Be smarter than me, read the docs) Setup Gmail creds. Change the from email and from name in the Record outreach in HubSpot node How to adjust this template to your needs Change the email message in the Set keys node Think about your criteria to reach out to new contacts. Here we simply filter for only contacts with unknown dates.
by Hugo
This workflow provides a robust solution for automatically backing up all your n8n workflows to a designated GitHub repository on a daily basis. By leveraging the n8n API and GitHub API, it ensures your workflows are version-controlled and securely stored, safeguarding against data loss and facilitating disaster recovery. How it works The automation follows these key steps: Scheduled trigger: The workflow is initiated automatically every day at a pre-configured time. List existing backups: It first connects to your GitHub repository to retrieve a list of already backed-up workflow files. This helps in determining whether a workflow's backup file needs to be created or updated. Retrieve n8n workflows: The workflow then fetches all current workflows directly from your n8n instance using the n8n REST API. Process and prepare: Each retrieved workflow is individually processed. Its data is converted into JSON format. This JSON content is then encoded to base64, a format suitable for GitHub API file operations. Commit to GitHub: For each n8n workflow: A standardized filename is generated (e.g., workflow-name-tag.json). The workflow checks if a file with this name already exists in the GitHub repository (based on the list fetched in step 2). If the file exists: It updates the existing file with the latest version of the workflow. If it's a new workflow (file doesn't exist): A new file is created in the repository. Each commit is timestamped for clarity. This process ensures that you always have an up-to-date version of all your n8n workflows stored securely in your GitHub version control system, providing peace of mind and a reliable backup history. Pre-requisites Before you can use this template, please ensure you have the following: An active n8n instance (self-hosted or cloud). A GitHub account. A GitHub repository created where you want to store the workflow backups. A GitHub Personal Access Token with repo scope (or fine-grained token with read/write access to the specific backup repository). This token will be used for GitHub API authentication. n8n API credentials (API key) for your n8n instance. Set up steps Setting up this workflow should take approximately 10-15 minutes if you have your credentials ready. Import the template: Import this workflow into your n8n instance. Configure n8n API credentials: Locate the "Retrieve workflows" node. In the "Credentials" section for "n8n API", create new credentials (or select existing ones). Enter your n8n instance URL and your n8n API Key (you can create your n8n api key in the settings of your n8n instance) Configure GitHub credentials: Locate the "List files from repo" node (and subsequently "Update file" / "Upload file" nodes which will use the same credential). In the "Credentials" section for "GitHub API", create new credentials. Select OAuth2/Personal Access Token authentication method. Enter the GitHub Personal Access Token you generated as per the pre-requisites. Specify repository details: In the "List files from repo", "Update file", and "Upload file" GitHub nodes: Set the Owner: Your GitHub username or organization name. Set the Repository: The name of your GitHub repository dedicated to backups. Set the Branch (e.g., main or master) where backups should be stored. (Optional) Specify a Path within the repository if you want backups in a specific folder (e.g., n8n_backups/). Leave blank to store in the root. Adjust schedule (Optional): Select the "Schedule Trigger" node. Modify the trigger interval (e.g., change the time of day or frequency) as needed. By default, it's set for a daily run. Activate the workflow: Save and activate the workflow. Explanation of nodes Here's a detailed breakdown of each node used in this workflow: Schedule trigger** Type: n8n-nodes-base.scheduleTrigger Purpose: This node automatically starts the workflow based on a defined schedule (e.g., daily at midnight). List files from repo** Type: n8n-nodes-base.github Purpose: Connects to your specified GitHub repository and lists all files, primarily to check for existing workflow backups. Aggregate** Type: n8n-nodes-base.aggregate Purpose: Consolidates the list of file names obtained from the "List files from repo" node into a single item for easier lookup later in the "Check if file exists" node. Retrieve workflows** Type: n8n-nodes-base.n8n Purpose: Uses the n8n API to fetch a list of all workflows currently present in your n8n instance. Json file** Type: n8n-nodes-base.convertToFile Purpose: Takes the data of each workflow (retrieved by the "Retrieve workflows" node) and converts it into a structured JSON file format. To base64** Type: n8n-nodes-base.extractFromFile Purpose: Converts the binary content of the JSON file (from the "Json file" node) into a base64 encoded string. This encoding is required by the GitHub API for file content. Commit date & file name** Type: n8n-nodes-base.set Purpose: Prepares metadata for the GitHub commit. It generates: commitDate: The current date and time for the commit message. fileName: A standardized file name for the workflow backup (e.g., my-workflow-vps-backups.json), typically using the workflow's name and its first tag. Check if file exists** Type: n8n-nodes-base.if Purpose: A conditional node. It checks if the fileName (generated by "Commit date & file name") is present in the list of files aggregated by the "Aggregate" node. This determines if the workflow backup already exists in GitHub. Update file** Type: n8n-nodes-base.github Purpose: If the "Check if file exists" node determines the file does exist, this node updates that existing file in your GitHub repository with the latest workflow content (base64 encoded) and a commit message. Upload file** Type: n8n-nodes-base.github Purpose: If the "Check if file exists" node determines the file does not exist, this node creates and uploads a new file to your GitHub repository with the workflow content and a commit message. Customization Here are a few ways you can customize this template to better fit your needs: Backup path**: In the GitHub nodes ("List files from repo", "Update file", "Upload file"), you can specify a Path parameter to store backups in a specific folder within your repository (e.g., workflows/ or daily_backups/). Filename convention**: Modify the "Commit date & file name" node (specifically the expression for fileName) to change how backup files are named. For example, you might want to include the workflow ID or a different date format. Commit messages**: Customize the commit messages in the "Update file" and "Upload file" GitHub nodes to include more specific information if needed. Error handling**: Consider adding error handling branches (e.g., using the "Error Trigger" node or checking for node execution failures) to notify you if a backup fails for any reason. Filtering workflows**: If you only want to back up specific workflows (e.g., those with a particular tag or name pattern), you can add a "Filter" node after "Retrieve workflows" to include only the desired workflows in the backup process. Backup frequency**: Adjust the "Schedule Trigger" node to change how often the backup runs (e.g., hourly, weekly, or on specific days). Template was created in n8n v1.92.2
by Airtop
Define Your ICP from Customer LinkedIn Profiles Use Case This automation helps marketing and sales teams define their Ideal Customer Profile (ICP) using real LinkedIn profiles of current high-fit customers. By enriching and analyzing profile data, it generates a clear ICP definition and scoring methodology for future targeting. What This Automation Does This automation analyzes LinkedIn profiles of your existing customers and produces: A structured ICP definition A scoring model to evaluate future prospects A Google Boolean search string to find similar prospects Input: LinkedIn profile URLs of existing high-fit customers (e.g., https://www.linkedin.com/in/amirashkenazi/) Output: A Google Doc containing the ICP analysis and scoring methodology How It Works Trigger: Waits for a chat message containing one or more LinkedIn profile URLs. AI Agent: Parses and processes the URLs. Airtop Data Enrichment: Uses Airtop to extract structured information from each LinkedIn profile (e.g., job title, company, experience, skills). Memory: Maintains state between inputs for consistent analysis. LLM Analysis: Uses Claude 3.7 Sonnet to synthesize enriched data into a meaningful ICP. Google Docs: Automatically creates a new doc with a timestamped title and appends the ICP definition. Setup Requirements Airtop Profile connected to LinkedIn, Insert the profile name in the Airtop Tool Airtop API credentials. Get it free here If you choose to activate saving the profiles in Google Docs you will need OAuth2 credentials (or just copy the ICP definition from the chat) Next Steps Use the ICP for Scoring**: Feed new LinkedIn profiles through the same Airtop enrichment and use the scoring function to evaluate fit. Automate Target Discovery**: Plug the Boolean search output into LinkedIn, Google, or People Data Labs for ICP-matching lead generation. Refine Continuously**: Repeat the workflow as your customer base grows or segments evolve. Read more about how to Define ICP from Customer Examples
by Airtop
Monitor X for Relevant Posts Use Case This automation monitors X (formerly Twitter) search pages in real time and extracts high-signal posts that match your categories of interest. It’s ideal for community engagement, lead discovery, thought leadership tracking, or competitive analysis. What This Automation Does Given a search URL and a list of categories, it: Logs into X using Airtop Opens the specified search URL Scrolls through the results Extracts up to 10 valid, English-language posts Filters and classifies each post by category (or marks as [NA] if unrelated) Returns the structured results as JSON Input parameters: airtop_profile** — An Airtop browser profile authenticated on X x_url** — X search URL (e.g., https://x.com/search?q=ai agents&f=live) relevant_categories** — Text-based list of categories to classify posts (e.g., "Web automation use cases", "Thought leadership") Output: A JSON array of posts, each with: writer time text url category How It Works Trigger: This workflow is triggered by another workflow (e.g., a community engagement pipeline). Input Setup: Accepts the Airtop profile, search URL, and categories to use for classification. Session: Starts a browser session using the Airtop profile. Window Navigation: Opens the provided X search URL. Extraction: Scrapes up to 10 posts with /status/ in the URL and text in English. Classification: Each post is labeled with a category if relevant, or [NA] otherwise. Filtering: Discards [NA] posts. Output: Returns the list of classified posts. Setup Requirements Airtop profile with an active X login. Airtop API key connected in n8n. List of category definitions to guide post classification (used in prompt). Next Steps Feed into Engagement Workflows**: Pass the results to workflows that reply, retweet, or track posts. Use in Slack Alerts**: Push classified posts into Slack channels for review and reaction. Customize Classifier**: Refine the categorization logic to include sentiment or company mentions. Read more about Monitoring X for Relevant Posts
by bangank36
This workflow converts an exported CSV from Squarespace profiles into a Shopify-compatible format for customer import. How It Works Clone this Google Sheets template, which includes two sheets: Squarespace Profiles (Input) Go to Squarespace Dashboard → Contacts Click the three-dot icon → Select Export all Contacts Shopify Customers (Output) This sheet formats the data to match Shopify's customer import CSV. Shopify Dashboard → Customers → Import customers by CSV The workflow can run on-demand or be triggered via webhook. Via webhook Set up webhook node to expect a POST request Trigger the webhook using this code (psuedo) - replace {webhook-url} with the actual URL const formData = new FormData(); formData.append('file', blob, 'profiles_export.csv'); // Add file to FormData fetch('{webhook-url}', { // Replace with your target URL method: 'POST', mode: 'no-cors', body: formData }); The data is processed into the Shopify Customers sheet. Manually trigger Import Squarespace profiles into the sheet. Run the workflow to convert and populate the Shopify Customers sheet. Once workflow is done, export the Shopify to csv and import to Shopify customers Requirements To use this template, you need: Google Sheets API credentials Google Sheets Setup Use this sample Google Sheets template to get started quickly. Who Is This For? For anyone looking to automate Squarespace contact exports into a Shopify-compatible format—no more manual conversion! Explore More Templates Check out my other n8n templates: 👉 n8n.io/creators/bangank36
by Akhil Varma Gadiraju
📥 Gmail Attachment Backup to Google Drive — n8n Workflow This n8n workflow automatically backs up email attachments from a specific sender in Gmail to a designated folder in Google Drive. It polls Gmail every minute and uploads any new attachments from matching emails to the specified Google Drive folder with a timestamped filename. 📌 Use Case Primary Purpose: Automatically archive and back up attachments from a specific sender (e.g., test@gmail.com) to Google Drive for safekeeping, audit, or processing. Ideal For: Automating invoice/receipt collection from a vendor Archiving reports from a monitored email address Creating a searchable historical log of attachments for compliance 🧭 Workflow Overview Here’s how the workflow operates: 🔔 Gmail Trigger Polls Gmail every minute for new messages from a specific sender (test@gmail.com). 📩 Gmail Get Message Retrieves the full contents (including attachments) of the matched email. 🧠 Code (JS) Iterates over all binary attachments in the email and restructures them as individual binary items to upload separately. 📤 Google Drive Uploads each attachment to a target Google Drive folder (DOcs) with a timestamp and unique name. 📍 Replace Me (NoOp) Placeholder node to indicate workflow completion. You can replace this with Slack notifications, logs, or alerts. 🔧 How to Use Prerequisites An n8n instance (self-hosted or cloud) A connected Gmail account with OAuth2 credentials A connected Google Drive account with OAuth2 credentials Permissions for n8n to access your Gmail and Google Drive Setup Instructions Import the Workflow Copy and paste the workflow JSON into your n8n editor. Set Up Credentials Ensure the following credentials exist and are authorized: `Gmail (for Gmail nodes) `Google Drive (for Google Drive node) Configure the Folder Update the folderId in the Google Drive node if you want to use a different target folder. Activate the Workflow Enable the workflow in n8n. It will start polling Gmail every minute. ✏️ How to Customize | Task | How to Customize | |------|------------------| | Change sender filter | Modify the sender field in the Gmail Trigger node | | Adjust polling frequency | Change the pollTimes configuration in the trigger node | | Change destination folder | Update folderId in the Google Drive node | | Modify filename format | Edit the name expression in the Google Drive node | | Add post-upload logic | Replace or extend the Replace Me node with notifications, logs, etc. | | Process only specific attachments | Add logic in the Code node to filter by filename or MIME type | 📂 Filename Format Example [MessageID]_[Timestamp]_backup_attachment This naming convention ensures uniqueness and traceability back to the original message. ✅ Future Improvements Email subject filtering** to narrow down the match Slack/Email notifications** after upload Deduplication check** to avoid reuploading the same files Virus scan or file validation** before upload 💬 Support For any issues using this workflow: Double-check your credential permissions Review n8n logs for Gmail or Google Drive errors Visit the n8n community forums