This workflow follows the HTTP Request → Postgres recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "Keyword Search with Email Notifications",
"nodes": [
{
"parameters": {
"resource": "tender",
"operation": "searchByKeyword",
"keywords": "engenharia civil ponte infraestrutura",
"startDate": "2025-01-01",
"endDate": "2025-12-31",
"returnAll": false,
"limit": 50
},
"id": "keyword-search",
"name": "Search Infrastructure Tenders",
"type": "n8n-nodes-aec-tenders.aecTenders",
"typeVersion": 1,
"position": [
300,
200
]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": false,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"id": "high-value-filter",
"leftValue": "={{ $json.estimatedTotalValue }}",
"rightValue": 1000000,
"operator": {
"type": "number",
"operation": "gt"
}
},
{
"id": "critical-urgency",
"leftValue": "={{ $json._urgencyLevel }}",
"rightValue": "critical",
"operator": {
"type": "string",
"operation": "equals"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "filter-high-value",
"name": "Filter High-Value Critical Tenders",
"type": "n8n-nodes-base.filter",
"typeVersion": 2,
"position": [
500,
200
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "format-notification",
"name": "emailSubject",
"value": "\ud83d\udea8 High-Value Infrastructure Tender Alert: {{ $json.procuringEntityName }}",
"type": "string"
},
{
"id": "format-body",
"name": "emailBody",
"value": "New high-value infrastructure tender found:\n\n\ud83d\udccb **Tender Details:**\n- Entity: {{ $json.procuringEntityName }}\n- Object: {{ $json.tenderObject }}\n- Value: R$ {{ $json.estimatedTotalValue.toLocaleString('pt-BR') }}\n- Category: {{ $json._category }}\n- Risk Score: {{ $json._riskScore }}/100\n- Urgency: {{ $json._urgencyLevel }}\n\n\ud83d\udcc5 **Important Dates:**\n- Publication: {{ $json.publicationDate }}\n- Proposal Opening: {{ $json.proposalOpeningDate }}\n\n\ud83d\udd17 **Portal Link:** {{ $json.portalUrl }}\n\n---\nGenerated by n8n AEC Tenders Node",
"type": "string"
}
]
},
"options": {}
},
"id": "format-notification",
"name": "Format Email Notification",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
700,
200
]
},
{
"parameters": {
"authentication": "genericCredentialType",
"genericAuthType": "httpBasicAuth",
"nodeCredentialType": "gmailOAuth2Api",
"requestMethod": "POST",
"url": "https://gmail.googleapis.com/gmail/v1/users/me/messages/send",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "raw",
"value": "={{ $json.emailSubject + '\\n\\n' + $json.emailBody }}"
}
]
},
"options": {}
},
"id": "send-email-alert",
"name": "Send Email Alert",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
900,
200
],
"credentials": {
"gmailOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"operation": "create",
"table": "tender_alerts",
"columns": {
"mappingMode": "defineBelow",
"value": {
"pncp_id": "={{ $json.pncpId }}",
"entity_name": "={{ $json.procuringEntityName }}",
"tender_object": "={{ $json.tenderObject }}",
"estimated_value": "={{ $json.estimatedTotalValue }}",
"category": "={{ $json._category }}",
"risk_score": "={{ $json._riskScore }}",
"urgency_level": "={{ $json._urgencyLevel }}",
"portal_url": "={{ $json.portalUrl }}",
"publication_date": "={{ $json.publicationDate }}",
"proposal_opening_date": "={{ $json.proposalOpeningDate }}",
"alert_sent_at": "={{ new Date().toISOString() }}"
}
},
"options": {}
},
"id": "log-to-database",
"name": "Log to Database",
"type": "n8n-nodes-base.postgres",
"typeVersion": 2.4,
"position": [
700,
400
],
"credentials": {
"postgres": {
"name": "<your credential>"
}
}
}
],
"connections": {
"Search Infrastructure Tenders": {
"main": [
[
{
"node": "Filter High-Value Critical Tenders",
"type": "main",
"index": 0
}
]
]
},
"Filter High-Value Critical Tenders": {
"main": [
[
{
"node": "Format Email Notification",
"type": "main",
"index": 0
},
{
"node": "Log to Database",
"type": "main",
"index": 0
}
]
]
},
"Format Email Notification": {
"main": [
[
{
"node": "Send Email Alert",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "example-v1.0.0",
"meta": {
"templateCredsSetupCompleted": false
},
"id": "keyword-search-with-notifications",
"tags": [
"aec",
"tenders",
"alerts",
"email",
"database",
"monitoring"
]
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
gmailOAuth2Apipostgres
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Keyword Search with Email Notifications. Uses n8n-nodes-aec-tenders, httpRequest, postgres. Manual trigger; 5 nodes.
Source: https://github.com/tjsasakifln/AEC-Tenders/blob/96b162942b2d529cd6039d18034bf4087d897ed4/examples/keyword-search-with-notifications.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
External Integrations Workflow. Uses start, httpRequest, mongoDb, postgres. Manual trigger; 9 nodes.
DomFasad Product Scraper. Uses start, httpRequest, postgres. Manual trigger; 9 nodes.
Universo-Users. Uses httpRequest, postgres. Event-driven trigger; 10 nodes.
Stream Start Workflow. Uses httpRequest, postgres. Webhook trigger; 7 nodes.
BTC_Poll. Uses start, httpRequest, postgres. Scheduled trigger; 5 nodes.