Skip to content
Smart Templates Manual Website Manual for your AI

Preparing buttons and flows

In short

A button in Dynamics creates a document for the open record; a flow can then carry on, for example file or send the document. With “🖨 Manage buttons in Dynamics” the designer takes you to the command designer of Power Apps, and with “↻ Manage flows” it creates a flow. You add the button itself in the command designer. This page is a checklist: it names what must be in place beforehand and refers to the pages on the steps.

Creating a button

Check beforehand:

Which questions the assistant “Manage buttons in Dynamics” asks is described under Buttons: the assistant. The steps in the command designer, from clicking “🖨 Manage buttons in Dynamics” to publishing, are described under Adding, changing and removing a button: The process at a glance. What the finished button does on click is described under What happens on click.

Good to know

“Send email immediately” needs a recipient, and a limit applies to the number of rows a button shows at once. Where “Send email immediately” takes the recipient from is explained under Buttons: the assistant: Who receives the email?; the limit for the rows is described under What happens on click: The limit of 200 rows.

Creating a flow

Check beforehand:

How to create a flow with “↻ Manage flows”, assign it a connection, add your steps and choose it in the assistant is described step by step under Flows: Manage flows; it also says how long it takes after turning it on until the flow receives jobs. What the created flow already contains is described under Flows: The scaffold of the created flow; the image shows it in Power Automate.

Composite view of a flow in the Power Automate editor, with an English interface. On the left the parameter area of the first step: at the top an arrow with “Back” and the flow name “Smart Templates – Demo-Rechnung (Handbuch)” with the addition “Published”, below it the heading “Wenn Smart Templates einen Beleg anfordert” and the tabs “Parameters” (active), “Settings”, “Code view” and “About”. A red band reports “Invalid connection, please update your connection to load complete details”. The fields follow: “Change type” with the value 1, “Table name” with st_ausloeser, “Scope” with 4, “Select columns” (empty, with gray placeholder text), “Filter rows” with the value st_flowkennung eq 'c1c01ed2-…' (the identifier of the flow) and “Advanced parameters” with “Showing 0 of 2” and the two buttons “Show all” and “Clear all” (the second one gray). At the very bottom it says “Connected to st_flow_mvav7fci.”, next to it the blue link “Change connection reference” and on the right in red “Invalid connection”. On the right, separated by a dashed vertical line, are four cards one below the other, connected by arrows with a plus symbol each: the trigger with a blue outline “Wenn Smart Templates einen Beleg anfordert”, “Beleg erzeugen” and “Hauptdatensatz holen”, all three with the red message “Invalid connection, please update your connection to load complete details”, and finally “Hier Ihre Schritte”.
The created flow in Power Automate, still without a valid connection: on the left the fields of the trigger, on the right the skeleton with its four cards. The two parts were captured separately; the dashed line separates them.
  1. 1The trigger “Wenn Smart Templates einen Beleg anfordert” (when Smart Templates requests a document): You click this card; its fields then appear, on the left in the image.
  2. 2“Beleg erzeugen” (generate document): builds the document as a PDF from the values of the trigger row.
  3. 3“Hauptdatensatz holen” (get main record): fetches the record; the table is entered as a fixed value.
  4. 4“Hier Ihre Schritte” (your steps here): a placeholder with an explanatory text that you replace with your own steps.
  5. 5“Change connection reference”: You click it, choose “Add new” in the next window and sign in (see Flows: The windows “Create a connection” and “First the connection — here is how”).

What happens in the background

The button creates the document and adds a row for the flow to the table “Smart Templates Auslöser”. The flow listens for it and fetches the document itself. Rows that are older than six hours are cleared away by Smart Templates the next time it triggers. For the first flow that anyone creates, the solution “Smart Templates – Flows” (unique name “STFluesse”) is created in the environment, with a connection reference; the flows that the designer creates are stored there.