# Taxi service provider with Grok and Postgres: n8n workflow

> Started by someone opening a chat with it, and works across Postgres and Redis. It hands the judgement calls to Grok.

Source: https://millionrounds.com/workflow/taxi-service-provider-with-grok-and-postgres (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Data collection](https://millionrounds.com/workflows?category=Data+collection#library)

# Taxi service provider with Grok and Postgres

Started by someone opening a chat with it, and works across Postgres and Redis. It hands the judgement calls to Grok. 24 steps, 4 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: Grok

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Ftaxi-service-provider-with-grok-and-postgres)

**24 steps** Large: read it before trusting it with anything live

**4** Branches: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 2 Model 3 Logic 14 Service 5

The steps in the order they run, from what starts it.

- 1 **Flow Trigger** Execute Workflow trigger *Starts it*
- 2 **Test Trigger** Chat trigger *Starts it*
- 3 **xAI @grok-2-1212** Lm Chat XAi Grok *Model*
- 4 **Create Booking Data** Postgres Tool *Service*
- 5 **Calculator** Tool Calculator *Model*
- 6 **Input** Set *Logic*
- 7 **Test Fields** Set *Logic*
- 8 **AI Agent** Agent *Model*
- 9 **Provider Cache** Redis *Service*
- 10 **Code** Code *Logic*
- 11 **Error Output1** Set *Logic*
- 12 **Provider Cache Switch** Switch *Logic*
- 13 **If Valid?** If *Logic*
- 14 **Call Back** Execute Workflow *Logic*
- 15 **Parse Provider** Code *Logic*
- 16 **Load Provider Data** Postgres *Service*
- 17 **If Score** If *Logic*
- 18 **Test Output** Set *Logic*
- 19 **Provider** Set *Logic*
- 20 **If Active** If *Logic*
- 21 **Output w/ Score** Set *Logic*
- 22 **Output w/o Score** Set *Logic*
- 23 **Provider Number** Redis *Service*
- 24 **Save Provider Cache** Redis *Service*

## How it's built

- **Starts on:** Someone opening a chat with it
- **Steps:** 24, with 4 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Postgres, Redis
- **Model:** Grok

## Questions

What does it need to run?

An n8n account, plus your own Postgres and Redis accounts, and a key for Grok. You connect your own accounts after importing it; none are included.

What starts it?

It starts on someone opening a chat with it.

Does it use AI?

Yes. It calls Grok. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 24 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 24 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Ftaxi-service-provider-with-grok-and-postgres)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Postgres](https://millionrounds.com/workflows?service=Postgres#library)[Redis](https://millionrounds.com/workflows?service=Redis#library)

## Workflows like it

Also data collection, with the same services where possible, closest in size first.

- [**Conversing with OpenAI and Postgres** 25 steps · calls a model · Postgres](https://millionrounds.com/workflow/conversing-with-openai-and-postgres)
- [**Serve a RAG chat backend for Next.js with OpenAI and Redis** 23 steps · calls a model · Pinecone, Postgres](https://millionrounds.com/workflow/serve-a-rag-chat-backend-for-next-js-with-openai-and-redis)
- [**The title is very good, clearly conveying the template's purpose** 25 steps · calls a model · Gmail, Postgres](https://millionrounds.com/workflow/the-title-is-very-good-clearly-conveying-the-template-s-purp)
- [**Automate customer retention with Stripe** 22 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/automate-customer-retention-with-stripe)
- [**Automatic service with Gemini and Postgres** 22 steps · calls a model · Postgres, Redis](https://millionrounds.com/workflow/automatic-service-with-gemini-and-postgres)
- [**Automated email responses with OpenAI and Supabase** 27 steps · calls a model · Outlook, Postgres](https://millionrounds.com/workflow/automated-email-responses-with-openai-and-supabase)
