If you’re seeing the error MISSING_FOOTER_IN_IF_ELSE_BRANCHES, here’s the quick fix:
Solution: Add a Footer component to every branch (then and else) of the If block if a Footer is present in any one of them.
Why this happens
In a Flow JSON screen, Footer components are used to trigger actions like submitting form data or completing a screen. If you place a Footer inside one branch (then or else) of an If component but omit it from the other, the flow becomes incomplete and invalid.
For example:
{
"type": "If",
"condition": "${data.ti}",
"then": [
{
"type": "Footer",
"label": "Submit",
"on-click-action": {
"name": "complete",
"payload": {}
}
}
]
}
This causes an error because the else branch is missing a Footer.
The correct structure
To fix it, always provide a Footer in both branches like this:
{
"type": "If",
"condition": "${data.ti}",
"then": [
{
"type": "TextInput",
"label": "Enter value",
"name": "custom_value"
},
{
"type": "Footer",
"label": "Submit",
"on-click-action": {
"name": "complete",
"payload": {}
}
}
],
"else": [
{
"type": "Text",
"value": "No input required"
},
{
"type": "Footer",
"label": "Continue",
"on-click-action": {
"name": "complete",
"payload": {}
}
}
]
}
Pro tip
If a Footer is missing from one branch, your flow might get stuck or fail to complete. Whenever you're working with If components, double-check both branches. If you add a Footer to one side, mirror it on the other.
For more troubleshooting insights related to WhatsApp Business API, check out heltar.com/blogs.