I am going to graduate soon as a Ph.D. in computer science and I am interested in working with a group. However, I don't know the professor and I am not sure whether there is an available postdoc position. How to write a cover in such situation ?
First: make 100% sure there are no official calls for postdocs at their group. It will reflect badly on you, if you apply outside of a call, if there is an open call.
Then: Based on a (more general) guide on writing academic cover letters I read when applying for my postdoc, I would suggest the following:
- Explain briefly why you are contacting them. Why do you want to work with them? Be kind but professional, point to the positive thoughts you surely must have about them, but don't try to flatter them.
- Explain what you can contribute. Try to aim this towards something that is relevant for them, but do NOT tell them how they can use their skills - that's a conclusion they must reach themself.
- Explain your future plans. Again, don't tell them how well those plans fit in with theirs. They might, but this is also up to them.
I would suggest to compress the cover letter more than one usually would. Most professors' inboxes are filled to the brim, and if you want them to read all your selling points, they must be concise. You can always attach a more detailed application letter with your CV, portfolio, etc.