<svg width="1300" height="700" viewBox="0 0 1300 700" xmlns="http://www.w3.org/2000/svg" role="img" xmlns:c2pa="http://c2pa.org/manifest"><metadata><c2pa:manifest>AAAWgmp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAABZcanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46YzJwYTpmODU3ZGJiNC02NjE1LTQzMTctOTAzZS0zODRhN2ViYWU1NWQAAAADl2p1bWIAAAApanVtZGMyYXMAEQAQgAAAqgA4m3EDYzJwYS5hc3NlcnRpb25zAAAAALxqdW1iAAAARGp1bWRjYm9yABEAEIAAAKoAOJtxE2MycGEuaW5ncmVkaWVudC52MwAAAAAYYzJzaGH7on2bJ4TyXQn2FhqYztYAAABwY2JvcqNpZGM6Zm9ybWF0bWltYWdlL3N2Zyt4bWxqaW5zdGFuY2VJRHgseG1wOmlpZDo2ZmI3ZTlhNC03NTUxLTRjN2QtODZlYi1kMmU0NGZiNWQyYzVscmVsYXRpb25zaGlwaHBhcmVudE9mAAAB4mp1bWIAAABBanVtZGNib3IAEQAQgAAAqgA4m3ETYzJwYS5hY3Rpb25zLnYyAAAAABhjMnNoOyyr1+TxpscudPT3pLN4wgAAAZljYm9yomdhY3Rpb25zgqJmYWN0aW9ua2MycGEub3BlbmVkanBhcmFtZXRlcnOha2luZ3JlZGllbnRzgaJjdXJseC1zZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmluZ3JlZGllbnQudjNkaGFzaFgg2A6APflmJ82C5+kT2ocQUkyX1YqGYtEeAfdvPb3wmaakZmFjdGlvbngdY29tLmFudGhyb3BpYy5jbGF1ZGUucHJvdmlkZWRqcGFyYW1ldGVyc6F4H2NvbS5hbnRocm9waWMub3JpZ2luLWNvbmZpZGVuY2VndW5rbm93bmtkZXNjcmlwdGlvbnhmQ2xhdWRlIHByb3ZpZGVkIHRoaXMgZmlsZSBhdCB0aGUgcmVxdWVzdCBvZiBhIHVzZXIgYW5kIG1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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQICaOE2c8i3flVaAXjBf7wvqXibguWUWJ7iuh7DONwVHgKmlErfmdorUAgPE76nGGbITf3Mi/PrU5nlBHNdrlcY=</c2pa:manifest></metadata>
<title>Estrutura JSON aninhada do webhook da Meta</title>
<desc>Diagrama tipo arvore de codigo mostrando os quatro niveis de aninhamento do JSON enviado pela Meta ate chegar ao texto da mensagem e ao numero do remetente, entry changes value messages text body from.</desc>
<rect width="1300" height="700" fill="#0A1520"/>
<text x="650" y="45" text-anchor="middle" font-family="Consolas, monospace" font-size="24" font-weight="bold" fill="#E6EDF3">Onde esta o texto da mensagem no JSON</text>

<rect x="150" y="90" width="1000" height="540" rx="8" fill="#0D1117" stroke="#30363D" stroke-width="1"/>

<g font-family="Consolas, monospace" font-size="15">
<text x="180" y="130" fill="#8B949E">{</text>

<text x="210" y="165" fill="#79C0FF">"entry"</text><text x="290" y="165" fill="#E6EDF3">: [ { </text><tspan fill="#6E7681"> // lista, pegue [0]</tspan>

<rect x="230" y="180" width="880" height="410" rx="4" fill="none" stroke="#3FB950" stroke-width="1" stroke-dasharray="3,3"/>

<text x="250" y="210" fill="#79C0FF">"changes"</text><text x="345" y="210" fill="#E6EDF3">: [ { </text><tspan fill="#6E7681"> // lista, pegue [0]</tspan>

<rect x="270" y="225" width="800" height="330" rx="4" fill="none" stroke="#58A6FF" stroke-width="1" stroke-dasharray="3,3"/>

<text x="290" y="255" fill="#79C0FF">"value"</text><text x="365" y="255" fill="#E6EDF3">: { </text><tspan fill="#6E7681"> // objeto direto</tspan>

<rect x="310" y="270" width="740" height="250" rx="4" fill="none" stroke="#D29922" stroke-width="1" stroke-dasharray="3,3"/>

<text x="330" y="300" fill="#79C0FF">"messages"</text><text x="440" y="300" fill="#E6EDF3">: [ { </text><tspan fill="#6E7681"> // lista, pegue [0]</tspan>

<rect x="350" y="315" width="670" height="170" rx="4" fill="#0D2818" stroke="#F778BA" stroke-width="1.5"/>

<text x="375" y="345" fill="#F778BA" font-weight="bold">"text"</text><text x="440" y="345" fill="#E6EDF3">: { </text>
<text x="400" y="375" fill="#F778BA" font-weight="bold">"body"</text><text x="480" y="375" fill="#3FB950" font-weight="bold">: "ola, quero agendar"</text>
<text x="400" y="405" fill="#6E7681">},</text>

<text x="375" y="440" fill="#F778BA" font-weight="bold">"from"</text><text x="470" y="440" fill="#3FB950" font-weight="bold">: "5511999999999"</text>
<text x="375" y="465" fill="#6E7681">← número do cliente, usado para responder</text>

<text x="330" y="500" fill="#E6EDF3">} ]</text>
<text x="290" y="535" fill="#E6EDF3">}</text>
<text x="250" y="565" fill="#E6EDF3">} ]</text>
<text x="210" y="595" fill="#E6EDF3">} ]</text>
<text x="180" y="620" fill="#8B949E">}</text>
</g>

<text x="650" y="670" text-anchor="middle" font-family="Consolas, monospace" font-size="13" fill="#F85149">Erro mais comum: acessar messages.text.body direto, esquecendo que entry e messages sao listas</text>
</svg>
