Search code examples
servicetriggersactioniotifttt

Test fail in IFTTT with "returns at least three items"


I'm creating my own service and in the endpoint test fails here and this error is shown: "returns at least three items"

This error comes from the trigger part.

Can somebody share a sample value of output with three items in it. Please help


Solution

  • IFTTT Expects you to send at least 3 result items, to skip just clone the same object twice with different ids.

    From the FAQ section;

    My service fails the returns at least three items endpoint test. Why does IFTTT require three items? We require three items during the testing phase to make sure your API behaves like a timeline of events, not a state engine.

    This requirement might seem strange when you think of your integration with IFTTT as something that is entirely realtime in nature, like “IF Button Pressed, THEN Turn On Lights”— what good would come from anything but the current state of the button?

    But what about the Applet “IF Button Pressed, THEN Log to Spreadsheet”? In this case it would be important to store and return multiple event items because there is no guarantee that we’ll call your API (even with the Realtime API) at the moment the event occurs.

    By keeping and returning a list of events, IFTTT users are more assured they won’t miss a thing.