is it ever appropriate to write you'd had in a sentence?
You’d is the contraction for both “you would†and “you had.†I can't think of a sentence with "you had had" but if you can think of one, then you could properly use "you'd had" in its place. If you used "you would had" then you would need a "have" in there, I think, so it would be "you'd have had" as in, "You'd have had a chance in the race, but you pulled your hamstring."
"You had had" is plusquamperfectum, "pluperfect". The first "had" is imperfectum or preteritum depending on which kind of grammar you've learnt; the second one is perfectum. The first "had" is a so called "help verb" to the second, because in English both the imperfectum and the perfectum form of "have" is "had". In Swedish the first "had" would be "hade" and the second" haft", together "hade haft", which is plusquamperfectum or, shorter, pluperfect. It's just unusual to use that form in English but not impossible.