OctiAI

Categories

Scheduled ETL Workflow Blueprint (n8n) — Template

Turn a requirements brief into a production-ready, node-by-node n8n ETL spec with mappings, validation, retries, migration handling, and tests.

What You'll Get

How to Use

Supply exact schemas and unique keys up front

Provide both the source JSON Schema (or representative sample records) and the target warehouse schema (column names/types). Explicitly list unique key fields used for idempotency (e.g., external_id, email). Example: {"source_schema": {"id": "string","email": "string","amount": "number"}, "unique_keys": ["id"]}. Without these the template must pause and request them, which delays delivery.

Works Best With

Best used for converting verbal or written ETL/integration briefs into production-ready n8n/Zapier/Make workflow blueprints when you can provide:

Prompt Template

# Automation & Workflow Blueprints (n8n/Zapier/Make) (use EXACT section order)

## Goal
- Daily scheduled ETL: export data from {{source_app}}, apply schema validation and transformations defined by {{transform_rules}}, handle schema migrations, enforce idempotency/dedupe, and load into {{warehouse_target}} with alerting to {{failure_alert_channel}} on failures. Provide a node-by-node n8n-ready workflow spec, mapping tables, retries/timeouts, dedupe strategy, and test payloads.

## Inputs
- Trigger: daily scheduled run (cron: daily at 02:00 UTC by default; prompt will accept a different cron if provided).
- Apps and integrations: {{source_app}} → intermediate transforms → {{warehouse_target}}.
- Auth assumptions: credentials for {{source_app}} and {{warehouse_target}} provided via {{auth_method}}-compatible credentials in n8n.
- Schemas/payloads: source schema = {{source_schema}}. Target schema must be inferred or provided; if missing, the prompt will request it.
- Failure policy: send alerts to {{failure_alert_channel}} and follow retry/dead-letter rules described below.
- Idempotency key: design uses a deterministic idempotency key per-record based on configured unique keys; dedupe rule described below.
- Dedupe rule: primary unique keys must be identified; if not provided, the prompt will request them before generating merge logic.

If any critical input above is missing, the prompt will ask for it before producing the workflow spec.

## Prompt
You are an expert n8n automation architect. Produce a complete, production-ready n8n workflow blueprint for a scheduled daily ETL that exports data from {{source_app}}, transforms and validates records according to {{transform_rules}} against the provided source schema {{source_schema}}, handles schema migrations, and loads into {{warehouse_target}} using credentials via {{auth_method}}. Send failure alerts to {{failure_alert_channel}}.

Requirements (must be satisfied in the output):
1. Provide a brief Overview summarizing intent, success criteria, and SLAs for the run.
2. Output an ordered Node list for n8n with exact node names and types. For each node include:
   - Node type (n8n node name), purpose, and placement in the flow.
   - Exact configuration settings (parameters), expressions where needed, credential names, and sample values.
   - Input/output data contract (example record JSON) and the precise field used as the idempotency key.
   - For API/webhook nodes, include the request method, full path, required headers, and example request/response payload schemas.
3. Provide Field mapping tables:
   - Source field → intermediate field → target field.
   - Data types, nullable rules, transformation logic (explicit functions or expression syntax).
   - Validation rules per field and actions on validation failure.
4. Include detailed Retries/timeouts + dedupe strategy:
   - Retry policy per node (max attempts, backoff strategy, intervals).
   - Overall workflow timeout and cancellation rules.
   - Idempotency key generation algorithm and dedupe merge algorithm with conflict resolution examples.
   - Dead-letter path: how failed records are stored and retried or archived.
5. Include Error handling rules and branching logic:
   - Branches for validation failures, transient upstream errors, authentication failures, and schema drift (migration path).
   - Fallback steps for partial failures (e.g., load partial batch, mark records for manual review).
   - Alerting rules to {{failure_alert_channel}} including minimal alert payload.
6. Provide Test payload(s):
   - At least three representative JSON test payloads: clean success case, validation-failure case, schema-migration case.
   - Expected result for each test and how to run them in unit tests or n8n manual executions.
7. Include Deployment & Run notes:
   - Required n8n credentials, recommended concurrency (batch) size, pagination handling, and monitoring metrics to surface.
8. Ask for any missing critical inputs (e.g., target schema, unique keys, rate limits) before producing the final spec if they were not provided.

Output formatting rules (must follow exactly):
- The output must be structured into the sections in this order: Overview; Node list (ordered); Field mapping table(s); Retries/timeouts + dedupe strategy; Test payload(s).
- Use concrete node configs and avoid abstract/generic nodes; do not use “magic nodes.”
- Show webhook schemas or API payloads when relevant (request/response examples).
- All transformations must be explicit (show code snippets or n8n expression syntax).
- End with a compact deploy checklist and minimal runbook entries for common failures.

Generate the full workflow now. If any critical input is missing from {{source_app}}, {{warehouse_target}}, {{auth_method}}, {{source_schema}}, {{transform_rules}}, or {{failure_alert_channel}}, list the missing items and prompt for them before producing the full spec.

## Output Format
Output:
1) Overview
2) Node list (ordered)
3) Field mapping table(s)
4) Retries/timeouts + dedupe strategy
5) Test payload(s)

Produce the workflow as n8n operator-grade instructions and configurations ready to be pasted into an LLM or used directly by an n8n implementer.

## Guardrails
- No “magic nodes”; every transformation must show explicit expression code, JavaScript snippets, or built-in node parameters.
- Enforce idempotency: include deterministic idempotency key per record and a dedupe merge algorithm.
- Validate schemas before load; on schema drift propose a migration handler node that checkpoints and pauses ingestion.
- All network calls must include timeouts and retry rules with exponential backoff; transient failures must route to a retry branch.
- Provide a dead-letter storage location (e.g., S3/bucket or database table) and retention policy.
- Alerting must contain minimal reproducible context (workflow id, node name, sample failing record idempotency key, error message, timestamp).
- Log every batch run with run_id and metrics: processed, failed, retried, loaded_count.
- Do not assume infinite API quotas; include rate-limit handling and backoff logic.

## Examples
- Mini node list excerpt:
  1) Scheduler (n8n Cron) — cron: 0 2 * * * — outputs run_date.
  2) Source Fetch (HTTP Request or specific node for {{source_app}}) — paginated GET with page token handling; parameters: pageSize=1000; headers: Authorization from {{auth_method}} credentials.
  3) Validator (Function or JSON Schema node) — validate against {{source_schema}}; invalid records → Validation Failure branch that writes to dead-letter + alert to {{failure_alert_channel}}.

Variables

Usage Notes

Not for

Do not include

Scheduled ETL Workflow Blueprint (n8n) — Template

Generate a complete, implementable n8n-ready daily scheduled ETL blueprint: ordered nodes with exact configs, field mapping tables, auth and retry policies, idempotency/dedupe algorithm, schema-migration handling, alerting, and test payloads.

Turn this into a working asset in minutes.

Import into Workspace to auto-fill variables, adapt output style, and iterate with OctiAI's prompt editor.

What you'll get

Output format

Markdown

Best used when

Avoid when

Sign in to save, like, or rate this prompt.

Made for

What to fill in

Use the guidance below to complete each placeholder with the right level of detail.

Source App

Provide the key details needed for this variable.

Transform Rules

Provide the key details needed for this variable.

Warehouse Target

Provide the key details needed for this variable.

Failure Alert Channel

Provide the key details needed for this variable.

Auth Method

Provide the key details needed for this variable.

Source Schema

Provide the key details needed for this variable.

Rules

Canonical Examples

Input: Daily ETL: HubSpot Contacts -> Snowflake. Auth: HubSpot OAuth2 + Snowflake credentials. Transform: normalize phone, build full_name, lower-case email, map lifecycle_stage. Source schema provided. Failure alerts: Slack webhook #infra-alerts.

Loading result...

Failed to load output.

Overview; Node list (Cron, HTTP Request (HubSpot), Pagination, SplitInBatches, Transform (Function), Validate (Function), Compute Idempotency (Function), Snowflake (Execute Query MERGE), Success Logger (S3 Put), Dead-letter (S3 Put) + Slack Alert); Field mappings; Retries/timeouts + dedupe; Test payloads; Deploy checklist & runbook.

Why it works: Covers a typical CRM-to-warehouse ETL: paginated source fetch, deterministic idempotency by email (with fallback), explicit JS transforms and validations, SQL MERGE for idempotent upsert into Snowflake, dead-lettering to S3, and Slack alerts. The node-by-node configs are concrete and n8n-ready.

Input: Daily ETL: Stripe Charges -> BigQuery. Auth: Stripe API Key + BigQuery Service Account. Transform: cents to dollars, parse timestamps, map customer id and payment status. Failure alerts: PagerDuty incoming webhook.

Loading result...

Failed to load output.

Includes Cron, HTTP Request (Stripe), Pagination (starting_after), SplitInBatches, Transform (Function), Validate (Function), Compute idempotency (sha256 of charge id), BigQuery load via staging table + MERGE, dead-letter to GCS, PagerDuty alerts, mapping table, retries, and test payloads.

Why it works: This spec is optimized for a payments source: low-latency idempotency using Stripe's charge id, currency-aware amount transformation, BigQuery staging & MERGE pattern, explicit rate-limit handling for Stripe, and dead-lettering to GCS with PagerDuty alerts. Nodes and code snippets are concrete for n8n implementers.

Works Best With

Best used for converting verbal or written ETL/integration briefs into production-ready n8n/Zapier/Make workflow blueprints when you can provide: