Docs

Create automations

Build an automation with Attia Agent or by hand, with schedules, record triggers, manual runs, and webhooks.

Create an automation with Attia Agent

Describe what you want in the box that reads Ask Attia to build the automation for you, then press Create automation from prompt. Attia drafts the name, trigger, and instructions and opens the draft beside a chat, so you can keep refining it in words. The agent can also add a filter to the trigger, with the fields Add filter offers there, such as a job's Workplace or Teams. It can also choose Run manually on an application or a job, or the Webhook trigger, and an edit keeps either one. The agent never writes a Webhook's URL or secret: Attia makes them. On a trigger that has the pill, it can choose Every time or the once option, such as Once per application, and an edit keeps your choice unless you ask it to change. On an application, job or candidate automation, it can also add, change or remove the rows that Add trigger makes, and it keeps each row you do not ask it to change.

You can also ask for an automation in an ordinary Attia Agent chat. Either way, an automation the agent writes is saved switched off. Read it, then publish and enable it yourself.

Create an automation by hand

  1. Choose Start fresh. The form opens with no question about the team.
  2. Give it a name of up to 120 characters.
  3. Under Trigger, choose what starts it: a Schedule, or an event on an Application, a Job, or a Candidate. For an event, the trigger starts with a For line that names the teams whose records start it. Choose the teams there.
  4. Write the Instructions, up to 20,000 characters. Compose with Agent helps you write them.
  5. Review Capabilities & access.
  6. Choose Create automation.

An automation you create this way is on as soon as you create it.

A new automation starts in a default home, whichever way you create it. From the button on a team's group in All automations, it lives in that team. Otherwise it lives in the workspace if you may create workspace automations, and in your first team if you may not. To move it to another team later, use Move in its row menu.

Schedules

A scheduled automation repeats every few minutes, hours, days, weeks, months, or years, in the time zone you pick. The shortest gap is five minutes. First run date sets the day it starts, and the form shows when the first run will be. For anything the builder cannot say, write a five-field Cron expression: 0 9 * * 1 runs every Monday at 09:00.

An automation with steps, or one from the scheduled templates below, can choose what its schedule does On public holidays and closed days. Run anyway is the default and changes nothing. Skip leaves that run out, and the run history shows the date and "Skipped: not a working day". Move to the next working day runs it on the next working day at the same time. Say a Monday automation is due on 17 May, Norway's national day. Skip leaves it out and it next runs the Monday after. Move runs it on 18 May.

A schedule that can fire more than once on the same day offers only Run anyway and Skip. An automation can't publish with Skip if its schedule only fires on days outside the automation's working week, because it would never run. Other automations that run on Instructions alone don't offer the choice and run anyway. An automation for applications, jobs, or candidates offers the choice before it has a step, but it can't publish without one.

Weekly update for each active job and the retention template's Monthly review, No longer due and Monthly count default to Move to the next working day. Stale application check defaults to Skip and keeps its Instructions editor. Their choice stays when you save and reopen them.

Record triggers

An automation can start when an application is created, updated, or withdrawn, changes status, assignee, or labels, or gets a new message, comment or file. It can also start when a job is created or one of its properties changes, when an update or comment is posted on a job, when a job board changes the status of one of the job's ads, or when a new candidate arrives. Add filter narrows the trigger on an application, job or candidate automation, with the same fields and comparisons as a Filter step. A field the event that starts the run does not carry, such as Days in status, is greyed out there with Read when a step runs, not at the trigger; check it in a Filter step instead. A job automation kept to one job says so on its own line under the trigger. A webhook trigger has no filter. On a job automation, a Filter, Paths or Wait step can also check the job's labels. On an application automation, those steps can check Status section, the section of the application's status. It names no single status, so it keeps working when a team adds or archives one. A candidate who withdraws stays on their status and keeps its section, so use The application is withdrawn under Stop the run if to end a run for them.

A record automation runs about a minute after the change, once the record has settled.

The last pill on the trigger row says how often the automation runs. Every time, the default, starts a run on each event that matches. Once per job, Once per application or Once per candidate, named after the record the trigger is on, starts one run for each record, and a later event on the same record starts nothing. A Hub automation offers Once per company, Once per person or Once per deal and counts each record the same way. On a trigger that starts before a date, such as Consent ends in N days or FINN ad ends in N days, the first date of a record starts one run, and a later date of the same record, after a renewal, starts nothing. The automation page and the automation list then add "once per job" after the trigger. A schedule, a webhook and Run manually have no such pill.

A job automation can also start on an application on the job. Under Job, pick Application on the job, then Created, Status, Labels or Withdrawn. The run is for the job, so its steps act on the job and not on the application. For example, Application status is set on the job to Interview starts a run for the job each time one of its applications moves to Interview.

Under Application on the job, Add filter on the trigger reads the application whose event starts the run, not the job. It offers Application with Application status and Application labels, so a filter on Interview starts the run only for an application in Interview. Publishing refuses a job field in that filter. To check one of the job's fields, use a Filter step. A Filter or Paths step in the automation can read the application that started the run: open the field menu, then Application, and pick Application status or Application labels. Each reads the application as it was when the run started. A run started any other way has no application, so under any other trigger the automation is not published with such a step.

Message sent starts an application automation when a person sends the candidate a message from the application, approves Attia Agent's message on a card in a chat, or approves an automation's message in the Inbox. A message an automation sends, and a message from Attia such as the notice when an application moves to another job, do not start it. New message starts when the candidate writes.

File added starts an application automation when a person adds a file to the application, or the API adds one. Each file starts it once. A file that is removed and restored does not start it again. A file on an imported application starts it too, so add a Filter on Source to leave imports out. The Brief new applications template makes two automations: one runs on each new application, and one on each file added, so a CV that arrives later still gets a brief. Both leave out imports and start switched off. A brief that is already written stays as it is.

A Filter, Paths or Wait until step on an application can check Last message sent, when a person last wrote to the candidate, and Last message received, when the candidate last wrote. The same messages count as for the two triggers. Each date is empty until someone writes that way, and a message sent before the dates existed does not fill them. For example, a Filter with Last message sent is empty keeps the applications no person has written to yet.

A change an automation makes can start another automation. An automation never starts on a change its own run caused, even after that run has ended. A change that has come through three automations in a row starts no run. Each automation it would have started shows a Skipped run that says why. A change a person makes starts the count again.

A candidate automation can also start before a date, with Consent ends in N days. It starts when the candidate's talent pool consent ends within the days you choose, from 1 to 365. Attia checks once a day, so a run can start up to a day after the candidate comes inside that window. The run's page shows the end date it started for.

  • A candidate already inside the window when you publish starts on the first check. That check can come up to a day after you publish.
  • A consent that has already ended never starts a run, and neither does one the person ended.
  • Each end date starts the automation once. With Every time, a renewed consent with a new end date starts the automation again at that date. With Once per candidate, a candidate who already had a run from this trigger is skipped, and the new date starts nothing. When you publish a change to the trigger's date or number of days, each candidate can start once more.
  • An automation you turn off and on again starts for the candidates inside the window then, and catches nothing else up.

Choose 2 days or more if every candidate must be reached. At 1 day, an end date can pass between two checks, and a date that has passed never starts a run.

A Filter step can ask who made the last status move, with Status moved by. A person means someone moved the application in Attia, or approved the move on a card in an Attia Agent chat. An automation means an automation moved it, and that includes the agent in an automation run. Attia covers the rest: Auto-close stale applications, a move to another job or team, and a candidate withdrawing. An application still on its first status, or one that has not moved since this option arrived, matches none of them. The step reads the application when it runs, so if an automation moves it during a Wait step, a filter on A person no longer matches.

A Filter or Paths step on an application can ask whether the candidate is in another process, with Has another open application. Yes means the same candidate has another application in the workspace, for any job, in the Unstarted or Started section, and it is not withdrawn or archived. Applications on private teams count too, even ones you cannot open, and the answer never says which job. The step reads it when it runs, so an application the candidate sent during a Wait step counts. A Wait until does not wake when another application changes, so check it in a Filter step. For example, put a Filter with Has another open application is No before a rejection email, so a candidate still in another process does not get it.

A Filter or Paths step on an application can ask how far it got, with Statuses reached: every status the application has been in, including the one it is in now. Each status counts once, even if the application went back to it, and it still counts after someone archives it. has any Interview matches an application that was in Interview at some point, even if it has gone back to Screening since. has none Interview matches one that never got there. The step reads the history when it runs. The event that starts a run does not carry it, so a trigger filter, a Wait until and a stop condition cannot use it, and publishing refuses it there. For example, put a Paths step before a rejection email, with one path for Statuses reached has any Interview, so a candidate who met the team gets a different email from one turned down at screening.

A Filter or Paths step on an application can check Review and SLA status, with the values the applications list filters on. SLA status is offered while your workspace has SLAs on. Review is offered on a team automation whose team uses a review scale, with that scale's values and Unreviewed. A workspace automation covers teams with different scales, so it does not offer Review. The step reads both when it runs, so a review given during a Wait step counts, and an SLA that has become high risk since the run started reads High risk. The event that starts a run does not carry them, so a trigger filter, a Wait until and a stop condition cannot use them, and publishing refuses them there. If you turn SLAs off, or the team stops using a review scale, a condition on that field matches no application, not even with is not, and the step says why. For example, put a Filter with SLA status is Breached before an Ask the AI agent step that tells the application's assignee.

A Filter or Paths step on a job can check the fields the jobs list filters on: Employment, Contract type, Workplace, Positions, Start, Created, Updated, Teams, Members and Career sites. Each offers the list's own values. The comparisons are the list's, but only Start, Teams, Members and Career sites have is empty. Teams holds every team the job is on, and Members holds the job's members, not its lead. Career sites is not offered where the jobs list hides it, in a workspace with one career site that cannot add another. A trigger filter, a Wait until and a stop condition can check them too, on the job as the event left it. A change to a job's teams, members or career sites is a Property updated event. A Filter or Paths step reads the job when it runs.

A condition on a member, such as Lead, Members or Assignee, names a fixed member. In a list, Current user means whoever is looking, and a run has nobody looking, so an automation offers no Current user. Its member list puts you first, as You, and picking it stores you, the way picking any other member stores them. Another member who opens the automation sees your name there. Publishing refuses a condition that holds Current user, which only a draft written outside the editor can have.

A Filter step on an application can test the answer to a question from your question library, with Form answer. Pick the question, then the answer. It offers Yes / No, Dropdown, Checkboxes, Number, Date, Work permit, Driver's licence and Highest education questions. A number compares as a number, so you can ask for 3 or more. A date is on, before or after a day you pick, or between two days. Text, files, contact details, links and CVs are never offered, and neither are birth date, gender, location and languages. The step reads the answer when it runs, so an answer the candidate gives during a Wait step counts. An application whose job did not ask the question matches no condition on it, not even is empty, and the same goes for a question you have archived. A question merged into another keeps working while the one it was merged into is not archived. Paths and Wait until do not offer answers.

When a condition tests an answer, the step shows this note: An automation that rejects on an answer makes an automated decision. It is a reminder, and you can still save and publish.

A Filter or Paths step can ask how the run started, with Started by. Its values are the trigger menu's names: Created, Property updated, Status, New message and the record's other events, Schedule, and Run manually for a run someone started by hand, such as with Run now. Status is a status change and Property updated is a change to any other property, so pick both to match every change. A new message and an answered request are both New message. A run you start again keeps how the first run started. Every run has a value, also runs from before this option arrived, so the field is never empty. A trigger filter, a Wait until and a stop condition cannot use it, and publishing refuses it there. For example, put a Filter with Started by is not Run manually before an email, so a run you start by hand does not send it.

With several triggers, a Filter or Paths step can also ask which trigger started the run, with Started by trigger. Its values are the trigger rows, numbered in their order. The step remembers the row itself, so removing a row above it does not change which row a condition names. A run no row started, such as one from Run now, matches no row: is a row is false for it, and is not a row is true. Runs from before this option arrived count as the first row. With one trigger the option is not offered. When you remove the row a condition names, or every row but one, the step gets a red outline and a note, and publishing refuses it until you change or remove the condition.

Several triggers

An application, job or candidate automation can start from more than one event. Choose Add trigger under the trigger row. The new row starts on Created, so pick another event if you need one. The first row then starts with When, and each new row starts with or. A run starts when the event of any row happens.

The or before a row is a switch. Choose it and every row joins with and. Choose it again to go back to or. With and, a run starts when the event of one row happens and the record already matches every other row at that moment. Say the rows are "Status changes to Interview" and "The label Priority is added". A run starts when an application with the label Priority moves to Interview, and when an application in Interview gets the label Priority. An application that moves to Interview without the label starts no run.

Only a row that names a value, such as a status or a label, can join with and. Created, Property updated, New comment and Any status name no value. While the list has such a row, the switch is disabled, and its tooltip says why. Under and, the trigger menu shows those rows disabled with the same reason, and a new row starts on a property for you to pick a value in. A row with no value picked stops the automation from saving until you pick one or switch back to or.

Under and, a once pill still counts per row. With Once per application on both rows, each row starts at most one run per application.

Each row has its own Every time or once pill, such as Once per application. The filter from Add filter and the teams on the For line apply to every row. To remove a row, choose the cross at the end of it. When one row is left, it has no cross. A member who cannot edit the automation sees Add trigger and the crosses, but cannot use them.

A chip in a step must be one that every row can fill. Status moved to has no value when a row is Created, so with such a row the @ list does not offer it, a Status moved to chip gets a red ring, and the automation will not publish.

All rows are on the record of the first row, and each row offers only that record's own events. A schedule, a webhook, Run manually, a trigger that starts before a date such as Consent ends in N days, and Application on the job each stand alone, so Add trigger does not show under them. A Hub automation has one trigger.

The automation list, the automation page and the Agent's card for an automation show the first row, then "or 2 more" for the other rows, or "and 2 more" when they join with and. The page of a run shows the triggers, then the row that started the run and its number in the list, such as "trigger 2". A run that a member started with Run now shows only the triggers.

Run manually

An automation can wait for a member to start it. Open the trigger menu under Trigger, go to Application or Job, and pick Run manually, the last row. The trigger then reads "A member starts it on an application" or "A member starts it on a job". It has no filter, and no event starts it: a member starts it on one record, with Run now on the automation's page. The automation list says "A member starts it".

Webhook trigger

Use a Webhook trigger when another system should tell Attia that something happened. The automation gets its own URL and its own secret. Each POST that Attia accepts as a new event starts one run, and the run gets the POST's JSON body as its context. The run has no application, job or candidate.

To make one, open the trigger menu under Trigger and pick Webhook, the last row. A Hub automation has no Webhook row. Write the Instructions: they say what the run does with the body, and the automation can't be created without them. Then choose Create automation.

Open the automation once it is created. The trigger reads Webhook is received at, then the URL.

  • The button at the end of the URL is Copy webhook URL.
  • Copy secret copies the secret. It starts with whsec_.
  • The options menu, Webhook options, has Copy example request and Webhook details. The copied example names the secret as $AUTOMATION_WEBHOOK_SECRET, so set that variable before you run it.
  • Webhook details shows the URL, the secret behind Show secret, and the example request. Copy copies it with $AUTOMATION_WEBHOOK_SECRET, and Copy with secret copies it with the secret itself.

The example request looks like this:

curl -X POST "https://attia.app/api/webhooks/automations/<your-url-id>" \  -H "Authorization: Bearer <your secret>" \  -H "Content-Type: application/json" \  -H "Webhook-Id: order-1042-created" \  --data '{"event":"order.created","orderId":"1042"}'

The sender proves itself in one of two ways:

  • Send the secret as Authorization: Bearer <secret>, as in the example. This is the simplest, and any tool that can set a header can do it.
  • Sign the request as Standard Webhooks describes, and send webhook-id, webhook-timestamp and webhook-signature. The secret never travels with the request, and Attia refuses a timestamp more than 5 minutes from its own clock, so a copied old request can't start a run. Pick this when the sending system can sign Standard Webhooks.

When a request has a webhook-signature header, Attia checks the signature and ignores Authorization.

Give each event its own Webhook-Id, and send the same id again when you retry it. A second POST with the same id to the same automation within 72 hours answers 202 and starts no second run. Each POST with no Webhook-Id that Attia accepts starts a run. A signed request must send webhook-id, and Attia checks that id the same way.

A body can be up to 64 KiB (65,536 bytes) and must be JSON. Each URL takes 60 POSTs a minute, one sending address can send 60 a minute, and all of a workspace's Webhook automations take 300 a minute together. The sender gets one of these answers:

AnswerWhen
202The run is accepted, or the Webhook-Id already started one.
400The body is not UTF-8 JSON, or it is JSON that Attia cannot store, such as a NUL character in a string or a number like 1e100000 that grows past 256 KiB when written out. Or the Webhook-Id is not 1 to 255 printable ASCII characters with no spaces.
401The secret or the signature is wrong or missing, or the timestamp is more than 5 minutes off.
403The workspace has more automations switched on than its plan allows.
404No automation has this URL, or the automation is switched off or not published.
413The body is over 64 KiB (65,536 bytes).
429Too many POSTs this minute. The Retry-After header says how many seconds to wait.
500Something failed in Attia. Retry with the same Webhook-Id.
503The automation is busy. No run started. Wait 5 seconds as directed by Retry-After, then retry with the same Webhook-Id.

Change secret in Webhook details makes a new secret after you confirm. The old secret stops working at once, and the URL stays the same. Put the new secret in the sender straight after. A POST with the old one gets 401, unless an earlier check answers first with 404, 413 or 429.

A member who can edit the automation can copy the URL and the secret, and use the options menu. A member who can only view it can copy the URL with Copy webhook URL, and never sees the secret. Attia makes the URL and the secret the first time a member who can edit the automation opens it. Until then, a member who can only view it sees no URL.

The Agent reads the body as data from outside Attia, never as instructions. Text in the body can't change what the Instructions ask, give the run more access, or add a tool.