🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials October 26, 2026

How to Generate AI Text From Gravity Forms With Your Own Account

GravityExtra
How to Generate AI Text From Gravity Forms With Your Own Account

Artificial intelligence has quietly become part of the everyday web form. A contact form can summarise a long message for your team before anyone reads it. A support form can draft a first reply. A lead form can tag an enquiry so it reaches the right person. A quote form can turn rough notes into a tidy brief. Gravity Forms is the tool many WordPress sites already trust to collect that information, and with the right add-on it can hand each submission to a large language model and write the result straight back onto the entry. This guide explains how to do exactly that with your own AI account, using the Gravity Forms AI Gateway Premium Add-on, and why running the models through your own account matters.

Why generate text on your own account

There are many services that will bolt a chatbot onto your site, but they almost always route your data through a third party and bill you on top of what the model actually costs. For a business form that is a poor trade. You lose control of where the data goes, you pay a margin, and you are tied to whichever model that service decides to support. Running generation through your own account solves all three problems. The prompt built from your form goes directly from your site to the provider you chose. The bill is the provider’s own, with no middleman. And you choose the model, so you can use the fast, cheap one for simple tagging and the strong one for careful drafting.

The AI Gateway add-on is built around that principle. It never routes anything through GravityExtra. Your credentials are stored encrypted on your own site, the host for every request is checked so a key can never leak to another address, and the generated text is written onto your entry where your team already works.

One switch, five providers

Different businesses have different reasons for choosing a provider, so the add-on supports five of the most useful and lets you switch between them with a single setting.

Azure OpenAI is the choice for enterprises and for teams in regions with strict data rules, because it runs OpenAI models inside your Azure tenant and region. AWS Bedrock is ideal if your stack already lives in Amazon Web Services: it reaches the models in your own AWS account, and the add-on signs each request with AWS Signature Version 4 from your IAM access key, exactly as the AWS SDK would. Grok from xAI, Hugging Face and Together round out the set with a single API key each, which makes them quick to set up and good value for high volumes. You are never locked in; a feed can use a different provider from the account default, so you can trial one against another on the same form.

These are the five providers that per-provider connections tend not to include, so the add-on fills the gaps for enterprise and alternative models rather than duplicating anything you already use. If your forms already talk to a single AI service, this adds the ones you have been missing.

What you need before you start

You need Gravity Forms 2.5 or newer, a GravityExtra licence for the add-on, and an account with one of the five providers. For Azure OpenAI, gather the resource name from your endpoint, an API version and a deployed model. For AWS Bedrock, create an IAM access key that is allowed to call Bedrock, and note your region and a model id. For Grok, Hugging Face or Together, copy an API key and pick a model name. Keep these to hand; you will paste them once and the add-on will store them encrypted.

Step one: connect your account

Install and activate the plugin, then open Forms, then Settings, then AI Gateway, and activate your licence key. The full AI Gateway setup guide walks through every field in detail. Choose your provider from the switch, and the fields below it change to match. Enter the credentials for that provider, set a default model, and if you wish set a default maximum number of tokens and a temperature that controls how creative the answers are. There is also a daily cap, which stops generation for the rest of the day once a number of answers has been produced, so a surge of submissions can never run up a surprise bill.

Save the page and press Check the connection. The add-on asks your provider to list the models on your account using the saved credentials. It generates nothing and spends nothing; it simply confirms that the credentials reach the provider and that everything is spelled correctly. If a key is allowed to generate but not to list models, the check says so and generation still works.

https://gravityextra.com/wp-content/uploads/2026/10/gfaig-settings-scaled.png

Step two: write a prompt as a feed

Open the form you want to add intelligence to, go to its Settings tab, choose AI Gateway and add a feed. A feed is a single instruction to the model. Give it a name, leave the provider on the account default or choose another, and optionally set a model just for this feed.

The heart of the feed is the prompt. There are two boxes. The system prompt sets the role and tone, for example telling the model that it is a support agent who answers in two short sentences. The main prompt is the request itself, and this is where Gravity Forms merge tags earn their keep. If your message field has the id four, a prompt such as “Summarise this customer message in one sentence: {Message:4}” sends the visitor’s own words to the model every time. You can combine several fields, add context, and shape the output precisely.

Finally, choose the field that receives the answer. A hidden field is perfect when the text is only for your team; a paragraph field works when you want it visible. The same answer is available as the merge tag {aigateway_answer}, so you can also drop it into a notification or a confirmation. Turn on the condition if the feed should only run for some entries, such as when the topic is support, and save.

https://gravityextra.com/wp-content/uploads/2026/10/gfaig-editor.png

Step three: submit and see the result

Submit a test entry. The visitor sees the usual confirmation at once, because the generation runs in the background a moment later and never makes the form wait. Open the entry and you will find the AI Gateway box showing the status, the provider and the generated text, with the answer written into the field you chose and a note recording what happened. From here the text behaves like any other entry value: it shows in the entry list, it exports, and it flows into notifications.

https://gravityextra.com/wp-content/uploads/2026/10/gfaig-entry-scaled.png

Built for real traffic

A form that talks to an outside service has to be careful, and the add-on is. The visitor never waits for the model, because the work is queued and done in the background. If the provider is briefly unreachable, or answers with a rate limit or a server error, the add-on waits and tries again with a growing delay, and it respects a Retry-After header when the provider sends one. A genuine problem, such as a wrong key or an unknown model, is reported clearly rather than retried forever. The daily cap keeps spend predictable, and every credential is encrypted at rest and sent only to the provider’s own host.

Practical recipes

A few patterns show how far a simple feed can go. On a contact form, add one feed that summarises the message into a hidden field so your team can triage at a glance, and a second feed that drafts a friendly first reply into another field for an agent to review and send. On a lead form, write a prompt that classifies the enquiry into one of your categories and store it in a field, then use that field in conditional routing so hot leads reach sales immediately. On an application or intake form, turn a page of rough notes into a structured brief. Because each feed can use a different model, you can run the quick, inexpensive model for tagging and the stronger model for anything a human will actually read.

For developers

The add-on exposes a filter so you can shape the request in code. The gform_aigateway_request filter receives the system prompt, the prompt, the model, the maximum tokens and the temperature, along with the feed, the entry and the form, and you can change any of them or cancel generation for that entry. Two actions, gfaig_generation_done and gfaig_generation_failed, fire with the result so you can log it or trigger your own workflow. The four merge tags, {aigateway_answer}, {aigateway_status}, {aigateway_provider} and {aigateway_model}, let you surface the result anywhere Gravity Forms renders text.

A note on privacy

Whenever a form sends data to a model, you are sharing that data with the provider, so it is worth being deliberate. Send only the fields the model needs, keep sensitive details out of prompts where you can, and make sure your privacy policy reflects that an AI provider processes some submissions. The add-on helps by adding a short passage to the WordPress privacy policy guide and by keeping credentials encrypted and locked to the provider you chose.

Conclusion

Adding AI to Gravity Forms does not have to mean handing your data and your budget to a third party. With the AI Gateway add-on you connect your own Azure OpenAI, AWS Bedrock, Grok, Hugging Face or Together account, write a prompt as a feed, and let each submission come back with the summary, reply, tag or brief you asked for, written straight onto the entry. It is quick to set up, careful with real traffic, and entirely under your control. Pick a form that eats your team’s time, write one prompt, and let the model take the first pass.

Ready to connect your own AI account to Gravity Forms? Get the Gravity Forms AI Gateway Premium Add-on and generate your first answer today.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr