What This Stack Unlocks for Rork Apps
Rork is excellent at generating mobile app UIs and logic quickly, but backend processing — handling form submissions, analyzing user content, sending conditional notifications — typically requires extra infrastructure.
n8n (a visual, no-code workflow automation tool) paired with Google AI Studio's Gemini API fills that gap without requiring you to spin up a server or write backend code.
Here's what becomes possible:
- A user submits a review in your Rork app → Gemini instantly classifies the sentiment → the result is saved to Supabase
- A user uploads a photo → n8n receives the webhook → Gemini analyzes the image → a push notification is triggered
- Weekly, Gemini summarizes user activity data and emails a report automatically
All of this runs outside your Rork app, triggered by webhooks and orchestrated by n8n.
What You'll Need
- A Rork account (with webhook/API access enabled)
- An n8n account (free n8n.cloud tier works)
- A Gemini API key from Google AI Studio (aistudio.google.com)
- Optionally: Supabase, Slack, or SendGrid accounts depending on your workflow
Getting Your API Key from Google AI Studio
Google AI Studio is Google's developer portal for the Gemini API. It's also where you can prototype and test your prompts before putting them into production.
- Go to aistudio.google.com and sign in
- Click Get API key → Create API key
- Select or create a project, then generate the key
- Copy it immediately and store it in a password manager
Tip: Use Google AI Studio's Prompt design interface to test your prompts before embedding them in n8n. This lets you refine outputs without burning API calls.
Setting Up the Gemini Credential in n8n
- In n8n, go to Credentials → Add Credential → Header Auth
- Set:
- Name:
Gemini API - Header Name:
x-goog-api-key - Header Value: your API key
- Name:
- Click Save
Practical Workflow: AI Sentiment Analysis for App Reviews
Let's build a complete workflow: when a user submits a review in your Rork app, Gemini analyzes the sentiment and routes the result appropriately.
Workflow Structure
Rork App (sends webhook on form submit)
↓
n8n: Webhook Trigger (receives data)
↓
n8n: HTTP Request (Gemini API: sentiment analysis)
↓
n8n: Switch Node (positive / negative / neutral)
↓ Positive ↓ Negative
Save to Supabase Slack alert + Save to Supabase
Step 1 — Create a Webhook Trigger in n8n
- In n8n, add a Webhook node
- Set HTTP Method to
POST - Set Response Mode to
Respond to Webhook - Copy the generated Webhook URL — you'll add this to Rork
Step 2 — Configure Rork to Send the Webhook
In Rork's workflow or API integration settings, configure a POST request to the n8n Webhook URL when the form is submitted.
Example payload:
{
"user_id": "user_123",
"review_text": "This app is incredibly intuitive — love it!",
"rating": 5,
"timestamp": "2026-04-04T11:30:00Z"
}Step 3 — Call the Gemini API
Add an HTTP Request node:
Method: POST
URL: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent
Authentication: Header Auth → Gemini API
Content-Type: application/json
Request Body:
{
"contents": [
{
"parts": [
{
"text": "Analyze the following app review and respond only in this JSON format:\n{\n \"sentiment\": \"positive/negative/neutral\",\n \"score\": 1-10,\n \"summary\": \"one sentence summary\",\n \"keywords\": [\"keyword1\", \"keyword2\"]\n}\n\nReview: {{ $json.review_text }}"
}
]
}
],
"generationConfig": {
"temperature": 0.1,
"responseMimeType": "application/json"
}
}Expected Response:
{
"sentiment": "positive",
"score": 9,
"summary": "User loves the app's intuitiveness",
"keywords": ["intuitive", "love", "easy"]
}Step 4 — Route by Sentiment
Add a Switch node to branch based on the sentiment value:
{{ JSON.parse($json.candidates[0].content.parts[0].text).sentiment }}
= "negative" → Slack alert + save to Supabase
= "positive" → save to Supabase
= "neutral" → save to Supabase (no alert)
Extended Workflow: Image Analysis for User Uploads
If your Rork app lets users upload photos, you can route those images through n8n and Gemini for automatic tagging:
Rork: user uploads image to Supabase Storage
↓
Supabase: Database Webhook notifies n8n
↓
n8n: fetch image from Supabase Storage URL
↓
n8n: send to Gemini API (multimodal)
↓
n8n: write tags/labels back to Supabase
Troubleshooting Common Issues
Issue 1: Webhook Not Received in n8n
Symptom: The n8n Webhook Trigger doesn't fire when Rork submits the form.
Fix:
- In n8n.cloud, your Webhook URL looks like
https://your-instance.app.n8n.cloud/webhook/xxxx— confirm Rork is sending to the exact URL - Make sure your n8n workflow is set to Active (not just in test mode — test mode only accepts webhooks via "Test Step")
- Check that Rork's HTTP request is using
POSTand sending valid JSON with the correctContent-Type: application/jsonheader
Issue 2: JSON Parse Error on Gemini Response
Symptom: JSON.parse() throws a SyntaxError.
Fix:
- Set
responseMimeType: "application/json"ingenerationConfig— this forces Gemini to output valid JSON - Add explicit instruction in the prompt: "Respond only with the JSON object. Do not include any additional text or explanation."
- Keep
temperatureat 0.1 or lower for deterministic structured output
Issue 3: Supabase Write Fails
Symptom: 403 Forbidden or JWT expired from Supabase.
Fix:
- Check that the Service Role Key (or Anon Key) in your n8n Supabase credential is correct and hasn't expired
- If using Row Level Security (RLS), ensure the policy allows inserts from the service role
- For development, you can temporarily disable RLS to verify the connection works, then re-enable it with appropriate policies
Issue 4: Rate Limit Exceeded (429)
Symptom: 429 Too Many Requests from the Gemini API during high-volume processing.
Fix:
- Add a Wait node (1–2 second delay) between each Gemini API call in batch workflows
- For bulk processing, consider using Gemini's Batch API which is designed for high-volume, non-real-time requests
Issue 5: Webhook Times Out
Symptom: Rork gets a timeout error when sending the webhook.
Fix:
- Change the Webhook node's Response Mode to
Immediately— this sends an instant200 OKacknowledgment and continues processing asynchronously
Webhook (Response Mode: Immediately)
↓ (continues asynchronously)
Gemini API → Supabase
Prototype in Google AI Studio First
Before embedding a prompt in n8n, test it in Google AI Studio's Freeform prompt interface:
- Go to aistudio.google.com
- Open New prompt → Freeform
- Paste real review text and adjust the prompt wording until the output is reliable
- Tune
Temperature(lower = more stable) andMax output tokensin the GUI - Copy the finalized prompt directly into your n8n HTTP Request body
This workflow — prototype in AI Studio, automate in n8n — keeps your iteration loop fast and your API costs under control.
Wrapping Up
The n8n + Google AI Studio (Gemini API) combination gives your Rork app a smart backend without the overhead of writing and maintaining server code. Start with a simple sentiment analysis workflow for user reviews, verify it works end-to-end, then expand from there.
The troubleshooting section covers the most common friction points, so getting to a working workflow should be straightforward.