> For the complete documentation index, see [llms.txt](https://helpdesk.ldtsoft.work/ldt-online-course/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpdesk.ldtsoft.work/ldt-online-course/enroll-and-price/how-to-automate-course-access-with-shopify-flow.md).

# How to automate course access with Shopify Flow

Use Shopify Flow to grant or revoke course and community access and react to course and community events — fifteen triggers and four actions

**Shopify Flow** is Shopify's automation app, and **LDT Online Courses** plugs into it: the app adds **fifteen triggers** and **four actions**, so access to a course or a community can be given, taken away or reacted to without anyone clicking.

Inside Flow the app appears under its Flow name, **LDT Courses & Communities**.

### 1. Start a workflow in Shopify Flow

In Shopify admin open **Apps** -> **Flow** (1) and click **Create workflow** in the top-right corner. The new workflow opens on an empty canvas: describe it in the box if you want Flow to build it for you, or click **Select a trigger** to pick the event yourself.

A new workflow is saved as a **Draft** and does nothing at all until you click **Turn on workflow** — so you can build and inspect it safely.

<figure><img src="https://3532245007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRJ3j93eHyen8t2flj5y%2Fuploads%2Fgit-blob-e6d3e5cd9f2d6cf5057751593167a613a1c211bd%2Fhow-to-automate-course-access-with-shopify-flow-step-1.png?alt=media" alt="Starting a workflow in Shopify Flow and choosing Select a trigger"><figcaption></figcaption></figure>

### The triggers LDT adds to Flow

Search the trigger picker for *Course* or *Community*, or open the **LDT Courses & Communities** group. A course trigger hands the workflow the customer and the course it fired for; a community trigger hands the customer and the community.

| Trigger                              | Fires when                                                                                                                              |
| ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| **Course Enrolled**                  | a customer enrolls in a course                                                                                                          |
| **Course Started**                   | a customer starts a course                                                                                                              |
| **Course: Progress Updated**         | course progress is updated                                                                                                              |
| **Course: Lesson Completed**         | a customer completes a course lesson                                                                                                    |
| **Course: Quiz Completed**           | a customer submits a quiz                                                                                                               |
| **Course: Survey Completed**         | a customer submits a survey                                                                                                             |
| **Course Completed**                 | a customer completes a course                                                                                                           |
| **Course: Access Expired**           | a customer's access to a course expires                                                                                                 |
| **Course: Expiration Reminder Sent** | the app sends a course expiration reminder — runs once per reminder; the window itself is set in **Settings** -> **Email notification** |
| **Community: Member Joined**         | a member gets access to a community                                                                                                     |
| **Community: Post Created**          | a member creates a post in a community                                                                                                  |
| **Community: Comment Submitted**     | a member comments on a post                                                                                                             |
| **Community: Reply Submitted**       | a member replies to a comment                                                                                                           |
| **Community: Reaction Added**        | a member reacts to a post or a comment                                                                                                  |
| **Community: Access Expired**        | a member's access to a community ends                                                                                                   |

### The actions LDT adds to Flow

Add a step with **Do this...** and search for *Course* or *Community* again:

* **Course: Grant Access** — gives the customer access to a course you pick in the step.
* **Course: Revoke Access** — takes that access away again.
* **Community: Grant Access** — gives the customer access to a community you pick in the step, optionally only until a date you type.
* **Community: Revoke Access** — takes that access away again.

The actions are what make Flow worth wiring up: a workflow can start on **Course: Access Expired** and use **Course: Grant Access** to give the student another month, start on **Course: Quiz Completed** and grant access to the next course in a series, or start on **Community: Post Created** and email the author.

### Result

Course and community events become Flow triggers, and granting or revoking access becomes a Flow action — so your automations live in Shopify Flow next to the rest of your store's automation, and the app itself stays out of the way.

### Troubleshooting

* **My workflow does not run.** A new workflow starts as a **Draft**. Click **Turn on workflow** in the top right; until then Flow saves it and does nothing.
* **I cannot find the LDT triggers.** The picker lists installed apps: tick **Installed apps**, search *Course* or *Community*, or open the **LDT Courses & Communities** group. If the group is missing, the app is not installed on that store.
* **Nothing fires when I finish a lesson myself.** Preview and admin sessions are not student progress — the app does not record lesson completion there, so **Course: Lesson Completed** cannot fire from your own walkthrough. Use the **Preview** page to read a course, and a real enrolment to test a workflow.
* **The workflow runs but the customer gets nothing.** Check that the action's course or community is the one the trigger fired for; a trigger on course A that grants access to course B is a valid workflow but rarely the one you meant.
* **I want to see what a workflow did.** Open it in Flow and read its run history — the Flow app keeps recent runs in the sidebar under **Recent runs**.

### Related pages

* [How to Grant Free Course Access Using a 100% Discount Code](https://helpdesk.ldtsoft.work/ldt-online-course/enroll-and-price/how-to-grant-free-course-access-using-a-100-discount-code.md)
* [How to Manually Grant Course Access Without Purchasing](https://helpdesk.ldtsoft.work/ldt-online-course/enroll-and-price/how-to-manually-grant-course-access-without-purchasing.md)
* [How to preview a course before publishing](https://helpdesk.ldtsoft.work/ldt-online-course/build-your-course/how-to-preview-a-course-before-publishing.md)
* [How to set up in-app notifications](https://helpdesk.ldtsoft.work/ldt-online-course/emails-and-notifications/how-to-set-up-in-app-notifications.md)
