Browse the docs

Agent setup guide

Instagram Giveaway Entry Collector

Checks the comments on your giveaway post against your rules in code, draws a fair random winner on the end date, and drafts the announcement for your approval.

Coming soon — waiting for Instagram approval About 15 min to set up

What it does

Checks the comments on your giveaway post against your rules in code, draws a fair random winner on the end date, and drafts the announcement for your approval.

  • Every evening, reads the comments on your Instagram giveaway post (up to 100).
  • Checks each comment in code: entered by the end date, not your account or an excluded one, at least the number of friends tagged you set, the required word or hashtag, and one entry per account.
  • On the end date, draws the winner and two runners-up in code, uniformly at random from the valid entries with a cryptographic random generator, and remembers the draw so it never happens twice.
  • AI drafts a reply to the winner's comment and an announcement caption, using only the winner the code drew; the reply waits for your approval and is checked in code before it's posted.
  • You get the full draw report by email: rules, counts, winner, runners-up in order, every entry left out and why, and the caption.

What it needs

  • A paid plan (agents run live on paid plans).
  • An AI provider key (Settings → AI Providers).
  • Instagram (a professional account linked to a Facebook Page), connected in Settings → Integrations.
  • The giveaway post's media ID and your rules.

What it doesn't do

  • It reads at most 100 comments (Instagram's limit per read): for bigger giveaways, entries beyond those aren't counted.
  • It can't check likes, follows, shares, stories or whether tagged friends are real people.
  • It doesn't DM the winner or publish the announcement post: the caption is emailed to you.
  • Nothing is posted without your approval.

Availability and plans

Coming soon — waiting for Instagram approval

The agent is built, but Instagram is still waiting for the vendor's approval. It becomes available on its own once that app is live; until then it can't be bought or set up.

Included free on the Enterprise plan; on other paid plans it's a one-time purchase per workspace (the price is on the Agents page). The Agents page in the app always shows its current status.

Before you start

  • A paid plan: agents run live, and the Free plan only runs Dry Runs.
  • An AI provider key (OpenAI, Anthropic, Google and more) in Settings → AI Providers. AI usage is billed by your provider.
  • These apps, connected in Settings → Integrations: Instagram.
  • Nothing to send: the agent runs on a schedule.
  • About 15 minutes.

Set it up step by step

Get the agent first (buy it, or it's already yours when your plan includes it), then in Agents → My agents press “Set up this agent”. That creates the agent's workflow in your workspace (it counts towards your plan's workflow limit) and opens the canvas with a setup checklist above it. Each item links to the exact place to go and ticks itself off when it's done.

1. Connect your AI provider

The AI steps run on your own key (OpenAI, Anthropic, Google and more). Add one in Settings → AI Providers.

2. Connect Instagram

Connect your professional Instagram account (linked to a Facebook Page) in Settings → Integrations → Instagram.

3. Pick the giveaway post

Open “Read the giveaway post's comments”, pick your account and paste the post's media ID.

SettingWhat to enterIn step
Instagram accountThe professional Instagram account that posted the giveaway. Pick your connected Instagram account.“Read the giveaway post's comments”
Giveaway post (media ID)The giveaway post's media ID (the long number Instagram's API uses: from a “List posts” step, or ask us). A link to the post doesn't work here.“Read the giveaway post's comments”

4. Set the end date and entry rules

Open “Check the entries and draw” and fill in the end date, your username, friends to tag, the required word and accounts that can't win (write none where a rule doesn't apply).

SettingWhat to enterIn step
End dateThe last day to enter, e.g. 2026-10-31 or October 31, 2026. The winner is drawn on the evening of that day.“Check the entries and draw”
Your Instagram usernameYour own account (it can't win and doesn't count as a tagged friend), e.g. @fernhill.plants.“Check the entries and draw”
Friends to tagHow many other accounts each entry must tag, e.g. 2. Write 0 for no tag rule.“Check the entries and draw”
Required word or hashtagA word or #hashtag every entry must include, e.g. #FernhillGiveaway. Write none for no rule.“Check the entries and draw”
Accounts that can't winStaff, partners or family accounts, separated by commas. Write none for nobody.“Check the entries and draw”

5. Describe the prize

Open “Draft the announcement” and replace the placeholder with the prize and how to claim it.

SettingWhat to enterIn step
The prize and how to claim itReplace the placeholder with the prize, who runs the giveaway, your tone and how the winner claims the prize. It starts as “[DESCRIBE THE GIVEAWAY (PRIZE, WHO RUNS IT), YOUR TONE, HOW THE WINNER CLAIMS THE PRIZE (E.G. DM US WITHIN 48 HOURS) AND ANY WORDS YOU NEVER USE]” until you replace it.“Draft the announcement”

6. Reply account and report

Pick the same Instagram account in “Reply to the winner” and replace the example address in “Email you the draw report”.

SettingWhat to enterIn step
Instagram account (reply, same one)The same Instagram account. Pick your connected Instagram account.“Reply to the winner”
Your email (draw report)Who gets the draw report. Replace the example address. It starts as “you@your-business.example” until you replace it.“Email you the draw report”

7. Test it with Dry Run

Press Dry Run: the agent runs on sample data with no messages sent and nothing written to your apps.

8. Switch the trigger on

Open the trigger, set your time zone and the time (after your giveaway closes), and switch the schedule on. Switch it off after the draw.

How it works

The agent is a normal workflow with 19 steps (1 AI step, with a person approving in Reviews). You can open, edit and monitor it like any other workflow.

  • Every evening at 20:00 — Runs on a schedule (cron 0 20 * * *, UTC — change it in the trigger's settings). Runs every evening at 20:00 and draws once, on the giveaway's end date. Set your time zone on the trigger (the end date and entry dates are judged in it); set the time after your giveaway closes.
  • Read the giveaway post's comments — Instagram: List comments. Reads the comments on your giveaway post (up to 100, the most Instagram returns in one read).
  • Check the entries and draw — Step. In code, never by the AI: each comment is checked against your rules (entered by the end date, not your account or an excluded one, enough friends tagged, the required word, one entry per account). On the end date the winner and two runners-up are drawn at random from the valid entries.
  • End date reached? — Decision: picks the branch to follow. Before the end date nothing is drawn (the run only counts the entries).
  • Not drawn yet — Kept in the run history. Branch: Not yet. The run history shows how many valid entries there are so far.
  • Drawn already? — Recalls what it remembered earlier (memory “instagram-giveaway”). Branch: Draw. Checks whether this giveaway (its end date) was already drawn, so a second run never draws again.
  • First draw? — Decision: picks the branch to follow. A giveaway is drawn once: a later run on or after the end date stops here.
  • Already drawn — Kept in the run history. Branch: Already drawn. This giveaway was drawn in an earlier run; nothing is drawn again.
  • Draft the announcement — AI step (runs on your AI provider key). Branch: First draw. AI drafts a reply to the winner's comment and a caption announcing the result, using only the winner the code drew and your giveaway details.
  • A winner was drawn? — Step. In code: the draw found at least one valid entry.
  • Winner? — Decision: picks the branch to follow. No valid entries: you get the report, nothing is posted.
  • Remember the draw — Remembers it for later runs (memory “instagram-giveaway”, kept 90 days). Branch: Winner. Stores the draw for this end date as soon as it's made (alongside the review), so the giveaway is never drawn twice, even if you reject the announcement (kept 90 days).
  • Draw not remembered — Kept in the run history. Memory was unavailable: the draw stands, but switch the schedule off so a later run doesn't draw again.
  • Approve the announcement — A person approves or rejects it in Reviews (the run waits). Branch: Winner. The winner (drawn in code), the runners-up and the draft reply and caption wait in Reviews. Approve to reply to the winner's comment; reject to post nothing (the draw stays as it is).
  • Check before replying — Step. Branch: Approved. In code: the reply is there, fits 300 characters, has no leftover placeholders and names the winner.
  • Passed the checks? — Decision: picks the branch to follow. Passed: the reply is posted under the winner's comment. Otherwise nothing is posted.
  • Reply to the winner — Instagram: Reply to a comment. Branch: Reply. Replies under the winner's comment on your giveaway post.
  • Email you the draw report — Sends an email from your workspace's sender. Branch: No winner / Rejected / Held. Emails you the full report from the code: the rules, the counts, the winner, the runners-up in order, every entry left out and why, plus the announcement caption and whether the winner reply was posted.
  • Draw reported — Kept in the run history. The run history keeps the draw and the announcement.

Test it with Dry Run

Press Dry Run in the canvas. The agent runs on the sample data stored on its trigger (the “Sample data for Dry Run” box), so you can check every step's output before anything is live.

  • Nothing is sent or written: app actions, emails and Slack posts are simulated, and AI steps don't call your AI provider.
  • Approval steps use the Dry Run decision you pick in the step's settings (approved, rejected or timeout), so you can try each branch.
  • Memory steps don't read or write stored memory: a recall finds nothing, and a save only shows what it would store.

Go live

  • Open the trigger, set your time zone and the time (after your giveaway closes), and switch the schedule on. Switch it off after the draw.
  • Scheduled runs start only once the schedule is activated, and can't repeat faster than your plan's minimum interval.
  • The setup checklist adds a “paid plan” item before activation: live runs need a paid plan (the Free plan only runs Dry Runs).
  • When every checklist item is done and the trigger is on, the checklist says “Live — this agent is running”. Follow its runs in the workflow's History tab and in Analytics → Agents.

Questions

How is the winner picked?

In code, never by the AI: uniformly at random from the valid entries with the platform's cryptographic random generator. The report lists the rules, every valid entry and every entry left out with the reason, so you can show it was fair.

What can it check?

Entered by the end date, not your account or an excluded one, at least N friends tagged, a required word or hashtag, and one entry per account. It can't see likes, follows, shares or stories, so rules like “follow us” can't be checked.

Can it draw twice?

No. The draw is remembered for 90 days; later runs stop. Runners-up are drawn at the same time, in order, in case the winner doesn't claim the prize.

Troubleshooting

  • “No AI provider connected” or a rejected key: connect or fix the key in Settings → AI Providers, then press Test there.
  • A checklist item stays unticked: the setting is still empty or still contains its placeholder text. Open the step from the checklist and fill it in.
  • An app step fails with “Needs reconnect”: the account's access was revoked or expired. Reconnect it in Settings → Integrations.
  • It didn't run at the expected time: the schedule must be activated, and its time is in the trigger's timezone.
  • A run shows as paused: it's waiting for someone in Reviews to approve or reject it.
  • A step failed: open the run in History and check that step in the Trace tab for the error and what it received.

Generated from the agent's own workflow, so it always matches what the agent does. Last updated .