> ## Documentation Index
> Fetch the complete documentation index at: https://docs.avicenna.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Tally Form Submission Listener

By the end of this guide, you'll have a fully working webhook listener that sends an email whenever someone submits your Tally form. You can see a working version of the final product [here](https://tally.so/r/zxJLM8).

<Callout icon="tree-deciduous" color="#FFA500">
  This guide may include **intermediate to advanced** concepts or terminology.
</Callout>

***

## What You'll Need

Below are the prerequisites you'll need to follow along with this guide:

* a [Tally](https://tally.so) account (free)
* a configured Resend integration in Avicenna (if you want to [send an email](/guides/workshop/actions/send-email))

***

## 1. Create a Tally Form

<Steps>
  <Step title="Create a new form">
    Log in to [Tally](https://tally.so) and create a new form (let's call it "Submit a Suggestion)
  </Step>

  <Step title="Add a question">
    Add a short answer or long answer question to your form (you can word the question however you wish)

    <Frame>
      <img src="https://mintcdn.com/avicenna-a10e7e50/RYEedyKME6KdiDNX/images/image-3.png?fit=max&auto=format&n=RYEedyKME6KdiDNX&q=85&s=248e5169aea7ca97c5aa03c979372af7" alt="Image" title="Image" className="mx-auto" width="942" height="557" data-path="images/image-3.png" />
    </Frame>
  </Step>

  <Step title="Publish your form">
    Once your form looks something like the image above, you can go ahead and publish it!
  </Step>
</Steps>

## 2. Create a Listener Endpoint

<Steps>
  <Step title="Create a POST endpoint">
    From the Avicenna Dashboard, create a new `POST` endpoint (we'll name ours `/tally-listener`).

    <Frame>
      <img src="https://mintcdn.com/avicenna-a10e7e50/RYEedyKME6KdiDNX/images/image-4.png?fit=max&auto=format&n=RYEedyKME6KdiDNX&q=85&s=645b4bf42a11ab9dfa9eef0106cf8138" alt="Image" width="985" height="258" data-path="images/image-4.png" />
    </Frame>
  </Step>

  <Step title="Add request body keys">
    Tally will send information about the form submission via the request body. Add the `eventId` and `data` keys to the request body. 

    <Info>
      A full example of the request body Tally sends can be found [here](https://tally.so/help/webhooks#7333898d17a247c892bd00e30e2d582b).
    </Info>

    <Frame>
      <img src="https://mintcdn.com/avicenna-a10e7e50/RYEedyKME6KdiDNX/images/image-6.png?fit=max&auto=format&n=RYEedyKME6KdiDNX&q=85&s=0365b9fb6f087ce1dc33ce429d103696" alt="Image" width="762" height="304" data-path="images/image-6.png" />
    </Frame>
  </Step>

  <Step title="Add an action block">
    Add the [Send Email action](/guides/workshop/actions/send-email) to your workflow and connect it to the base starting block.

    <Tip>
      If you don't want to send an email, you can instead use a different action such as [Send External Request](/guides/workshop/actions/send-external-request) to trigger something else.
    </Tip>

    <Frame>
      <img src="https://mintcdn.com/avicenna-a10e7e50/RYEedyKME6KdiDNX/images/image-7.png?fit=max&auto=format&n=RYEedyKME6KdiDNX&q=85&s=7f2def18a424ee014ed448153f9ed583" alt="Image" width="924" height="282" data-path="images/image-7.png" />
    </Frame>
  </Step>

  <Step title="Customize your email body">
    You can customize your email's body however you like. Use the variables listed below to add content from the Tally form submission:

    * `{body.data.fields.0.value}` - Returns the answer to the first question in your form
    * `{body.eventId}` - Returns the event ID of the Tally form submission

    <Info>
      A full example and list of keys that are returned by Tally and can be accessed through variables can be found [here](https://tally.so/help/webhooks#7333898d17a247c892bd00e30e2d582b).
    </Info>
  </Step>

  <Step title="Deploy your endpoint">
    Add a simple [Respond](/guides/workshop/actions/respond) action to tell Tally that you received the webhook. You're then ready to deploy the endpoint!

    <Frame>
      <img src="https://mintcdn.com/avicenna-a10e7e50/RYEedyKME6KdiDNX/images/image-9.png?fit=max&auto=format&n=RYEedyKME6KdiDNX&q=85&s=4f64e39c03325de9669407e11dcc649a" alt="Image" width="1448" height="720" data-path="images/image-9.png" />
    </Frame>
  </Step>
</Steps>

## 3. Configure Tally Webhook

<Steps>
  <Step title="Copy endpoint URL">
    Copy the endpoint URL for your webhook listener.

    <Frame>
      <img src="https://mintcdn.com/avicenna-a10e7e50/RYEedyKME6KdiDNX/images/image-11.png?fit=max&auto=format&n=RYEedyKME6KdiDNX&q=85&s=f0267bcd9be5c00cfd4b953b796c1f5c" alt="Image" width="1082" height="224" data-path="images/image-11.png" />
    </Frame>
  </Step>

  <Step title="Add Tally webhook integration">
    Navigate to the **Integrations** tab from the Tally settings page for your form. Click **Connect** under the "Webhooks" option.

    <Frame>
      <img src="https://mintcdn.com/avicenna-a10e7e50/RYEedyKME6KdiDNX/images/image-12.png?fit=max&auto=format&n=RYEedyKME6KdiDNX&q=85&s=3df07847bdee89a70941f11b614ba62d" alt="Image" width="988" height="647" data-path="images/image-12.png" />
    </Frame>
  </Step>

  <Step title="Configure webhook integration">
    Paste your Avicenna listener endpoint's URL in the \*\*Endpoint URL \*\*field. If your API requires authentication, add an API key in the HTTP Headers field. Click **Connect** once you're done.

    <Frame>
      <img src="https://mintcdn.com/avicenna-a10e7e50/RYEedyKME6KdiDNX/images/Screenshot-2026-05-04-at-6.02.06-PM.png?fit=max&auto=format&n=RYEedyKME6KdiDNX&q=85&s=29b84faa36e8f76daea36f45d780620f" alt="Screenshot 2026 05 04 At 6 02 06 PM" width="1392" height="561" data-path="images/Screenshot-2026-05-04-at-6.02.06-PM.png" />
    </Frame>
  </Step>
</Steps>

## 4. All done!

Try submitting a response to your Tally form and watch your Avicenna endpoint run! You can check your endpoint's logs from the Avicenna Dashboard to verify that the webhook executed.

Try out a working version of this Tally setup we've made here: [https://tally.so/r/zxJLM8](https://tally.so/r/zxJLM8)!

***

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="Do I need a paid Tally account?">
    No, this setup works fine with Tally's free plan!
  </Accordion>

  <Accordion title="Can I trigger something other than an email?">
    Yes. Instead of the Send Email action, you can use the Send External Request action to call any third-party service or API of your choice.
  </Accordion>

  <Accordion title="How do I access answers from fields other than the first question?">
    You can use `{body.data.fields.1.value}` for the second field, `{body.data.fields.2.value}` for the third, and so on. The full list of available keys is documented in [Tally's webhook reference](https://tally.so/help/webhooks#7333898d17a247c892bd00e30e2d582b).
  </Accordion>

  <Accordion title="Do I need to add authentication to my endpoint?">
    Authentication is optional. If your API requires it, you can add an API key in the HTTP Headers field when configuring the Tally webhook integration.
  </Accordion>
</AccordionGroup>
