Files
n8n-backup-v2/workflows/TG4xp9tHbkFEh7FA.json
T
2026-05-28 14:20:59 +00:00

229 lines
5.2 KiB
JSON

{
"id": "TG4xp9tHbkFEh7FA",
"name": "schwab-token",
"nodes": [
{
"parameters": {
"path": "schwab-token",
"responseMode": "responseNode",
"options": {}
},
"type": "n8n-nodes-base.webhook",
"typeVersion": 2.1,
"position": [
0,
0
],
"id": "7917528c-c422-488c-bddc-34c0c2264413",
"name": "Webhook",
"webhookId": "b58008aa-9fd9-4058-8108-7e87c923bafe"
},
{
"parameters": {
"operation": "getAll",
"limit": 1,
"filters": {
"q": "\"Schwab\" AND \"Your code for online login\"",
"readStatus": "both",
"sender": "voice-noreply@google.com"
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
208,
0
],
"id": "a91fe95f-6608-4e34-bed2-e96abfc1e22d",
"name": "Get many messages",
"webhookId": "c0669fcd-9bd2-40bb-b675-6c56a5d57731",
"alwaysOutputData": false,
"credentials": {
"gmailOAuth2": {
"id": "VHbUFo39yKkrSroG",
"name": "ben.io-gmail"
}
}
},
{
"parameters": {
"language": "pythonNative",
"pythonCode": "import re\n\nfor _item in _items:\n snippet = _item['json'].get('snippet', '')\n match = re.search(r'online login is (\\d+)', snippet)\n _item['json']['login_code'] = match.group(1) if match else None\n\nreturn _items"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
416,
0
],
"id": "4b90fed1-a7ac-4bb5-bfbc-f8022586b541",
"name": "Code in Python"
},
{
"parameters": {
"operation": "markAsRead",
"messageId": "={{ $json.id }}"
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
624,
0
],
"id": "131ef688-f24e-423a-9ebd-793e8a886854",
"name": "Mark a message as read",
"webhookId": "6228bce2-7fb9-4995-bf5d-a645d9286ed4",
"credentials": {
"gmailOAuth2": {
"id": "VHbUFo39yKkrSroG",
"name": "ben.io-gmail"
}
}
},
{
"parameters": {
"resource": "thread",
"operation": "trash",
"threadId": "={{ $json.threadId }}"
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
832,
0
],
"id": "0ba31cda-fd34-430d-818d-e0e399f9df5a",
"name": "Trash a thread",
"webhookId": "b4a95f45-1a95-4e55-aa47-31a7206a8d51",
"credentials": {
"gmailOAuth2": {
"id": "VHbUFo39yKkrSroG",
"name": "ben.io-gmail"
}
},
"disabled": true
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "456fedf8-bc63-4f0e-84e2-dab4ea51cc47",
"name": "login_code",
"value": "={{ $('Code in Python').item.json.login_code }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1040,
0
],
"id": "2d4df05c-b429-4573-8903-94c82be2e58f",
"name": "Edit Fields"
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={\n \"login_code\": \"{{ $json.login_code }}\"\n}",
"options": {
"responseCode": 200
}
},
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.5,
"position": [
1248,
0
],
"id": "849e1866-0640-4a88-ab80-69d4ffeb0567",
"name": "Respond to Webhook"
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Get many messages",
"type": "main",
"index": 0
}
]
]
},
"Get many messages": {
"main": [
[
{
"node": "Code in Python",
"type": "main",
"index": 0
}
]
]
},
"Code in Python": {
"main": [
[
{
"node": "Mark a message as read",
"type": "main",
"index": 0
}
]
]
},
"Mark a message as read": {
"main": [
[
{
"node": "Trash a thread",
"type": "main",
"index": 0
}
]
]
},
"Trash a thread": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1",
"binaryMode": "separate"
},
"triggerCount": 1,
"versionId": "56ec580d-9919-4d3a-8636-2a31f2210f61",
"owner": {
"type": "personal",
"projectId": "FeLO36wNUAcn61Wj",
"projectName": "Ben W <admin@ben.io>",
"personalEmail": "admin@ben.io"
},
"parentFolderId": "b8EBocUAMiXPV5Ec",
"isArchived": false
}