diff --git a/packages/builder/src/components/userInterface/BindableInput.svelte b/packages/builder/src/components/userInterface/BindableInput.svelte
new file mode 100644
index 0000000000..bbe544c318
--- /dev/null
+++ b/packages/builder/src/components/userInterface/BindableInput.svelte
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
diff --git a/packages/builder/src/components/userInterface/GenericBindingPopover.svelte b/packages/builder/src/components/userInterface/GenericBindingPopover.svelte
new file mode 100644
index 0000000000..73b529a90d
--- /dev/null
+++ b/packages/builder/src/components/userInterface/GenericBindingPopover.svelte
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+ {#each categories as [categoryName, bindings]}
+
+ {#each bindings as binding}
+
onClickBinding(binding)}>
+
{binding.label}
+
{binding.type}
+
+
{binding.description}
+
+ {/each}
+ {/each}
+
+
+
+
+
+
+ Binding connects one piece of data to another and makes it dynamic.
+ Click the objects on the left to add them to the textbox.
+
+
+
+
+
+
+
+
diff --git a/packages/builder/src/components/workflow/SetupPanel/WorkflowBlockSetup.svelte b/packages/builder/src/components/workflow/SetupPanel/WorkflowBlockSetup.svelte
index ea11199c69..dd8fa2811d 100644
--- a/packages/builder/src/components/workflow/SetupPanel/WorkflowBlockSetup.svelte
+++ b/packages/builder/src/components/workflow/SetupPanel/WorkflowBlockSetup.svelte
@@ -2,9 +2,37 @@
import ModelSelector from "./ParamInputs/ModelSelector.svelte"
import RecordSelector from "./ParamInputs/RecordSelector.svelte"
import { Input, TextArea, Select, Label } from "@budibase/bbui"
+ import { workflowStore } from "builderStore"
+ import BindableInput from "../../userInterface/BindableInput.svelte"
export let block
$: inputs = Object.entries(block.schema?.inputs?.properties || {})
+ $: availableBindings = getAvailableBindings(
+ block,
+ $workflowStore.selectedWorkflow?.workflow?.definition
+ )
+
+ function getAvailableBindings(block, workflow) {
+ if (!block || !workflow) {
+ return []
+ }
+ const allSteps = [workflow.trigger, ...workflow.steps]
+ const blockIdx = allSteps.findIndex(step => step.id === block.id)
+ let bindings = []
+ for (let idx = 0; idx < blockIdx; idx++) {
+ const outputs = Object.entries(allSteps[idx].schema?.outputs?.properties)
+ bindings = bindings.concat(
+ outputs.map(([name, value]) => ({
+ label: name,
+ type: value.type,
+ description: value.description,
+ category: idx === 0 ? "Trigger outputs" : `Step ${idx} outputs`,
+ path: idx === 0 ? `trigger.${name}` : `blocks.${idx}.${name}`,
+ }))
+ )
+ }
+ return bindings
+ }
@@ -12,7 +40,7 @@
{#each inputs as [key, value]}
{/each}