Gmail function for IFTTT

I am very new to this subject and am hoping to get some help. I am trying to combine IFTTT with and LED using spark core. I am hoping to trigger a certain color, coinciding with certain gmail labels. I understand how to make a recipe and which one I need. However, I can not figure out how to write a function for it. Is there an example someone can point me toward or any help will be appreciated.