# Act on a request's outcome

Start a Zap when a request is completed, expires or is canceled, and branch on whether the recipient approved, declined or asked for changes.

## Act on a request's outcome

This guide builds a Zap that emails your team when a recipient answers an approval request, with their decision in the subject line. A filter then limits it to approvals.

<p>
  You need a <a href="/guides/zapier/connect">formbase connection in Zapier</a> and requests to act on, sent from a Zap as in
  <a href="/guides/zapier/send-a-request">Send a request from a Zap</a> or from anywhere else: the dashboard, the API or an agent. To branch
  on a verdict, the form needs a <a href="/requests/decisions-and-approvals">Decision question</a>.
</p>

<h2 id="pick-the-trigger">1. Pick the trigger</h2>

<p>
  Create a Zap, choose <strong>formbase</strong> as the trigger app, and search for <strong>Request</strong>:
</p>

<p>
  Pick <strong>Request Completed</strong>, pick your account, and choose the form. The Zap fires for requests to that form only.
</p>

<h2 id="test-the-trigger">2. Test the trigger</h2>

<p>
  Click <strong>Test trigger</strong>. As with public link triggers, Zapier loads a sample built from the form's questions, so you can map
  fields before any request is completed:
</p>

<p>
  Where a field key reads differently from its question title, the label names the key in parentheses.{' '}
  <strong>Your Decision (decision)</strong> is the answer whose field key is <code>decision</code>, and a mapped field shows it as{' '}
  <strong>Data › Answers › Decision</strong>.
</p>

<p>
  Besides <strong>answers</strong> and <strong>display</strong>, a request event carries a <strong>request</strong> group:
</p>

<ul>
  <li>
    <strong>Recipient Email</strong>, <strong>Recipient Name</strong>, <strong>Request External ID</strong>, <strong>Metadata</strong>
    and <strong>Context</strong>: what you set when you created the request. Use the External ID to find the record the request was about.
  </li>
  <li>
    <strong>Outcome</strong>: <code>approve</code>, <code>decline</code> or <code>changes</code>, the recipient's answer to the Decision
    question. On this form it is the same value as <strong>Answers › Decision</strong>, because the Decision question's key is
    <code>decision</code>. Outcome is missing when the form has no Decision question.
  </li>
</ul>

<p>
  Every field is described in the <a href="/requests/callbacks#payload">callback payload</a>; Zapier receives the same event.
</p>

<h2 id="send-the-email">3. Map the action</h2>

<p>
  Add the action. This guide uses <strong>Email by Zapier</strong> › <strong>Send Outbound Email</strong>, with the recipient's name and
  their decision in the subject and the External ID in the body:
</p>

<p>
  Publish the Zap. When the recipient completes the request, the email arrives with a subject like <em>Ada Lovelace answered: Approve</em>,
  and the run appears in <strong>Zap history</strong>.
</p>

<h2 id="branch-on-the-outcome">4. Continue only on approval</h2>

<p>
  To act on one verdict only, add a <strong>Filter</strong> step between the trigger and the action. Set it to continue only if{' '}
  <strong>Data › Answers › Decision</strong> exactly matches <code>approve</code>:
</p>

<p>
  The Decision question's field key is always <code>decision</code>, so <strong>Data › Answers › Decision</strong> has the same name on
  every form. <strong>Data › Request › Outcome</strong> holds the same value.
</p>

<p>
  Compare with the value from <strong>answers</strong>, not the label from <strong>display</strong>: the label changes when you rename the
  option or the recipient answers in another language, the value does not. To handle each verdict differently, use <strong>Paths</strong>{' '}
  instead of a filter, one path per value.
</p>

> ℹ️ **Filters and Paths need a paid Zapier plan**
> <p>
>     A Zap with a Filter or Paths step has more than two steps, and Zapier's Free plan publishes only two-step Zaps. On Free, keep the
>     trigger and one action, and branch in the app the action writes to.
>   </p>

<h2 id="troubleshooting">If the Zap does not start</h2>

<ul>
  <li>
    <strong>It was a test request.</strong> A request created with Test Request on, or with <strong>Try it yourself</strong>, never starts a
    Zap. Only its <a href="/requests/callbacks">callback</a> fires. Send a real request to check the Zap.
  </li>
  <li>
    <strong>The request was for another form.</strong> The trigger listens to the form you chose in step 1.
  </li>
  <li>
    <strong>The Zap is off, or uses a connection to another workspace.</strong> See the checks in
    <a href="/guides/zapier/public-link-submissions#troubleshooting">the public link guide</a>.
  </li>
</ul>

<h2 id="next">Next</h2>

<div class="not-prose grid gap-3 sm:grid-cols-2 mb-8">
  - [Look up, remind and cancel requests](/guides/zapier/manage-requests) — Find a request by External ID, nudge the recipient, or withdraw it.
  - [Decisions and approvals](/requests/decisions-and-approvals) — The Decision question and its three values.
</div>
