Automation library · Data collection

Automated Facebook message response with OpenAI and Airtable

Started by a clock, and works across Airtable and Google Sheets. It hands the judgement calls to Azure OpenAI. 17 steps, 2 branches: a working afternoon to understand properly.

MediumCalls a model: Azure OpenAI

17 stepsMedium: a working afternoon
2Branches: places the flow splits
0Loops or waits
2Services it connects to

The flow

Starts it 1Model 4Logic 6Service 6

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

  1. 1Trigger – Fetch New Facebook Messages (Every Hour)Schedule triggerStarts it
  2. 2Configure GPT-4o, Message Classification ModelLm Chat Azure Open AiModel
  3. 3Configure GPT-4o, Product Matching ModelLm Chat Azure Open AiModel
  4. 4Fetch Facebook Conversation ListFacebook Graph ApiService
  5. 5AI – Extract Product & Customer IntentAgentModel
  6. 6AI – Match Requested Product in InventoryAgentModel
  7. 7Fetch Facebook Conversation MessagesFacebook Graph ApiService
  8. 8Merge AI Output With Inventory DatasetMergeLogic
  9. 9Parse AI Product Match JSONCodeLogic
  10. 10Validate Record StructureIfLogic
  11. 11Build Combined AI + Inventory Payload (CodeLogic
  12. 12Check If Product ExistsIfLogic
  13. 13Extract Latest Facebook MessageCodeLogic
  14. 14Log Invalid Records to Google SheetGoogle SheetsService
  15. 15Send Facebook Reply, Product FoundFacebook Graph ApiService
  16. 16Send Facebook Reply, Product Not FoundFacebook Graph ApiService
  17. 17Fetch Inventory Records from AirtableAirtableService

How it's built

Starts on
A clock
Steps
17, with 2 branches
Size
Medium: a working afternoon
Connects to
Airtable, Google Sheets
Model
Azure OpenAI

Questions

What does it need to run?

An n8n account, plus your own Airtable and Google Sheets accounts, and a key for Azure OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

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

How long does it take to set up?

Plan an afternoon. 17 steps is enough that you should read each one before running it.

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 17 steps before you point it at anything that matters.