2023-05-01 16:00:21 +00:00
|
|
|
{
|
2023-05-04 04:00:21 +00:00
|
|
|
"active": true,
|
2023-05-01 16:00:21 +00:00
|
|
|
"connections": {
|
|
|
|
"Email suchen": {
|
|
|
|
"main": [
|
|
|
|
[
|
|
|
|
{
|
2023-05-03 16:00:21 +00:00
|
|
|
"node": "Kontakt gefunden?",
|
2023-05-01 16:00:21 +00:00
|
|
|
"type": "main",
|
|
|
|
"index": 0
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
2023-05-02 04:00:24 +00:00
|
|
|
"Webhook": {
|
2023-05-01 16:00:21 +00:00
|
|
|
"main": [
|
|
|
|
[
|
|
|
|
{
|
2023-05-02 04:00:24 +00:00
|
|
|
"node": "Email suchen",
|
2023-05-01 16:00:21 +00:00
|
|
|
"type": "main",
|
|
|
|
"index": 0
|
|
|
|
}
|
2023-05-02 04:00:24 +00:00
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"Webhook1": {
|
|
|
|
"main": [
|
2023-05-01 16:00:21 +00:00
|
|
|
[
|
|
|
|
{
|
2023-05-02 04:00:24 +00:00
|
|
|
"node": "Kontaktsegmente einlesen",
|
2023-05-01 16:00:21 +00:00
|
|
|
"type": "main",
|
|
|
|
"index": 0
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
2023-05-02 04:00:24 +00:00
|
|
|
"Kontaktsegmente einlesen": {
|
2023-05-01 16:00:21 +00:00
|
|
|
"main": [
|
|
|
|
[
|
|
|
|
{
|
2023-05-02 04:00:24 +00:00
|
|
|
"node": "GraphQL",
|
2023-05-01 16:00:21 +00:00
|
|
|
"type": "main",
|
|
|
|
"index": 0
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
2023-05-02 04:00:24 +00:00
|
|
|
"Email vorhanden?": {
|
2023-05-01 16:00:21 +00:00
|
|
|
"main": [
|
|
|
|
[
|
|
|
|
{
|
2023-05-02 04:00:24 +00:00
|
|
|
"node": "Segment hinzufügen",
|
|
|
|
"type": "main",
|
|
|
|
"index": 0
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"node": "Aus Segment entfernen",
|
2023-05-01 16:00:21 +00:00
|
|
|
"type": "main",
|
|
|
|
"index": 0
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
2023-05-02 04:00:24 +00:00
|
|
|
"GraphQL": {
|
2023-05-01 16:00:21 +00:00
|
|
|
"main": [
|
|
|
|
[
|
|
|
|
{
|
2023-05-02 04:00:24 +00:00
|
|
|
"node": "IF1",
|
|
|
|
"type": "main",
|
|
|
|
"index": 0
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"IF1": {
|
|
|
|
"main": [
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"node": "Abonniert",
|
|
|
|
"type": "main",
|
|
|
|
"index": 0
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"node": "GraphQL2",
|
2023-05-01 16:00:21 +00:00
|
|
|
"type": "main",
|
|
|
|
"index": 0
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
2023-05-03 16:00:21 +00:00
|
|
|
},
|
|
|
|
"Mautic": {
|
|
|
|
"main": [
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"node": "Email vorhanden?",
|
|
|
|
"type": "main",
|
|
|
|
"index": 0
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"Kontakt gefunden?": {
|
|
|
|
"main": [
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"node": "Email vorhanden?",
|
|
|
|
"type": "main",
|
|
|
|
"index": 0
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"node": "Marketing Einwilligung?",
|
|
|
|
"type": "main",
|
|
|
|
"index": 0
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"Marketing Einwilligung?": {
|
|
|
|
"main": [
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"node": "Mautic",
|
|
|
|
"type": "main",
|
|
|
|
"index": 0
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"node": "No Operation, do nothing",
|
|
|
|
"type": "main",
|
|
|
|
"index": 0
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
2023-05-01 16:00:21 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"createdAt": "2023-04-30T12:45:41.935Z",
|
|
|
|
"id": "11",
|
|
|
|
"name": "Shopify <--> Mautic",
|
|
|
|
"nodes": [
|
|
|
|
{
|
|
|
|
"parameters": {
|
2023-05-06 04:00:23 +00:00
|
|
|
"authentication": "headerAuth",
|
2023-05-01 16:00:21 +00:00
|
|
|
"httpMethod": "POST",
|
|
|
|
"path": "c40eca92-295d-4172-b699-55fc1913603f",
|
|
|
|
"options": {}
|
|
|
|
},
|
|
|
|
"id": "fa144037-c609-4e1f-871c-b75bed8cdf9a",
|
|
|
|
"name": "Webhook",
|
|
|
|
"type": "n8n-nodes-base.webhook",
|
|
|
|
"typeVersion": 1,
|
|
|
|
"position": [
|
|
|
|
40,
|
2023-05-03 16:00:21 +00:00
|
|
|
0
|
2023-05-01 16:00:21 +00:00
|
|
|
],
|
2023-05-06 04:00:23 +00:00
|
|
|
"webhookId": "c40eca92-295d-4172-b699-55fc1913603f",
|
|
|
|
"credentials": {
|
|
|
|
"httpHeaderAuth": {
|
|
|
|
"id": "14",
|
|
|
|
"name": "Shopify lanakk.com"
|
|
|
|
}
|
|
|
|
}
|
2023-05-01 16:00:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"parameters": {
|
|
|
|
"authentication": "oAuth2",
|
|
|
|
"operation": "getAll",
|
|
|
|
"limit": 1,
|
|
|
|
"options": {
|
2023-05-04 04:00:21 +00:00
|
|
|
"search": "={{ $json.body.email }}"
|
2023-05-01 16:00:21 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"id": "34c7436f-21b8-400a-b754-baacf1f38ec9",
|
|
|
|
"name": "Email suchen",
|
|
|
|
"type": "n8n-nodes-base.mautic",
|
|
|
|
"typeVersion": 1,
|
|
|
|
"position": [
|
|
|
|
240,
|
2023-05-03 16:00:21 +00:00
|
|
|
0
|
2023-05-01 16:00:21 +00:00
|
|
|
],
|
2023-05-03 16:00:21 +00:00
|
|
|
"alwaysOutputData": true,
|
2023-05-01 16:00:21 +00:00
|
|
|
"credentials": {
|
|
|
|
"mauticOAuth2Api": {
|
|
|
|
"id": "20",
|
|
|
|
"name": "Mautic account"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"parameters": {
|
|
|
|
"authentication": "oAuth2",
|
|
|
|
"resource": "contactSegment",
|
|
|
|
"operation": "remove",
|
|
|
|
"contactId": "={{ $json.id }}",
|
|
|
|
"segmentId": 1
|
|
|
|
},
|
|
|
|
"id": "0b888d2a-3790-4182-bf62-73d99a1614a6",
|
|
|
|
"name": "Aus Segment entfernen",
|
|
|
|
"type": "n8n-nodes-base.mautic",
|
|
|
|
"typeVersion": 1,
|
|
|
|
"position": [
|
2023-05-03 16:00:21 +00:00
|
|
|
1380,
|
|
|
|
100
|
2023-05-01 16:00:21 +00:00
|
|
|
],
|
|
|
|
"credentials": {
|
|
|
|
"mauticOAuth2Api": {
|
|
|
|
"id": "20",
|
|
|
|
"name": "Mautic account"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"parameters": {
|
|
|
|
"authentication": "oAuth2",
|
|
|
|
"resource": "contactSegment",
|
|
|
|
"contactId": "={{ $json.id }}",
|
|
|
|
"segmentId": 1
|
|
|
|
},
|
|
|
|
"id": "4db83f86-9ec7-41fa-8faf-7886eb539195",
|
|
|
|
"name": "Segment hinzufügen",
|
|
|
|
"type": "n8n-nodes-base.mautic",
|
|
|
|
"typeVersion": 1,
|
|
|
|
"position": [
|
2023-05-03 16:00:21 +00:00
|
|
|
1380,
|
|
|
|
-140
|
2023-05-01 16:00:21 +00:00
|
|
|
],
|
|
|
|
"credentials": {
|
|
|
|
"mauticOAuth2Api": {
|
|
|
|
"id": "20",
|
|
|
|
"name": "Mautic account"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"parameters": {
|
|
|
|
"httpMethod": "POST",
|
|
|
|
"path": "c83eb6ce-40dd-418c-952a-ed62a051a00b",
|
|
|
|
"options": {}
|
|
|
|
},
|
|
|
|
"id": "4a01eed5-9378-47f3-98ab-e00848ba0093",
|
|
|
|
"name": "Webhook1",
|
|
|
|
"type": "n8n-nodes-base.webhook",
|
|
|
|
"typeVersion": 1,
|
|
|
|
"position": [
|
|
|
|
40,
|
|
|
|
840
|
|
|
|
],
|
|
|
|
"webhookId": "c83eb6ce-40dd-418c-952a-ed62a051a00b"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"parameters": {
|
|
|
|
"authentication": "headerAuth",
|
|
|
|
"endpoint": "https://lana-kk.myshopify.com/admin/api/2022-01/graphql.json",
|
|
|
|
"requestFormat": "json",
|
2023-05-04 04:00:21 +00:00
|
|
|
"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}"
|
2023-05-01 16:00:21 +00:00
|
|
|
},
|
|
|
|
"id": "1bc94c14-ceda-42e1-94dc-1ac91ac72f8b",
|
|
|
|
"name": "GraphQL",
|
|
|
|
"type": "n8n-nodes-base.graphql",
|
|
|
|
"typeVersion": 1,
|
|
|
|
"position": [
|
2023-05-02 04:00:24 +00:00
|
|
|
440,
|
2023-05-01 16:00:21 +00:00
|
|
|
840
|
|
|
|
],
|
|
|
|
"credentials": {
|
|
|
|
"httpHeaderAuth": {
|
|
|
|
"id": "14",
|
|
|
|
"name": "Shopify lanakk.com"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"parameters": {
|
|
|
|
"conditions": {
|
2023-05-02 04:00:24 +00:00
|
|
|
"number": [
|
2023-05-01 16:00:21 +00:00
|
|
|
{
|
2023-05-02 04:00:24 +00:00
|
|
|
"value1": "={{ $node[\"Kontaktsegmente einlesen\"].json[\"lists\"][\"1\"][\"id\"] }}",
|
|
|
|
"operation": "equal",
|
|
|
|
"value2": 1
|
2023-05-01 16:00:21 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"id": "162ccd38-f38c-4a76-8e56-1ab52b89601e",
|
|
|
|
"name": "IF1",
|
|
|
|
"type": "n8n-nodes-base.if",
|
|
|
|
"typeVersion": 1,
|
|
|
|
"position": [
|
2023-05-02 04:00:24 +00:00
|
|
|
680,
|
2023-05-01 16:00:21 +00:00
|
|
|
840
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"parameters": {
|
2023-05-04 04:00:21 +00:00
|
|
|
"url": "=https://ma.lanakk.com/api/contacts/{{ $json[\"body\"][\"mautic.lead_post_save_update\"][0][\"contact\"][\"id\"] }}/segments",
|
2023-05-01 16:00:21 +00:00
|
|
|
"authentication": "predefinedCredentialType",
|
|
|
|
"nodeCredentialType": "mauticOAuth2Api",
|
|
|
|
"options": {}
|
|
|
|
},
|
|
|
|
"id": "fdeca80d-3e71-43f0-b02e-11736038519a",
|
|
|
|
"name": "Kontaktsegmente einlesen",
|
|
|
|
"type": "n8n-nodes-base.httpRequest",
|
|
|
|
"typeVersion": 3,
|
|
|
|
"position": [
|
2023-05-02 04:00:24 +00:00
|
|
|
240,
|
2023-05-01 16:00:21 +00:00
|
|
|
840
|
|
|
|
],
|
|
|
|
"credentials": {
|
|
|
|
"mauticOAuth2Api": {
|
|
|
|
"id": "20",
|
|
|
|
"name": "Mautic account"
|
|
|
|
},
|
|
|
|
"mauticApi": {
|
|
|
|
"id": "23",
|
|
|
|
"name": "Mautic account 2"
|
|
|
|
}
|
|
|
|
}
|
2023-05-02 04:00:24 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"parameters": {
|
|
|
|
"conditions": {
|
|
|
|
"boolean": [
|
|
|
|
{
|
|
|
|
"value1": "={{ $node.Webhook.json.body.accepts_marketing }}",
|
|
|
|
"value2": "={{ true }}"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"id": "47173c1e-7a30-41c3-902d-3c271608c5e5",
|
|
|
|
"name": "Email vorhanden?",
|
|
|
|
"type": "n8n-nodes-base.if",
|
|
|
|
"typeVersion": 1,
|
|
|
|
"position": [
|
2023-05-03 16:00:21 +00:00
|
|
|
1140,
|
|
|
|
-20
|
2023-05-02 04:00:24 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"parameters": {
|
|
|
|
"authentication": "headerAuth",
|
|
|
|
"endpoint": "https://lana-kk.myshopify.com/admin/api/2023-04/graphql.json",
|
|
|
|
"requestFormat": "json",
|
|
|
|
"query": "=mutation customerEmailMarketingConsentUpdate($input: CustomerEmailMarketingConsentUpdateInput!) {\n customerEmailMarketingConsentUpdate(input: $input) {\n customer {\n id\n }\n userErrors {\n field\n message\n }\n }\n}",
|
|
|
|
"variables": "={ \"input\": { \"customerId\": \"gid://shopify/Customer/2298279854143\", \"emailMarketingConsent\": { \"consentUpdatedAt\": \"{{ $now }}\", \"marketingOptInLevel\": \"SINGLE_OPT_IN\", \"marketingState\": \"UNSUBSCRIBED\" } }}"
|
|
|
|
},
|
|
|
|
"id": "d634f91d-8688-4503-9654-12a699e4dad6",
|
|
|
|
"name": "GraphQL2",
|
|
|
|
"type": "n8n-nodes-base.graphql",
|
|
|
|
"typeVersion": 1,
|
|
|
|
"position": [
|
|
|
|
920,
|
|
|
|
980
|
|
|
|
],
|
|
|
|
"credentials": {
|
|
|
|
"httpHeaderAuth": {
|
|
|
|
"id": "14",
|
|
|
|
"name": "Shopify lanakk.com"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"parameters": {
|
|
|
|
"authentication": "headerAuth",
|
|
|
|
"endpoint": "https://lana-kk.myshopify.com/admin/api/2023-04/graphql.json",
|
|
|
|
"requestFormat": "json",
|
|
|
|
"query": "=mutation customerEmailMarketingConsentUpdate($input: CustomerEmailMarketingConsentUpdateInput!) {\n customerEmailMarketingConsentUpdate(input: $input) {\n customer {\n id\n }\n userErrors {\n field\n message\n }\n }\n}",
|
|
|
|
"variables": "={ \"input\": { \"customerId\": \"gid://shopify/Customer/2298279854143\", \"emailMarketingConsent\": { \"consentUpdatedAt\": \"{{ $now }}\", \"marketingOptInLevel\": \"SINGLE_OPT_IN\", \"marketingState\": \"SUBSCRIBED\" } }}"
|
|
|
|
},
|
|
|
|
"id": "dcf79e78-d4ba-4a55-bbc0-840c5c01dae4",
|
|
|
|
"name": "Abonniert",
|
|
|
|
"type": "n8n-nodes-base.graphql",
|
|
|
|
"typeVersion": 1,
|
|
|
|
"position": [
|
|
|
|
920,
|
|
|
|
700
|
|
|
|
],
|
|
|
|
"credentials": {
|
|
|
|
"httpHeaderAuth": {
|
|
|
|
"id": "14",
|
|
|
|
"name": "Shopify lanakk.com"
|
|
|
|
}
|
|
|
|
}
|
2023-05-03 16:00:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"parameters": {
|
|
|
|
"authentication": "oAuth2",
|
2023-05-04 04:00:21 +00:00
|
|
|
"email": "={{ $node[\"Webhook\"].json[\"body\"][\"email\"] }}",
|
2023-05-03 16:00:21 +00:00
|
|
|
"firstName": "={{ $node[\"Webhook\"].json[\"body\"][\"first_name\"] }}",
|
|
|
|
"lastName": "={{ $node[\"Webhook\"].json[\"body\"][\"last_name\"] }}",
|
2023-05-04 04:00:21 +00:00
|
|
|
"company": "=",
|
2023-05-03 16:00:21 +00:00
|
|
|
"additionalFields": {},
|
|
|
|
"options": {}
|
|
|
|
},
|
|
|
|
"id": "72dff69d-d130-4533-979f-341c220925d1",
|
|
|
|
"name": "Mautic",
|
|
|
|
"type": "n8n-nodes-base.mautic",
|
|
|
|
"typeVersion": 1,
|
|
|
|
"position": [
|
|
|
|
940,
|
|
|
|
140
|
|
|
|
],
|
|
|
|
"credentials": {
|
|
|
|
"mauticOAuth2Api": {
|
|
|
|
"id": "20",
|
|
|
|
"name": "Mautic account"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"parameters": {},
|
|
|
|
"id": "9e72fd94-5416-4186-9738-0b1a19330f2c",
|
|
|
|
"name": "No Operation, do nothing",
|
|
|
|
"type": "n8n-nodes-base.noOp",
|
|
|
|
"typeVersion": 1,
|
|
|
|
"position": [
|
|
|
|
940,
|
|
|
|
340
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"parameters": {
|
|
|
|
"conditions": {
|
|
|
|
"string": [
|
|
|
|
{
|
|
|
|
"value1": "={{ $json.id }}",
|
|
|
|
"operation": "isNotEmpty"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"id": "d81ac980-1063-462f-9812-44239e6fc49d",
|
|
|
|
"name": "Kontakt gefunden?",
|
|
|
|
"type": "n8n-nodes-base.if",
|
|
|
|
"typeVersion": 1,
|
|
|
|
"position": [
|
|
|
|
460,
|
|
|
|
0
|
|
|
|
],
|
|
|
|
"alwaysOutputData": false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"parameters": {
|
|
|
|
"conditions": {
|
|
|
|
"boolean": [
|
|
|
|
{
|
|
|
|
"value1": "={{ $node.Webhook.json.body.accepts_marketing }}",
|
|
|
|
"value2": "={{ true }}"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"id": "580be6e1-8658-4741-b52a-43d22faa7e23",
|
|
|
|
"name": "Marketing Einwilligung?",
|
|
|
|
"type": "n8n-nodes-base.if",
|
|
|
|
"typeVersion": 1,
|
|
|
|
"position": [
|
|
|
|
660,
|
|
|
|
160
|
|
|
|
]
|
2023-05-01 16:00:21 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"pinData": {},
|
|
|
|
"settings": {},
|
|
|
|
"staticData": null,
|
|
|
|
"tags": [],
|
2023-05-04 04:00:21 +00:00
|
|
|
"triggerCount": 2,
|
2023-05-06 04:00:23 +00:00
|
|
|
"updatedAt": "2023-05-06T03:37:01.000Z",
|
|
|
|
"versionId": "1ea671e0-eda7-4252-832d-159ef3d68b11"
|
2023-05-01 16:00:21 +00:00
|
|
|
}
|