Trigger photon function with ifttt do button?

Sorry, but I have skipped the normal guides for right now. (busy doing house work, and can’t dedicate the time right now to learning a new ecosystem. I have a second photon I will be using for that in a few weeks) I normally use rpi’s, but really like the appeal of the photon so I don’t have to open my pi’s up to the internet and deal with security/authentication myself. I am in the process of replacing my garage door opener that is currently running on a pi0 with a photon. For now all I would like to do is use ifttt’s do button to trigger a function on the photon that is attached(with a relay board). It has been a very long time since I did anything with arduino, so my C is a rusty. Below is the code I have:

int opener = D7; 

void setup() {
  pinMode(opener, OUTPUT);
}

void loop() {
}

int triggerGarage(){
    digitalWrite(opener, HIGH);
    delay(1000);
    digitalWrite(opener, LOW);
}

The way the do app reads on my iphone, I should be able to select a function from my photon, but it doesn’t show anything in the list. Is there a step I am missing?

Figured it out. Code below:

#define garagePin D7  // ignore the asterisk in the beginning
bool toggle = false;

int garageToggle(String command);

void setup() {
    pinMode(garagePin, OUTPUT);
    Particle.function("ToggleGarage", garageToggle);
}

void loop() {
    if(toggle == true){
        digitalWrite(garagePin, HIGH);
        delay(1000);
        digitalWrite(garagePin, LOW);
        toggle = false;
    }
}

int garageToggle(String command){
    toggle = true;
}

Hey there! I’m working on a garage door opener as well. I want to use the Photon and IFTTT, so your post intrigued me. I like the simplicity of your code (I’m very, very new to this world).

Is your project complete? Does it work well? By chance, is there a way you can shoot me the schematics of your wiring? I’d love to NOT reinvent the wheel if you know what I mean and I’ve been trying to figure this thing out for a month now!

Thanks in advance!