Какая статья в газете вы напишал?
Ok, let's take this apart!
You're close on the verb, good guess. If you're using the formal вы, you need the plural form of the past tense - написали. To make the past tense of most verbs, you simply take the infinitive (написать), drop the ending (написа-), and add the ending that corresponds to the doer of the action (here, написали).
Next - статья is the direct object - it's the object of написать, so it must be in the accusative case. Статья is a feminine noun, which means that even though it's inanimate, the ending changes in accusative case. Since it ends in a "soft" vowel, the vowel in the accusative must also be soft.
(remember а -> у and я -> ю. Hear how they go together?). Last, the adjective changes to agree with the noun, so it takes accusative too.
*drumroll*
Какую статью в газете вы написали?
Keep it up!