Quick Overview
This workflow collects tasks via a webhook, stores validated tasks in Google Sheets, and runs a daily prioritization routine that creates urgent items in Google Tasks with Slack alerts while summarizing medium/low tasks with OpenAI and emailing the digest via Gmail.
How it works
- Receives a POST webhook request containing task details and normalizes fields like priority and due date.
- Validates required fields (including allowed priority values) and rejects invalid submissions with an error.
- Appends valid tasks to Google Sheets with a pending status and returns a success response to the webhook caller.
- Runs daily on a schedule, reads tasks from Google Sheets, keeps only pending items, removes duplicates, and sorts them by priority.
- For high-priority tasks, creates a Google Tasks item and sends a Slack alert.
- For medium and low-priority tasks, compiles a digest, generates an email-ready summary with OpenAI, and sends it via Gmail.
- Updates each handled task in Google Sheets with a Processed status and a processed timestamp.
Setup
- Create a Google Sheet with columns for taskName, priority, category, dueDate, status, createdAt, and processedAt, and update the spreadsheet and sheet IDs in the Google Sheets steps.
- Add Google Sheets OAuth2 credentials for both reading and updating/appending rows.
- Add credentials for Google Tasks, Slack (OAuth2), Gmail, and OpenAI, and set the target Google Task list, Slack destination, and email recipients/subject as needed.
- Copy the webhook URL from the webhook trigger and configure your task intake source to send POST requests with fields like "Task Name", "Priority", "Category", and "Due Date".
- Adjust the schedule time and any validation rules (required fields and accepted priority values) to match your process.