{
  "nodes": [
    {
      "id": "7cb53e04-9028-4a1d-8a9d-90e9404cdece",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -300,
        60
      ],
      "parameters": {
        "color": 6,
        "width": 500,
        "height": 640,
        "content": "## WhatsApp Group Welcome Message Automation\n\nThis workflow automatically sends a personalized welcome message to new members who join your WhatsApp group.\n\n### How it works\n1. **Webhook** receives notifications when someone joins your group\n2. **Filter** checks if it's your specific group\n3. **If** node verifies it's a new member joining (not leaving)\n4. **Wait** node adds a delay to make the message feel more natural\n5. **HTTP Request** sends the welcome message via Evolution API\n\n### Setup Instructions\n1. Configure the **Set Variables** node with your credentials\n2. Update your Evolution API webhook to point to this workflow's webhook URL\n3. Test by having someone join your group\n\n### Youtube video\nhttps://youtu.be/WO2MJoQqLvo\n\n### Requirements\n- Evolution API instance (self-hosted or cloud)\n- WhatsApp Business connected to Evolution API\n- Group admin permissions"
      },
      "typeVersion": 1
    },
    {
      "id": "664a1877-b92e-4254-bd77-5b2fec53fe61",
      "name": "Webhook - Receive Group Events",
      "type": "n8n-nodes-base.webhook",
      "position": [
        360,
        260
      ],
      "parameters": {
        "path": "whatsapp-group-welcome",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "9db51839-242e-45f8-bc39-6d191a4f130c",
      "name": "Sticky Note 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        580,
        60
      ],
      "parameters": {
        "width": 170,
        "content": "\u2699\ufe0f **Configure all variables here**\n\nUpdate these values with your own credentials and preferences"
      },
      "typeVersion": 1
    },
    {
      "id": "a4bae5fe-6215-4785-8014-53bcad7f44f3",
      "name": "Set Variables - Configure Here",
      "type": "n8n-nodes-base.set",
      "position": [
        600,
        260
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "group-id",
              "name": "groupId",
              "type": "string",
              "value": "user@example.com"
            },
            {
              "id": "api-key",
              "name": "apiKey",
              "type": "string",
              "value": "YOUR-API-KEY-HERE"
            },
            {
              "id": "instance-name",
              "name": "instanceName",
              "type": "string",
              "value": "YourInstanceName"
            },
            {
              "id": "evolution-url",
              "name": "evolutionApiUrl",
              "type": "string",
              "value": "https://your-evolution-api.com"
            },
            {
              "id": "welcome-message",
              "name": "welcomeMessage",
              "type": "string",
              "value": "\ud83d\udc4b Welcome to our community! \n\nWe're excited to have you here. If you have any questions or need assistance, feel free to ask. \n\nLet's grow together! \ud83d\ude80"
            },
            {
              "id": "wait-time",
              "name": "waitMinutes",
              "type": "number",
              "value": 1
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "890c7d0b-584f-4c42-9c62-75bf5823b93e",
      "name": "Filter - Check if Target Group",
      "type": "n8n-nodes-base.filter",
      "position": [
        840,
        260
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "check-group-id",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.body.data.id }}",
              "rightValue": "={{ $('Set Variables - Configure Here').item.json.groupId }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "c38bf61c-e2af-4637-ae8a-d51af11b5ca9",
      "name": "If - New Member Joined",
      "type": "n8n-nodes-base.if",
      "position": [
        360,
        460
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "check-action",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.body.data.action }}",
              "rightValue": "add"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "109b3071-6f95-4a8d-afec-f938db5f6f23",
      "name": "Wait - Natural Delay",
      "type": "n8n-nodes-base.wait",
      "position": [
        600,
        460
      ],
      "parameters": {
        "unit": "minutes",
        "amount": "={{ $('Set Variables - Configure Here').item.json.waitMinutes }}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "1b6d56e8-03f2-4fbe-a859-00ddbfb19715",
      "name": "Send Welcome Message",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        840,
        460
      ],
      "parameters": {
        "url": "={{ $('Set Variables - Configure Here').item.json.evolutionApiUrl }}/message/sendText/{{ $('Set Variables - Configure Here').item.json.instanceName }}",
        "method": "POST",
        "options": {
          "redirect": {
            "redirect": {}
          },
          "allowUnauthorizedCerts": true
        },
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "number",
              "value": "={{ $json.body.data.participants[0] }}"
            },
            {
              "name": "text",
              "value": "={{ $('Set Variables - Configure Here').item.json.welcomeMessage }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "apikey",
              "value": "={{ $('Set Variables - Configure Here').item.json.apiKey }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "d4b1eb74-feb8-47e1-8928-51d587c1ce34",
      "name": "Sticky Note 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        300,
        60
      ],
      "parameters": {
        "width": 200,
        "content": "\ud83d\udcdd **Webhook Configuration**\n\nCopy the webhook URL from this node and configure it in your Evolution API instance"
      },
      "typeVersion": 1
    },
    {
      "id": "7b3d4744-4a64-4c10-a071-94e61cd6c676",
      "name": "Sticky Note 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        600
      ],
      "parameters": {
        "width": 180,
        "height": 120,
        "content": "\u2705 **Success!**\n\nThe welcome message has been sent to the new member"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Wait - Natural Delay": {
      "main": [
        [
          {
            "node": "Send Welcome Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If - New Member Joined": {
      "main": [
        [
          {
            "node": "Wait - Natural Delay",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter - Check if Target Group": {
      "main": [
        [
          {
            "node": "If - New Member Joined",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Variables - Configure Here": {
      "main": [
        [
          {
            "node": "Filter - Check if Target Group",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook - Receive Group Events": {
      "main": [
        [
          {
            "node": "Set Variables - Configure Here",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}