Integration

Creating your OWN surveys for your users is EASY!

You're Flying Blind Without User Feedback

Building a product without knowing how your users feel about it is one of the fastest ways to ship the wrong thing. You need feedback loops — real ones, not just hoping users will find a form buried in your app somewhere.

The problem is that setting up a proper survey system from scratch feels like a whole project unto itself. You need a way to create surveys, store them, send them via email, collect responses, and respect user preferences like unsubscribes. Most builders either skip it entirely or pay for a third-party survey tool that doesn't integrate cleanly with their backend logic.

But what if you could build the entire thing inside Xano, own the data completely, and get it running in minutes?

Email-Based Surveys Are More Powerful Than You Think

The approach here is straightforward: use Xano's backend logic to create surveys, store them in your database, and send them directly to users via email using Resend — a developer-friendly email API. When a user clicks a survey option inside the email, they're routed back to an Xano endpoint that records their response.

No third-party survey dashboard. No data living somewhere else. No complicated integrations.

The key insight is that the survey is embedded in the email itself as HTML. Users don't have to navigate anywhere or log in. They just click their answer and they're done. That simplicity dramatically improves response rates.

Xano has a pre-built snippet you can install to get this whole system up and running immediately. Once it's active in your workspace, you have everything you need — database tables, API endpoints, and a custom function for creating surveys.

Building and Sending Your First Survey

Step 1: Set up Resend

Head to resend.com and create an account. During onboarding, you'll get an API key — grab that because you'll need it in a moment.

If you want emails to come from your own domain (which you should, for credibility), Resend lets you add a custom domain. You'll add a few DNS records through your registrar and you're set.

Step 2: Connect Resend to Xano

Inside Xano, go to Settings and find the Resend integration. Click the blue Manage button, then Edit, and drop in your Resend API key. You'll also want to set your base URL — this is the URL of your Xano workspace, and you can grab it right from your browser's address bar. Save it, and the connection is live.

Step 3: Create a Survey

Install the Xano snippet (link in the video description), and you'll have access to a custom function called survey_create. Click Run and pass in:

  • title — the name of your survey
  • question — what you're asking users
  • options — a text array of possible answers (e.g., ["Excellent", "All right", "Never again"])
  • active — a boolean set to true

When you run it, Xano creates a survey record in your database and returns a UUID. Copy that ID — you'll use it to send the survey.

Step 4: Send the Survey Email

Navigate to your API group and find the send_survey_email endpoint. Hit Run and pass in two inputs:

  • user_uuid — the ID of the user you're sending to
  • survey_uuid — the ID you just grabbed

Under the hood, Xano is doing a lot of work here. It fetches the user and survey records, validates they exist, pulls in your base URL from environment variables, and dynamically builds two key URLs: one for recording survey feedback and one for unsubscribing. These get injected into the email HTML before it's sent.

The HTML template is fully customizable. You can edit it directly or use Xano's AI assistant to redesign it however you like. The send itself happens through the send email utility function, which calls the Resend API with your key, subject line, recipient address, and the rendered HTML. A small delay of 5,000 milliseconds is added to the schedule timestamp to avoid any race conditions with email delivery.

Once sent, Xano updates the email record to mark it as delivered.

Step 5: Responses and Unsubscribes

When a user clicks an answer in their inbox, they're routed to the survey_feedback endpoint, which logs their response directly into the survey_response table in your Xano database. It's that clean.

If a user clicks Unsubscribe, they hit the unsubscribe endpoint, which updates their user record — setting marketing to disabled and flagging them as unsubscribed. No manual intervention needed.

The Details That Can Trip You Up

Don't skip the base URL setup. If your environment variable isn't set correctly, the feedback and unsubscribe links in the email will be broken, and users won't be able to respond or opt out. Double-check this before you send anything to real users.

Custom domain vs. default domain matters. Emails sent from a generic Resend domain are more likely to land in spam. Take the extra 10 minutes to configure your custom domain through Resend — your deliverability will thank you.

The unsubscribe flow isn't optional. If you're sending marketing or feedback emails, you're legally and ethically obligated to honor opt-outs. This system handles it automatically, but make sure you're checking the marketing flag before triggering any future emails. Don't send campaigns to users who've already unsubscribed.

Test the full flow before going live. Send the survey to yourself first, click a response, verify it shows up in your survey_response table, then click unsubscribe and confirm the user record updates. It takes two minutes and saves you from embarrassing data gaps.

You Now Own Your Feedback Loop

When this is running, you have something most indie builders and early-stage teams don't: a fully owned, database-backed feedback system that respects your users' preferences and keeps all the data in one place.

No monthly survey tool subscription. No copy-pasting responses from a third-party dashboard. No wondering whether your users' data is being sold to someone else.

You can trigger surveys at any point in your user journey — after onboarding, after a key action, after a support interaction. The more targeted the moment, the better the feedback. And because everything lives in Xano, you can query, analyze, and act on those responses right alongside the rest of your application data.

That's the real win here. Not just sending a survey — but building a feedback infrastructure that grows with your product.

Sign up for Xano

Join 100,000+ people already building with Xano.
Start today and scale to millions.