Webform submission token for multivalue download field I'm trying to setup a webform that sends links which can be accessed to download a file.
It's working with the first file already, but I can't figure out how to create the token for the other files referenced in a multivalue field:
What's working (for one file):
Here is your requested download: &lt;a href=&quot;[webform_submission:node:field_gated_download:entity:field_media_file:entity:url]&quot; target=&quot;blank&quot;&gt;[webform_submission:node:field_gated_download:entity] &lt;/a&gt;
I have tried:
[webform_submission:node:field_gated_download:entity:field_media_file:entity:url:0]
[webform_submission:node:field_gated_download:entity:field_media_file:entity:url:und:0]
[webform_submission:node:field_gated_download:0:entity:field_media_file:entity:url]
[webform_submission:node:field_gated_download:und:0:entity:field_media_file:entity:url]

in almost every combination. It's not working.
Can someone lead me in the right direction?
One approach to this issue is to interpret tokens on your own via hook_tokens().
hook_tokens() is called every time a token is interpreted and gives you an opportunity to determine how that token is interpreted. Even though the token [webform_submission:node:field_gated_download:entity:field_media_file:entity:url] is already defined, it may be necessary to also implement hook_token_info() or hook_token_info_alter() in order to define additional modifiers to the token.
It's possible that you might discover the exact token syntax that you need by inspecting the arguments passed into hook_token_info_alter().
Here are two tutorials that cover using both hook_token_info() and hook_tokens() in order to perform custom token processing.

https://www.cloudways.com/blog/create-custom-drupal-token-modules/
https://medium.com/thefirstcode/tokens-replacement-patterns-in-drupal-8-d309132ba13d