> For the complete documentation index, see [llms.txt](https://docs.riff.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.riff.ai/archive/quick-start-tutorials-legacy-staging/quick-start-automation-v2.md).

# Quick Start: Automation v2

You'll build an automation that runs at 07:00 every working day, queries your ERP for procurement exceptions, and posts a structured digest to Slack or Microsoft Teams. Your team starts the day knowing exactly what needs attention — without logging into the ERP.

**Time to build:** 20–30 minutes\
**Good for:** Procurement and operations teams on SAP, Infor LN/M3, Oracle, or Dynamics who want a morning briefing on exceptions — without manually running ERP reports.

***

### What you'll build

* **ERP query:** Three exception types pulled each morning — unconfirmed deliveries, invoice/PO mismatches, overdue purchase orders
* **Structured digest:** Grouped by exception type, sorted by urgency, with buyer/owner named
* **Scheduled trigger:** Runs at 07:00, Monday–Friday
* **Alert output:** Posted to Slack `#procurement-daily` or your Teams channel

***

### Step 1 — Create your workspace

Go to **riff.ai**, sign in, and click **New Agent**.

***

### Step 2 — Describe your automation

Paste this into the chat:

> Build a daily procurement exceptions automation. Every working day at 07:00, query our ERP and pull three exception categories:
>
> 1. Open purchase orders where delivery confirmation has not been received and expected delivery date is within the next 7 days or already past.
> 2. Invoices where the amount does not match the PO within a 2% tolerance.
> 3. Purchase orders where expected delivery date has passed and no goods receipt has been posted.
>
> Format the output as a structured digest grouped by exception type. For each item include: supplier name, PO or invoice number, value (EUR), days until/past due, and buyer responsible. Sort each group by urgency (most critical first). Post the digest to Slack channel #procurement-daily.

**Adjust before you submit:**

* Add your ERP: "We use Infor LN" / "Our system is SAP S/4HANA" / "We're on Oracle Fusion"
* Switch channels: "Post to Microsoft Teams channel Procurement Operations"
* Adjust tolerance: "Use a 1% tolerance for invoice matching"

***

### Step 3 — Review and confirm the plan

Riff generates a Riff Card showing how it will connect to your ERP, what exception queries it will run, the schedule it will set, and where it will send the output. Adjust anything that doesn't fit. Click **Confirm plan → Build**.

***

### Step 4 — Connect your ERP

**Option A — ERP API**\
Infor ION, SAP OData, Oracle REST, or Dynamics 365 APIs. Add credentials in **Integrations → Secrets**.

**Option B — Reporting database**\
Read-only access to your ERP reporting schema. The agent writes the queries and runs them on schedule.

**Option C — Scheduled export**\
Your ERP exports exception reports to SharePoint, SFTP, or a network folder. Tell the agent the file location and format.

***

### Step 5 — Connect your alert channel

**Slack:** Go to **Integrations → Slack**, click Connect, and choose the channel.

**Microsoft Teams:** Provide a Teams incoming webhook URL (from channel settings → Connectors).

**Email:** Tell the agent: "Send by email to <procurement@yourcompany.com>" — it configures the SMTP connection.

***

### Step 6 — Test it

Click **Run now**. Check your Slack or Teams channel for a message like:

```
📋 Procurement Daily — 14 May 2026

UNCONFIRMED DELIVERIES (3 items)
• Müller GmbH | PO 4500123456 | Gaskets | €12,400 | Due: today | Buyer: J. Schmidt
• Nordic Parts AB | PO 4500123457 | Bearings | €8,200 | 2 days overdue | Buyer: A. Berg

INVOICE MISMATCHES (2 items)
• Schulz Logistics | INV-2026-0881 vs PO 4500123450 | Variance: €340 (2.8%) | Finance: M. Weber

OVERDUE POs (5 items)
• ...
```

**If data looks wrong**, tell the agent:

* "Only flag invoices over €500 variance"
* "Add the plant code to each line"
* "Group by buyer instead of exception type"
* "Skip exceptions already resolved in the last 24 hours"

***

### Step 7 — Set the schedule

Go to **Automations → Schedules** and confirm the trigger is set to `07:00, Monday–Friday`. Adjust for your business calendar.

***

### Step 8 — Deploy

Click **Deploy**. The automation runs every working morning. Your team gets a structured exceptions briefing without anyone running a single ERP report.

***

### Variants

| Variant                       | What it does                                                                                              |
| ----------------------------- | --------------------------------------------------------------------------------------------------------- |
| **Invoice-only digest**       | Run at 08:00, query only invoice mismatches above €1,000. Post to `#finance-exceptions`.                  |
| **End-of-day wrap**           | Run at 17:00, pull what was resolved today vs still open. Give buyers a closing summary.                  |
| **Weekly supplier scorecard** | Run Monday morning. Aggregate last week's delivery performance by supplier. Share with category managers. |

***

### What's next

* [**Briefing your agent**](https://github.com/ElleNealAI/riff-docs/blob/main/archive/getting-started/briefing-your-agent-v2/README.md) — Extend this automation into a full agent that takes action on exceptions, not just reports them
* [**Quickstart Dashboard**](https://github.com/ElleNealAI/riff-docs/blob/main/archive/quick-start-tutorials/quickstart-dashboard/README.md) — Build a live exceptions dashboard alongside your digest
* [**Quickstart Agent**](https://github.com/ElleNealAI/riff-docs/blob/main/archive/quick-start-tutorials/quickstart-agent/README.md) — Turn the digest into an agent that chases suppliers automatically


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.riff.ai/archive/quick-start-tutorials-legacy-staging/quick-start-automation-v2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
