On several occasions clients have come to us asking for a form with a gated resource. They want the resource (.pdf, .doc, .xls etc.) to be available to download after the user fills a form. In exchange for the visitor’s valuable information, we provide them a file.
This is easily achievable in Drupal 8 with the Webform and Token modules. At the time of creation of this blog post, I used Drupal version 8.7.0.