I have a custom form with ajax submission on my site and it works great. Handling the response on the site I'm able to use a template and find.page works as it should, I can pull data from wherever I want on the site. When I need to send an email I'm doing the same on the data.html.twig template, but find.page doesn't seem to work at all. Is there a particular reason for that or should I do something different?
This is how I use it:
{% set child = page.find("/machinery/automatic/" ~ subfolder ~ '/' ~ value) %}
works on the form template, but not on the email body included template.