Generate automation flows with Luna AI
You can generate an automation flow with Luna two ways: ask Luna directly in a chat, or start the Create Automation Flow playbook to be guided through it. Either way, Luna builds the flow from your description and saves it as a draft for you to review before activating.
Before you start
Generating a flow requires the Luna write permission in your organization. You don't need to finish the Luna setup wizard or connect an integration to chat with Luna or start a playbook.
If your organization hasn't started Luna setup, opening the Luna page takes you through the setup wizard first. If setup was skipped, a banner stays on the Luna page until you dismiss it for the current session.
Ask Luna to create a flow in chat
Luna's standard chat tools include flow creation, so a normal conversation is enough to generate a flow. The flow Luna creates is saved as a draft.
Open the Luna page in your Ploy dashboard.
Start a new chat.
Describe the automation you want, for example "create an onboarding flow that provisions access when a new member is added".
Luna builds the flow from your description and saves it in draft status. Keep refining the flow in the same chat until it matches what you need.
Use the Create Automation Flow playbook
For a guided walkthrough, start the Create Automation Flow playbook instead. The playbook's instructions, steps, and tools steer Luna through creating your flow.
Open the Luna page in your Ploy dashboard. The Playbooks tab shows your organization's playbooks.
Select Create Automation Flow to open its detail view. For how playbooks work, see What are Luna playbooks?
Optional: describe the automation you want in the Additional Context field. Luna sends this context as the session's first message.
Optional: set session-scoped tool permissions for the playbook, for example supervised or observer mode. Luna validates the configuration before starting; an invalid configuration stops the session from being created.
Click Start this playbook. The button shows "Starting playbook..." while Luna creates the session.
Starting the playbook opens a playbook session: Luna works through the playbook's instructions and steps using its tools, and saves your automation flow in draft status. You can keep refining the flow in the session chat.
Describe the automation
The clearer your description, the closer Luna gets on the first pass. Whether you describe the flow in a chat or in the Additional Context field before starting the playbook, cover what should trigger the flow, any conditions, and what actions to take:
Trigger: what event should start the flow, for example "when a new member account is discovered".
Conditions: any criteria that must be met before the actions run.
Actions: what should happen, for example "grant access to a resource".
Review the draft flow
Automation flows Luna creates are saved as drafts, so nothing activates until you review it. Before activating, check the flow end to end:
Triggers: the flow starts at the right time.
Logic: conditions and branching make sense.
Actions: each step does what you intended.
Scope: it applies to the right apps, teams, or members.
Test new flows with a narrow scope first, then expand them once they work as expected.
For more on flows, see Introduction to Workflows.
If generation doesn't start
Match the failure below to what you see, then fix it and try again.
"Playbook not found": when you start the automation playbook, Luna looks up the selected playbook by organization and ID. If the lookup fails, no session is created and no flow is generated. Confirm the playbook exists in your organization's playbook list, then start it again.
Asking for a flow name that's already in use: Luna's flow tool errors when a flow with that name already exists and returns the existing flow's ID. Update the existing flow instead, or pick a different name.
You can't start a chat or a playbook: starting sessions with Luna requires the Luna write permission in your organization. Ask an admin to confirm your access.
Setup wizard keeps appearing: when your organization hasn't completed Luna setup, opening the Luna page takes you through the setup wizard first. Choose Handle this later to skip setup and return to the Luna page; a banner stays there until you dismiss it for the current session.