Connect a Zapier workflow to an agent email inbox

Checked · Markdown

Short answer

There's no Agentline NZ app in Zapier, so use Webhooks by Zapier to call the REST API at https://agentline.nz/api/v1 with an Authorization: Bearer header holding your API key. A Zap can then send email from an @agentline.nz address, read the inbox and wait for one-time codes sent by email.

Before you start

  • An Agentline NZ API key from Dashboard → API keys. It starts with al_live_. No credit card needed to sign up. Start free with an email inbox, or try Starter or Pro free for 7 days.
  • Your @agentline.nz email inbox works straight away. Texting and phone numbers are coming soon.
  • Until you're on a paid plan, your agent can only email your own verified email address. Anything else returns recipient_not_allowed.
  • A Zapier Team or Enterprise plan. Zapier lists webhook actions on Team and Enterprise, and the Retrieve Poll trigger, used below to start a Zap when an email arrives, on Enterprise only.

Send an email from a Zap

  1. Add a webhook action. In the Zap editor, add an action step, choose Webhooks by Zapier and pick the POST event.
  2. Set the request. Set URL to https://agentline.nz/api/v1/emails and Payload Type to json. Under Data, add a to field (one email address), a subject field (up to 300 characters) and a text field (the message). Map any of them from an earlier step. To answer an email in the same thread, add reply_to_id with the id of the email you're replying to.
  3. Add your key. Under Headers, add Authorization with the value Bearer followed by a space and your Agentline NZ API key. Leave Basic Auth empty.
  4. Test the step. Test the action. A 201 response returns the email, with its id and a status of sent. A 4xx response carries an error object with a code and message.
    {
      "email": {
        "id": "eml_…",
        "direction": "out",
        "from": "yourname@agentline.nz",
        "to": "someone@example.com",
        "subject": "Your booking",
        "snippet": "See you at 3pm Thursday.",
        "code": null,
        "status": "sent",
        "read": false,
        "hasAttachments": false,
        "createdAt": "2026-10-20T01:00:00.000Z"
      }
    }

Read the inbox

Use a GET action. Set URL to https://agentline.nz/api/v1/emails and add the same Authorization header. Under Query String Params you can add:

  • direction: in for received emails only, or out for sent ones
  • unread_only: true to skip emails already marked read
  • since_seconds: only emails from the last N seconds
  • limit: 1 to 100 (20 by default)

Emails come back as {"emails": [...]}, newest first. Each email has a 280-character snippet; for the full text, GET https://agentline.nz/api/v1/emails/{id}.

Wait for a one-time code

Use a Custom Request action, because this endpoint needs a number in the body and Custom Request sends the JSON exactly as typed. Set Method to POST, URL to https://agentline.nz/api/v1/wait-for-code, and add the Authorization header plus Content-Type: application/json. Put this in Data:

{"channel": "email", "timeout_seconds": 25, "from_contains": "Google"}

from_contains (optional) matches the sender or the message text. The response is {"found": true, "code": "123456", "channel": "email", "messageId": "…", "from": "…", "receivedAt": "…", "preview": "…"}, or {"found": false} if nothing arrived in time. Each code is returned once. Zapier gives a step about 30 seconds, so keep timeout_seconds at 25 or less, and add a Filter step that only continues when found is true.

Start a Zap when an email arrives

Agentline NZ doesn't send webhooks to your own URLs, so a Catch Hook trigger won't receive anything. Poll the API with the Retrieve Poll trigger in Webhooks by Zapier instead. Retrieve Poll is on Zapier's Enterprise plan only; on other plans, poll from a scheduled Make scenario.

  1. Choose Webhooks by Zapier as the trigger and pick Retrieve Poll.
  2. Set URL to https://agentline.nz/api/v1/emails?direction=in&limit=25. limit=25 returns the 25 newest emails per check. If more than 25 arrive between checks, the oldest are skipped. If you can't afford to miss an email, use the Make scenario instead: it polls with unread_only and marks each email read, so anything past the limit waits for the next run.
  3. Set Key to emails.
  4. Leave Deduplication Key empty. Every email has an id, which Zapier uses to skip emails it has already seen.
  5. Add the Authorization header and test the trigger.

Zapier checks on its own polling schedule, which depends on your Zapier plan, so a Zap starts some minutes after an email lands. Use the wait-for-code request above when a Zap needs a code straight away.

Good to know

  • Each API key can make 120 requests a minute.
  • Sending is capped at 10 emails a minute and 200 a day.
  • On a 429 rate_limited response, wait the number of seconds in the Retry-After header before retrying, and keep sends within your plan's or trial's email allowance, which resets monthly.
  • Transactional and assistant messages only: replies, bookings, confirmations, reminders people asked for, and codes. Marketing, promotions, cold messages and bulk messages aren't allowed.
  • Your API key lives in the Zap's header fields, so anyone who can edit the Zap can see it. Create a key just for Zapier and revoke it in the dashboard if you stop using the Zap.
  • The docs list every REST endpoint.
  • Texting and phone numbers are coming soon. To hear when they're ready, join the waitlist.

FAQ

Is there an Agentline NZ app in Zapier?

No. Use Webhooks by Zapier to call the REST API with your API key, as shown on this page.

Can a Zap trigger when an email arrives?

Yes, by polling. Agentline NZ doesn't send webhooks, so use the Retrieve Poll trigger in Webhooks by Zapier on the email list, with direction set to in and limit to 25. Retrieve Poll is on Zapier's Enterprise plan only; on other plans, use a scheduled Make scenario instead.

What does Agentline NZ cost?

Starter is NZ$29/month and Pro is NZ$79/month, billed in NZ dollars. No credit card needed to sign up. Start free with an email inbox, or try Starter or Pro free for 7 days. You can cancel anytime, and your plan stops at the end of the billing period you've paid for. Refunds follow section 5 of our Terms: fees already paid aren't refunded, except where the Terms or the law say so. Agentline NZ is not GST-registered, so no GST is charged.

When does the inbox work, and can my assistant send texts yet?

Your @agentline.nz email inbox works straight away. Texting and phone numbers are coming soon. To hear when texting is ready, join the waitlist.

Can my assistant send marketing or bulk email?

No. Transactional and assistant messages only: replies, bookings, confirmations, reminders people asked for, and codes. Marketing, promotions, cold messages and bulk messages aren't allowed. See What we don't allow.

Start free · No credit card needed to sign up. Start free with an email inbox, or try Starter or Pro free for 7 days.