Compare commits

..

No commits in common. "6e8266191e6bbe598866cf0c3d42555264fbe0a2" and "57cfa574599658545d83d00fc3b88ade00885ed3" have entirely different histories.

2 changed files with 58 additions and 125 deletions

View File

@ -512,14 +512,14 @@
"settings": {}, "settings": {},
"staticData": { "staticData": {
"node:Gmail Trigger": { "node:Gmail Trigger": {
"lastTimeChecked": 1683626203, "lastTimeChecked": 1683549862,
"possibleDuplicates": [ "possibleDuplicates": [
"187fff122cbd3873" "187fb64501523ded"
] ]
} }
}, },
"tags": [], "tags": [],
"triggerCount": 1, "triggerCount": 1,
"updatedAt": "2023-05-09T09:57:28.000Z", "updatedAt": "2023-05-08T12:45:28.000Z",
"versionId": "25daa2a4-b5e0-4360-b8bb-1ded9c07453f" "versionId": "25daa2a4-b5e0-4360-b8bb-1ded9c07453f"
} }

View File

@ -16,7 +16,18 @@
"main": [ "main": [
[ [
{ {
"node": "Move Binary Data", "node": "Kontaktsegmente einlesen",
"type": "main",
"index": 0
}
]
]
},
"Kontaktsegmente einlesen": {
"main": [
[
{
"node": "GraphQL",
"type": "main", "type": "main",
"index": 0 "index": 0
} }
@ -127,46 +138,6 @@
} }
] ]
] ]
},
"Crypto": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
]
]
},
"IF": {
"main": [
[
{
"node": "GraphQL",
"type": "main",
"index": 0
}
],
[
{
"node": "No Operation, do nothing1",
"type": "main",
"index": 0
}
]
]
},
"Move Binary Data": {
"main": [
[
{
"node": "Crypto",
"type": "main",
"index": 0
}
]
]
} }
}, },
"createdAt": "2023-04-30T12:45:41.935Z", "createdAt": "2023-04-30T12:45:41.935Z",
@ -247,9 +218,7 @@
"parameters": { "parameters": {
"httpMethod": "POST", "httpMethod": "POST",
"path": "c83eb6ce-40dd-418c-952a-ed62a051a00b", "path": "c83eb6ce-40dd-418c-952a-ed62a051a00b",
"options": { "options": {}
"rawBody": true
}
}, },
"id": "4a01eed5-9378-47f3-98ab-e00848ba0093", "id": "4a01eed5-9378-47f3-98ab-e00848ba0093",
"name": "Webhook1", "name": "Webhook1",
@ -266,15 +235,15 @@
"authentication": "headerAuth", "authentication": "headerAuth",
"endpoint": "https://lana-kk.myshopify.com/admin/api/2022-01/graphql.json", "endpoint": "https://lana-kk.myshopify.com/admin/api/2022-01/graphql.json",
"requestFormat": "json", "requestFormat": "json",
"query": "={\n customers(first: 1, query: \"email:'{{ $json[\"body\"][\"mautic.lead_channel_subscription_changed\"][0][\"contact\"][\"fields\"][\"core\"][\"email\"][\"value\"] }}'\" ) {\n edges {\n node {\n id\n email\n marketingOptInLevel\n }\n }\n }\n}" "query": "={\n customers(first: 1, query: \"email:'{{ $node[\"Webhook1\"].json[\"body\"][\"mautic.lead_post_save_update\"][0][\"contact\"][\"fields\"][\"core\"][\"email\"][\"value\"] }}'\" ) {\n edges {\n node {\n id\n email\n marketingOptInLevel\n }\n }\n }\n}"
}, },
"id": "1bc94c14-ceda-42e1-94dc-1ac91ac72f8b", "id": "1bc94c14-ceda-42e1-94dc-1ac91ac72f8b",
"name": "GraphQL", "name": "GraphQL",
"type": "n8n-nodes-base.graphql", "type": "n8n-nodes-base.graphql",
"typeVersion": 1, "typeVersion": 1,
"position": [ "position": [
940, 440,
700 840
], ],
"credentials": { "credentials": {
"httpHeaderAuth": { "httpHeaderAuth": {
@ -286,10 +255,11 @@
{ {
"parameters": { "parameters": {
"conditions": { "conditions": {
"string": [ "number": [
{ {
"value1": "= {{ $node.Webhook1.json.body[\"mautic.lead_channel_subscription_changed\"][0].new_status }} ", "value1": "={{ $node[\"Kontaktsegmente einlesen\"].json[\"lists\"][\"1\"][\"id\"] }}",
"value2": "contactable" "operation": "equal",
"value2": 1
} }
] ]
} }
@ -299,10 +269,36 @@
"type": "n8n-nodes-base.if", "type": "n8n-nodes-base.if",
"typeVersion": 1, "typeVersion": 1,
"position": [ "position": [
1180, 680,
700 840
] ]
}, },
{
"parameters": {
"url": "=https://ma.lanakk.com/api/contacts/{{ $json[\"body\"][\"mautic.lead_post_save_update\"][0][\"contact\"][\"id\"] }}/segments",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "mauticOAuth2Api",
"options": {}
},
"id": "fdeca80d-3e71-43f0-b02e-11736038519a",
"name": "Kontaktsegmente einlesen",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 3,
"position": [
240,
840
],
"credentials": {
"mauticOAuth2Api": {
"id": "20",
"name": "Mautic account"
},
"mauticApi": {
"id": "23",
"name": "Mautic account 2"
}
}
},
{ {
"parameters": { "parameters": {
"conditions": { "conditions": {
@ -336,8 +332,8 @@
"type": "n8n-nodes-base.graphql", "type": "n8n-nodes-base.graphql",
"typeVersion": 1, "typeVersion": 1,
"position": [ "position": [
1420, 920,
840 980
], ],
"credentials": { "credentials": {
"httpHeaderAuth": { "httpHeaderAuth": {
@ -359,8 +355,8 @@
"type": "n8n-nodes-base.graphql", "type": "n8n-nodes-base.graphql",
"typeVersion": 1, "typeVersion": 1,
"position": [ "position": [
1420, 920,
560 700
], ],
"credentials": { "credentials": {
"httpHeaderAuth": { "httpHeaderAuth": {
@ -465,80 +461,17 @@
"name": "lanakk.com" "name": "lanakk.com"
} }
} }
},
{
"parameters": {
"action": "hmac",
"type": "SHA256",
"value": "={{ $json.data }}",
"dataPropertyName": "=key",
"secret": "0a9dcfe4f362625efc5a38bc709598c61869552fcfc1aceb8fc08edad8dd3825",
"encoding": "base64"
},
"id": "31deaf45-706d-4bcc-b92a-1f0ed7f8ff9e",
"name": "Crypto",
"type": "n8n-nodes-base.crypto",
"typeVersion": 1,
"position": [
460,
840
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $json[\"headers\"][\"webhook-signature\"] }}",
"value2": "={{ $json.key }}"
}
]
}
},
"id": "dec9961f-d754-4d87-980f-61853ea66a14",
"name": "IF",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
680,
840
]
},
{
"parameters": {
"setAllData": false,
"options": {}
},
"id": "cfff982c-953b-49fd-8d43-340ca7a1f447",
"name": "Move Binary Data",
"type": "n8n-nodes-base.moveBinaryData",
"typeVersion": 1,
"position": [
240,
840
]
},
{
"parameters": {},
"id": "9f471b45-d736-494d-9221-49c45f700c8b",
"name": "No Operation, do nothing1",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
940,
1000
]
} }
], ],
"pinData": {}, "pinData": {},
"settings": {}, "settings": {},
"staticData": { "staticData": {
"node:Shopify Trigger": { "node:Shopify Trigger": {
"webhookId": 1264992682249 "webhookId": 1264671260937
} }
}, },
"tags": [], "tags": [],
"triggerCount": 2, "triggerCount": 2,
"updatedAt": "2023-05-09T04:32:31.000Z", "updatedAt": "2023-05-08T03:29:30.000Z",
"versionId": "9edfa535-aa10-45dc-a499-913ec16830a5" "versionId": "c7e602bc-6a91-44f7-a82f-8afb75afde12"
} }