darrell_tw
Martech Engineer with automation. here is my website: https://www.darrelltw.com/
Templates by darrell_tw
Generate images with GPT-image-1 and store in Google Drive with cost tracking
How it works Receive a chat input as an image prompt. Call OpenAI's gpt-image-1 API to generate an image. Split the returned images and process them one by one. Upload each generated image to Google Drive. Save image links and thumbnails to a Google Sheets document. Record token usage and estimated cost into a separate sheet. Set up steps Connect your OpenAI API credentials for image generation. Connect your Google Drive and Google Sheets accounts. Set the destination folder in Google Drive. Set the target Google Sheet and specify the correct sheet tabs. The setup usually takes around 5-10 minutes. Detailed field mappings are already pre-configured inside the workflow. Additional tips and instructions are included as sticky notes inside the workflow. Google Sheet copy url Copy Sheet Link
Credit card payment reminder & tracking-for Taiwan banks
Workflow Description This workflow automates the processing of credit card statement emails from multiple banks. It extracts important payment details, stores them in Google Sheets, and creates calendar reminders in Google Calendar. Additionally, it allows users to update the payment status once the bill has been paid. --- Key Features Email Processing: Retrieves credit card statement emails from eight Taiwanese banks. PDF Parsing: Extracts payment due date and amount from email content or attached PDF files. Google Sheets Integration: Logs extracted data into a Google Sheets document for record-keeping. Google Calendar Integration: Creates Google Calendar events as reminders for due payments. Webhook for Payment Updates: Allows users to update the payment status via a webhook. --- Node Configurations Email Retrieval Purpose: Fetches credit card statement emails from Gmail. Configuration: Email Filters: SinoPac Bank: from:(newebill.banksinopac.com.tw) SinoPac Bank Credit Card E-Statement Notification Cathay United Bank: from:(service@pxbillrc01.cathaybk.com.tw) Cathay United Bank Monthly E-Statement CTBC Bank: from:(ebill@estats.ctbcbank.com) CTBC Bank Credit Card E-Statement Taipei Fubon Bank: from:(rs@cf.taipeifubon.com.tw) Taipei Fubon Bank Credit Card Statement E.SUN Commercial Bank: from:(estatement@esunbank.com) E.SUN Commercial Bank Credit Card E-Statement DBS Bank: from:(eservicetw@dbs.com) DBS Bank Credit Card E-Statement Union Bank of Taiwan: from:(聯邦銀行信用卡) Union Bank of Taiwan Credit Card E-Statement (Year Month) Taishin International Bank: from:(webmaster@bhurecv.taishinbank.com.tw) Taishin International Bank Credit Card E-Statement --- Extract Payment Information Purpose: Extracts payment due date, total amount, and minimum payment amount. Methods: Text-based Extraction: Uses regex to parse email body. PDF Parsing: Extracts text from PDF attachments. --- Data Processing and Storage 3.1. Consolidate Extracted Data Purpose: Standardizes extracted payment details. Data Fields: paymentduedate payment_amount minimum_payment email_id bank email_subject 3.2. Google Sheets Integration Purpose: Stores the extracted data in a structured format. Configuration: Sheet Name: n8n-Credit Card Payment Reminder Columns: calendar_id Paid Billing Period Amount Minimum Payment Bank email_id --- Google Calendar Integration 4.1. Create Calendar Reminders Purpose: Generates reminders for upcoming payments. Configuration: Event Title: Credit Card Payment - {{ bank }} Due Date: paymentduedate Reminders: 30 minutes before 60 minutes before 1 day before 4.2. Update Payment Status Purpose: Updates the calendar event once payment is made. Configuration: Webhook URL: Automatically updates the Google Calendar event title and description. --- Webhook for Payment Updates Purpose: Users can mark a payment as paid via a webhook. Configuration: Webhook Path: darrelldemocreditcardpayupdate_path Updates: Marks the payment as Paid Updates Google Calendar and Google Sheets
Automated water consumption tracker - stored in sheet and notify in Slack
Water Reminder Workflow This workflow demonstrates how to use n8n and Slack to build an intelligent water drinking reminder system, combined with Google Sheets for data recording and OpenAI for generating personalized reminder messages. --- Google Sheet Template The iOS shortcut template: The result in iOS health: The template demo in Youtube --- Key Features Scheduled Reminders: Automatically sends water reminders at random times every hour. Intelligent Scheduling: Delays the next reminder if you've recently had water. AI-Generated Messages: Uses OpenAI to generate friendly and non-repetitive reminder messages. Data Tracking: Records daily water intake and calculates percentage of goal achievement. Quick Response: Easily record water intake through Slack buttons. iOS Integration: Provides iOS shortcut links to sync data with the Health app. --- Pre-Configuration Requirements To use this workflow, you need to set up the following: Google Sheets: Create a Google spreadsheet with log and setting sheets The log sheet should include date, time, and value columns The setting sheet is used to store daily water intake goals Slack: Create a Slack app and obtain an API token Configure permissions for interactive buttons OpenAI: Obtain an OpenAI API key iOS Shortcut (optional): Create an iOS shortcut named darrell_water for recording health data --- Node Configurations Scheduled Triggers and Data Collection 1.1. Schedule Trigger Purpose: Triggers water reminders on schedule Configuration: Cron Expression: 0 {{ Math.floor(Math.random() 11) }} 8-23 Triggers at a random minute every hour, only between 8 AM and 11 PM 1.2. Google Sheets - Get Target Purpose: Retrieves daily water intake goal Configuration: Document ID: Your Google spreadsheet ID Sheet Name: setting 1.3. Google Sheets - Get Log Purpose: Retrieves today's water intake records Configuration: Document ID: Your Google spreadsheet ID Sheet Name: log Filter Condition: date equals today's date {{ $now.format('yyyy-MM-dd') }} 1.4. Summarize Purpose: Calculates total water intake for today Configuration: Fields to Summarize: value (sum) 1.5. Limit Purpose: Gets the most recent water intake record Configuration: Keep: Last items --- Intelligent Reminder Logic 2.1. Combine Data Purpose: Merges target and actual water intake data Configuration: Combine By: Combine by position Number of Inputs: 3 2.2. If Purpose: Checks if water was consumed recently Configuration: Condition: {{ DateTime.fromISO($json.date+"T"+$json.time).format('yyyy-MM-dd HH:mm:ss') }} is after {{ $now.minus(30, "minutes") }} 2.3. Wait Purpose: Randomly delays the reminder if water was consumed recently Configuration: Wait Time: {{ Math.floor(Math.random() * 1) + 1 }} minutes --- AI Message Generation and Sending 3.1. OpenAI Purpose: Generates personalized water reminder messages Configuration: Model: gpt-4o-mini Messages: System prompt: Requests responses in Traditional Chinese and in JSON format User prompt: Includes information about last water time, current time, goal, and progress Temperature: 1 3.2. Slack Send Drink Notification Purpose: Sends water reminders to Slack channel Configuration: Channel: Your Slack channel ID Message Type: Block Block UI: Contains AI-generated reminder message and water amount buttons (100ml, 150ml, 200ml, 250ml, 300ml) --- User Interaction and Data Recording 4.1. Slack Drink Webhook Purpose: Receives user interactions when water buttons are clicked Configuration: HTTP Method: POST Path: slack-water-webhook 4.2. Slack Action Payload Purpose: Parses Slack interaction data Configuration: Mode: Raw JSON Output: {{ $json.body.payload }} 4.3. Slack Action Drink Data Purpose: Extracts water amount and message information Configuration: Assignments: value: {{ $json.actions[0].value }} message_text: {{ $json.message.text }} shortcuturl: shortcuts://run-shortcut?name=darrellwater&input= shortcuturldata: JSON containing water amount and time messagets: {{ $json.container.messagets }} 4.4. Google Sheets Purpose: Records water intake data to spreadsheet Configuration: Operation: Append Document ID: Your Google spreadsheet ID Sheet Name: log Column Mapping: date: {{ $now.format('yyyy-MM-dd') }} time: {{ $now.format('HH:mm:ss') }} value: {{ $json.value }} 4.5. Send to Slack with Confirm Purpose: Sends confirmation message and provides iOS shortcut link Configuration: Channel: Your Slack channel ID Message Type: Block Block UI: Contains confirmation message and iOS Health app button Reply Settings: Reply to the thread of the original message --- Author Information This workflow was created by darrelltw, an engineer focused on AI and Automation. Contact: X Threads Instagram Website
Check which AI models are used in your workflows
How it works Fetch all workflows from your n8n instance. Filter workflows that contain nodes with a modelId setting. Extract the node names, model IDs, model names, workflow names, and workflow URLs. Save the extracted information into a connected Google Sheet. Set up steps Connect your n8n API credentials. Connect your Google Sheets account. Replace "Your n8n domain" with your actual domain URL. Use this Google Sheet template to create a new sheet for results. Setup typically takes 5 minutes. Be cautious: if you have over 100 workflows, performance may be impacted. Notes Sticky notes inside the workflow provide extra guidance. This workflow clears old sheet data before writing new results. Make sure your n8n instance allows API access. Result Example Update: It didn't detect the AI model in tool originally. Now it's fixed! Update 20250429: Support 1.91.0 with open node directly! Optimize the url with node id.
TW-Request-Agri data open platform-daily market sheep pricing
This workflow automates the process of fetching agricultural transaction data from the Taiwan Agricultural Products Open Data Platform and storing it in a Google Sheets document for further analysis. Key Features Manual Trigger: Allows manual execution of the workflow to control when data is fetched. HTTP Request: Sends a request to the Open Data Platform's API to retrieve detailed transaction data, including: Pricing (Upper, Middle, Lower, Average) Transaction quantities Crop and market details Split Out Node: Processes each record individually, ensuring accurate handling of every data entry. Google Sheets Integration: Appends the data into a structured Google Sheets document for easy access and analysis. --- Node Configurations Manual Trigger Purpose: Start the workflow manually. Configuration: No setup needed. HTTP Request Purpose: Fetch agricultural data. Configuration: URL: https://data.moa.gov.tw/api/v1/SheepQuotation Query Parameters: Start_time: 2024/12/01 End_time: 2024/12/31 MarketName: 台北二 apikey: <yourapi_key> Headers: accept: application/json Split Out Purpose: Split the API response data array into individual items. Configuration: Field to Split Out: Data Google Sheets Purpose: Append the data to Google Sheets. Configuration: Operation: Append Document ID: <yourdocumentid> Sheet Name: Sheet1 Mapped Fields: TransDate, TcType, CropCode, CropName, MarketCode, MarketName UpperPrice, MiddlePrice, LowerPrice, AvgPrice, Trans_Quantity --- 此 Workflow 從 台灣農業產品開放資料平臺 獲取農產品交易數據,並將其儲存到 Google Sheets 文件 中進行進一步分析。 主要功能 Manual Trigger:允許手動執行工作流程,以控制數據獲取的時間。 HTTP Request:向開放資料平臺的 API 發送請求,獲取詳細的交易數據,包括: 價格 (Upper, Middle, Lower, Average) 交易數量 作物和市場詳細資料 Split Out Node:逐筆處理每一筆記錄,確保數據準確無誤。 Google Sheets Integration:將數據追加到結構化的 Google Sheets 文件中,方便存取和分析。 --- 節點設定 Manual Trigger 用途:手動啟動工作流程。 設定:無需額外設定。 HTTP Request 用途:抓取農產品數據。 設定: URL: https://data.moa.gov.tw/api/v1/SheepQuotation 查詢參數 (Query Parameters): Start_time: 2024/12/01 End_time: 2024/12/31 MarketName: 台北二 apikey: <yourapi_key> 標頭 (Headers): accept: application/json Split Out 用途:將 API 回應的數據陣列分解為個別項目。 設定: Field to Split Out: Data Google Sheets 用途:將數據追加至 Google Sheets。 設定: Operation:Append Document ID:<yourdocumentid> Sheet Name:Sheet1 映射欄位 (Mapped Fields): TransDate, TcType, CropCode, CropName, MarketCode, MarketName UpperPrice, MiddlePrice, LowerPrice, AvgPrice, Trans_Quantity 請多利用 Curl Import 功能 例如 language curl -X GET "https://data.moa.gov.tw/api/v1/AgriProductsTransType/?Starttime=114.01.01&Endtime=114.01.01&MarketName=%E5%8F%B0%E5%8C%97%E4%BA%8C" -H "accept: application/json" 農業資料開放平台 文件