Skip to content

Commit 7eaf022

Browse files
committed
Merge remote-tracking branch 'upstream/master' into codeqr-new-actions
2 parents 4e2289f + a956e30 commit 7eaf022

File tree

71 files changed

+2216
-76
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+2216
-76
lines changed

components/alttextify/alttextify.app.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ export default {
88
console.log(Object.keys(this.$auth));
99
},
1010
},
11-
};
11+
};

components/amazon_redshift/amazon_redshift.app.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ export default {
88
console.log(Object.keys(this.$auth));
99
},
1010
},
11-
};
11+
};

components/capgo/capgo.app.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ export default {
88
console.log(Object.keys(this.$auth));
99
},
1010
},
11-
};
11+
};

components/codeberg/codeberg.app.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ export default {
88
console.log(Object.keys(this.$auth));
99
},
1010
},
11-
};
11+
};

components/deepsouce/deepsouce.app.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ export default {
88
console.log(Object.keys(this.$auth));
99
},
1010
},
11-
};
11+
};

components/finalscout/finalscout.app.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ export default {
88
console.log(Object.keys(this.$auth));
99
},
1010
},
11-
};
11+
};

components/keboola/keboola.app.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ export default {
88
console.log(Object.keys(this.$auth));
99
},
1010
},
11-
};
11+
};

components/metabase/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

components/metabase/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,23 @@
22

33
The Metabase API opens a gateway to interact with Metabase programmatically, enabling you to automate reporting, dashboards, and data analysis operations. With Pipedream, you can harness this API to trigger workflows, manipulate data, and integrate with various other apps to create a seamless data ecosystem. Think of syncing Metabase insights with other tools, automating report generation, or reacting to events within your Metabase instance in real-time.
44

5+
# Available Actions
6+
7+
This Metabase integration provides the following actions:
8+
9+
- **Run Query** - Execute a saved question/card and return the results
10+
- **Get Dashboard** - Retrieve dashboard information and its cards
11+
- **Create Dashboard** - Create a new dashboard in Metabase
12+
- **Get Database** - Retrieve database information and metadata
13+
514
# Example Use Cases
615

716
- **Automated Reporting**: Use Pipedream to set up scheduled triggers that fetch reports from Metabase and send them via email or Slack. This workflow can help teams stay updated with the latest insights without manual intervention.
817

918
- **Dashboard Sync**: Create a workflow that listens for updates in a specific Metabase dashboard and synchronizes those changes with a Google Sheets document. This allows for easy sharing and collaboration on data insights with stakeholders who prefer working in spreadsheets.
1019

1120
- **Alerting on Metrics**: Set up a Pipedream workflow that monitors specific metrics within Metabase. If certain thresholds are crossed, actions can be taken automatically, like sending alerts through SMS using Twilio or creating a task in project management tools like Trello.
21+
22+
- **Data Pipeline Automation**: Automatically create new cards and dashboards when new data sources are added, or when specific business events occur.
23+
24+
- **Cross-Platform Integration**: Sync Metabase insights with CRM systems, marketing tools, or business intelligence platforms to create a unified view of your data across all systems.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
import app from "../../metabase.app.mjs";
2+
import utils from "../../common/utils.mjs";
3+
4+
export default {
5+
key: "metabase-create-dashboard",
6+
name: "Create Dashboard",
7+
description: "Create a new Dashboard. [See the documentation](https://www.metabase.com/docs/latest/api#tag/apidashboard/post/api/dashboard/).",
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
app,
12+
name: {
13+
type: "string",
14+
label: "Name",
15+
description: "The name of the dashboard",
16+
},
17+
description: {
18+
type: "string",
19+
label: "Description",
20+
description: "Description of the dashboard",
21+
optional: true,
22+
},
23+
collectionId: {
24+
propDefinition: [
25+
app,
26+
"collectionId",
27+
],
28+
optional: true,
29+
},
30+
collectionPosition: {
31+
type: "integer",
32+
label: "Collection Position",
33+
description: "Position within the collection (must be greater than zero)",
34+
min: 1,
35+
optional: true,
36+
},
37+
cacheTtl: {
38+
type: "integer",
39+
label: "Cache TTL",
40+
description: "Cache time-to-live in seconds (must be greater than zero)",
41+
min: 1,
42+
optional: true,
43+
},
44+
parameters: {
45+
type: "string[]",
46+
label: "Parameters",
47+
description: "Array of parameter definition objects.\n\n**Required properties:**\n- `id` (string) - Parameter identifier\n- `type` (string) - Parameter type (e.g., \"date/single\", \"text\", \"category\")\n\n**Optional properties:**\n- `name` (string) - Display name\n- `slug` (string) - URL-friendly identifier\n- `sectionId` (string) - Section grouping\n- `default` - Default value\n- `values_source_type` (enum) - \"static-list\", \"card\", or null\n- `values_source_config` (object) - Dynamic value configuration with `card_id`, `label_field`, `value_field`, `values`\n- `temporal_units` (array) - Time-based parameter units\n\n**Example:** `{\"id\": \"date_param\", \"type\": \"date/single\", \"name\": \"Date Filter\", \"slug\": \"date_filter\", \"default\": \"2024-01-01\"}`",
48+
optional: true,
49+
},
50+
},
51+
async run({ $ }) {
52+
const {
53+
app,
54+
name,
55+
description,
56+
collectionId,
57+
collectionPosition,
58+
cacheTtl,
59+
parameters,
60+
} = this;
61+
62+
const response = await app.createDashboard({
63+
$,
64+
data: {
65+
name,
66+
description,
67+
collection_id: collectionId,
68+
collection_position: collectionPosition,
69+
cache_ttl: cacheTtl,
70+
parameters: utils.parseArray(parameters),
71+
},
72+
});
73+
74+
$.export("$summary", `Successfully created dashboard with ID \`${response?.id}\``);
75+
76+
return response;
77+
},
78+
};

0 commit comments

Comments
 (0)