Only your first sentence is idiomatic English.
First, will is employed in when clauses only if when is employed as a relative adverb, not if when is employed as a subordinating conjunction:
You will arrive in Milan at 4 pm, when you will be met by our representative.
✲When you will arrive in Milan you will be met by our representative.
Second, the ‘sequence of tenses’ rules for sentences with [when] ... [then] and [if] ...[then] constructions are very similar, so I’ll treat them together.
NOTES: I bracket [when], [if] and [then] because these words may only be implied and not actually appear in a sentence. Also, I have changed the words in your example to permit what I hope is a more transparent explanation.
The rules vary depending on whether the sentence expresses habitual practice or, as in your example, a single contingency.
If the sentence expresses a repeated or habitual practice, both clauses will have the same tense: either simple present or simple past. In these cases, [when] or [if] bears the sense whenever.
[Our practice is: ] Whenever we see this, we do that.
[Our practice was:] We did that whenever we saw this.
When the sentence deals with a single occasion, English employs a sequential structure, in which the [then] clause is depicted as ‘following’ the [when] or [if] clause. In practice this means that
In sentences with present reference, a simple present or present perfect in the [when/if] clause is paired with a will + unmarked infinitive construction in the [then] clause.
NOTE: 1) The order of the clauses in the sentence is irrelevant, and 2) I speak of a ‘construction with will’ rather than of a ‘future tense’ because the will signifies consequence quite as much as it does futurity.
[We have decided:] If we see this, we will do that.
[We have decided:] We will do that when we have seen this.
Sentences with past reference are ‘backshifted’: a simple past or past perfect in the [when/if] clause is paired with a would + unmarked infinitive construction in the [then] clause.
[We decided yesterday:] If we saw this, we would do that.
[We decided yesterday:] We would do that when we had seen this.