Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

feat(tally): improve the connection and New Submission step forms (#15396)

Talal Jaberddb68e18ee01
diff --git a/bun.lock b/bun.lock
index 18c874d0cb8..ba264c0f95b 100644
--- a/bun.lock
+++ b/bun.lock
@@ -8854,7 +8854,7 @@
},
"packages/pieces/community/tally": {
"name": "@activepieces/piece-tally",
- "version": "0.6.0",
+ "version": "0.6.1",
"dependencies": {
"@activepieces/core-piece-types": "workspace:*",
"@activepieces/core-utils": "workspace:*",
diff --git a/packages/pieces/community/tally/package.json b/packages/pieces/community/tally/package.json
index dff50780c88..3b44069cae9 100644
--- a/packages/pieces/community/tally/package.json
+++ b/packages/pieces/community/tally/package.json
@@ -1,6 +1,6 @@
{
"name": "@activepieces/piece-tally",
- "version": "0.6.0",
+ "version": "0.6.1",
"main": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",
"scripts": {
diff --git a/packages/pieces/community/tally/src/i18n/translation.json b/packages/pieces/community/tally/src/i18n/translation.json
index ea1f26efcf2..fa2f6d16bf0 100644
--- a/packages/pieces/community/tally/src/i18n/translation.json
+++ b/packages/pieces/community/tally/src/i18n/translation.json
@@ -1,19 +1,121 @@
{
"Receive form submissions from Tally forms": "Receive form submissions from Tally forms",
- "You can obtain API key from [Settings page](https://tally.so/settings/api-keys)": "You can obtain API key from [Settings page](https://tally.so/settings/api-keys)",
+ "To get your API key:\n\n1. Sign in to [Tally](https://tally.so) and open **Settings**.\n2. Go to **API keys** and click **Create API key**.\n3. Copy the key and paste it below.": "To get your API key:\n\n1. Sign in to [Tally](https://tally.so) and open **Settings**.\n2. Go to **API keys** and click **Create API key**.\n3. Copy the key and paste it below.",
+ "List Forms": "List Forms",
+ "Create Form": "Create Form",
+ "Get Form": "Get Form",
+ "Update Form": "Update Form",
+ "Delete Form": "Delete Form",
+ "List Form Questions": "List Form Questions",
+ "List Submissions": "List Submissions",
+ "Get Submission": "Get Submission",
+ "Delete Submission": "Delete Submission",
+ "Get Form Metrics": "Get Form Metrics",
+ "Get Form Visit Analytics": "Get Form Visit Analytics",
+ "Get Form Submission Analytics": "Get Form Submission Analytics",
+ "Get Form Analytics Dimensions": "Get Form Analytics Dimensions",
+ "Get Form Drop-off Analytics": "Get Form Drop-off Analytics",
+ "List Workspaces": "List Workspaces",
+ "Create Workspace": "Create Workspace",
+ "Get Workspace": "Get Workspace",
+ "Rename Workspace": "Rename Workspace",
+ "Delete Workspace": "Delete Workspace",
+ "List Workspace Folders": "List Workspace Folders",
+ "Create Folder": "Create Folder",
+ "Rename Folder": "Rename Folder",
+ "Delete Folder": "Delete Folder",
+ "Get Current User": "Get Current User",
"Custom API Call": "Custom API Call",
+ "List all forms in your Tally account": "List all forms in your Tally account",
+ "Create a new form from a blocks definition": "Create a new form from a blocks definition",
+ "Get a single form by id, including its blocks and settings": "Get a single form by id, including its blocks and settings",
+ "Update a form's name, status, blocks, or settings": "Update a form's name, status, blocks, or settings",
+ "Permanently delete a form": "Permanently delete a form",
+ "List the questions on a form, with their ids and titles": "List the questions on a form, with their ids and titles",
+ "List a form's submissions, with filters for status and date range": "List a form's submissions, with filters for status and date range",
+ "Get a single submission by id": "Get a single submission by id",
+ "Permanently delete a single submission": "Permanently delete a single submission",
+ "Get summary metrics for a form over a time period": "Get summary metrics for a form over a time period",
+ "Get visit counts over time for a form": "Get visit counts over time for a form",
+ "Get completed vs partial submission counts over time for a form": "Get completed vs partial submission counts over time for a form",
+ "Get visitor breakdowns by source, browser, OS, device, and location for a form": "Get visitor breakdowns by source, browser, OS, device, and location for a form",
+ "Get per-question drop-off rates for a form": "Get per-question drop-off rates for a form",
+ "List all workspaces in your Tally account": "List all workspaces in your Tally account",
+ "Create a new workspace": "Create a new workspace",
+ "Get a single workspace by id": "Get a single workspace by id",
+ "Rename a workspace": "Rename a workspace",
+ "Permanently delete a workspace and everything inside it": "Permanently delete a workspace and everything inside it",
+ "List folders inside a workspace": "List folders inside a workspace",
+ "Create a folder inside a workspace": "Create a folder inside a workspace",
+ "Rename a folder": "Rename a folder",
+ "Delete a folder and its subtree, moving contained forms to trash": "Delete a folder and its subtree, moving contained forms to trash",
+ "Get the connected account's profile and subscription plan": "Get the connected account's profile and subscription plan",
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
+ "Page": "Page",
+ "Limit": "Limit",
+ "Blocks": "Blocks",
+ "Status": "Status",
+ "Workspace": "Workspace",
+ "Folder": "Folder",
+ "Template ID": "Template ID",
+ "Settings": "Settings",
+ "Form": "Form",
+ "Name": "Name",
+ "Filter": "Filter",
+ "Start Date": "Start Date",
+ "End Date": "End Date",
+ "After Submission ID": "After Submission ID",
+ "Submission ID": "Submission ID",
+ "Period": "Period",
+ "New Name": "New Name",
"Method": "Method",
"Headers": "Headers",
"Query Parameters": "Query Parameters",
"Body Type": "Body Type",
"Body": "Body",
- "Response is Binary ?": "Response is Binary ?",
- "No Error on Failure": "No Error on Failure",
- "Timeout (in seconds)": "Timeout (in seconds)",
+ "Response is Binary": "Response is Binary",
+ "Return Error as Output": "Return Error as Output",
+ "Timeout": "Timeout",
"Follow redirects": "Follow redirects",
+ "Page number, starting at 1. Defaults to 1.": "Page number, starting at 1. Defaults to 1.",
+ "Number of forms per page (max 500). Defaults to 50.": "Number of forms per page (max 500). Defaults to 50.",
+ "Array of Tally block objects that define the form content and fields (titles, inputs, choices, etc). Fetch an existing form with Get Form to see the exact shape blocks must take.": "Array of Tally block objects that define the form content and fields (titles, inputs, choices, etc). Fetch an existing form with Get Form to see the exact shape blocks must take.",
+ "BLANK has no content yet; DRAFT is editable and not publicly accessible; PUBLISHED is live and accepting submissions.": "BLANK has no content yet; DRAFT is editable and not publicly accessible; PUBLISHED is live and accepting submissions.",
+ "Defaults to your account's default workspace if left empty.": "Defaults to your account's default workspace if left empty.",
+ "Only folders inside the selected workspace are shown.": "Only folders inside the selected workspace are shown.",
+ "Optional Tally template ID to base the form on.": "Optional Tally template ID to base the form on.",
+ "Optional form settings object (language, notifications, redirects, data retention, styling, password protection, etc).": "Optional form settings object (language, notifications, redirects, data retention, styling, password protection, etc).",
+ "Only forms this API key can access are listed.": "Only forms this API key can access are listed.",
+ "Replaces the entire blocks array. Use Get Form first to fetch the current blocks so you can merge your change into the full array rather than dropping the rest of the form content.": "Replaces the entire blocks array. Use Get Form first to fetch the current blocks so you can merge your change into the full array rather than dropping the rest of the form content.",
+ "Replaces the entire settings object. Use Get Form first if you need to preserve other settings.": "Replaces the entire settings object. Use Get Form first if you need to preserve other settings.",
+ "Filter by submission completion status. Defaults to all.": "Filter by submission completion status. Defaults to all.",
+ "ISO 8601 date-time. Include submissions on or after this date.": "ISO 8601 date-time. Include submissions on or after this date.",
+ "ISO 8601 date-time. Include submissions on or before this date.": "ISO 8601 date-time. Include submissions on or before this date.",
+ "Return submissions after this submission id (cursor-style pagination).": "Return submissions after this submission id (cursor-style pagination).",
+ "Submissions per page (max 500). Defaults to 50.": "Submissions per page (max 500). Defaults to 50.",
+ "Obtain from List Submissions or the New Submission trigger payload.": "Obtain from List Submissions or the New Submission trigger payload.",
+ "Obtain from List Submissions or Get Submission.": "Obtain from List Submissions or Get Submission.",
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
+ "Appended to the URL as ?key=value.": "Appended to the URL as ?key=value.",
"Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
+ "On a failed request, output the error instead of failing the step.": "On a failed request, output the error instead of failing the step.",
+ "Seconds to wait for a response. Empty: up to the flow limit (10 min).": "Seconds to wait for a response. Empty: up to the flow limit (10 min).",
+ "Follow 3xx redirects instead of returning them as the response.": "Follow 3xx redirects instead of returning them as the response.",
+ "Blank": "Blank",
+ "Draft": "Draft",
+ "Published": "Published",
+ "All": "All",
+ "Completed": "Completed",
+ "Partial": "Partial",
+ "Today": "Today",
+ "Yesterday": "Yesterday",
+ "Last 24 hours": "Last 24 hours",
+ "Last 7 days": "Last 7 days",
+ "Last 30 days": "Last 30 days",
+ "Last 3 months": "Last 3 months",
+ "Last 6 months": "Last 6 months",
+ "Last 12 months": "Last 12 months",
+ "All time": "All time",
"GET": "GET",
"POST": "POST",
"PATCH": "PATCH",
@@ -25,6 +127,5 @@
"Form Data": "Form Data",
"Raw": "Raw",
"New Submission": "New Submission",
- "Triggers when a form receives a new submission": "Triggers when a form receives a new submission",
- "Form": "Form"
+ "Triggers when someone submits the selected form": "Triggers when someone submits the selected form"
}
\ No newline at end of file
diff --git a/packages/pieces/community/tally/src/index.ts b/packages/pieces/community/tally/src/index.ts
index a8284f0c00f..2f5ffa71715 100644
--- a/packages/pieces/community/tally/src/index.ts
+++ b/packages/pieces/community/tally/src/index.ts
@@ -34,7 +34,7 @@ export const tally = createPiece({
displayName: 'Tally',
description: 'Receive form submissions from Tally forms',
auth: tallyAuth,
- minimumSupportedRelease: '0.86.4',
+ minimumSupportedRelease: '0.88.2',
logoUrl: 'https://cdn.activepieces.com/pieces/tally.png',
categories: [PieceCategory.FORMS_AND_SURVEYS],
authors: ['kishanprmr', 'abuaboud', 'bst1n'],
diff --git a/packages/pieces/community/tally/src/lib/auth.ts b/packages/pieces/community/tally/src/lib/auth.ts
index 165ab1ac5e7..eeb53761079 100644
--- a/packages/pieces/community/tally/src/lib/auth.ts
+++ b/packages/pieces/community/tally/src/lib/auth.ts
@@ -5,8 +5,11 @@ import { tallyApiClient } from './common/client';
export const tallyAuth = PieceAuth.SecretText({
displayName: 'API Key',
- description:
- `You can obtain API key from [Settings page](https://tally.so/settings/api-keys)`,
+ description: `To get your API key:
+
+1. Sign in to [Tally](https://tally.so) and open **Settings**.
+2. Go to **API keys** and click **Create API key**.
+3. Copy the key and paste it below.`,
required: true,
validate: async ({ auth }) => {
const { error } = await tryCatch(() => tallyApiClient.validateApiKey(auth));
diff --git a/packages/pieces/community/tally/src/lib/common/props.ts b/packages/pieces/community/tally/src/lib/common/props.ts
index 668117d3256..0d612efb0d4 100644
--- a/packages/pieces/community/tally/src/lib/common/props.ts
+++ b/packages/pieces/community/tally/src/lib/common/props.ts
@@ -3,6 +3,7 @@ import { tryCatch } from '@activepieces/pieces-framework';
import { tallyAuth } from '../auth';
import { tallyApiClient } from './client';
+import type { TallyForm } from './types';
export const ANALYTICS_PERIOD_OPTIONS = [
{ label: 'Today', value: 'today' },
@@ -19,6 +20,7 @@ export const ANALYTICS_PERIOD_OPTIONS = [
export const formsDropdown = Property.Dropdown<string, true, typeof tallyAuth>({
auth: tallyAuth,
displayName: 'Form',
+ description: 'Only forms this API key can access are listed.',
required: true,
refreshers: [],
async options({ auth }) {
@@ -40,10 +42,20 @@ export const formsDropdown = Property.Dropdown<string, true, typeof tallyAuth>({
};
}
- const options: DropdownOption<string>[] = forms.map((form) => ({
- label: form.name,
- value: form.id,
- }));
+ if (forms.length === 0) {
+ return {
+ disabled: false,
+ options: [],
+ placeholder: 'No forms found. Create one in Tally first.',
+ };
+ }
+
+ const options: DropdownOption<string>[] = forms
+ .map((form) => ({
+ label: formOptionLabel({ form }),
+ value: form.id,
+ }))
+ .sort((a, b) => a.label.localeCompare(b.label));
return { disabled: false, placeholder: 'Select a form', options };
},
@@ -203,3 +215,19 @@ export const requiredFoldersDropdown = Property.Dropdown<string, true, typeof ta
return { disabled: false, placeholder: 'Select a folder', options };
},
});
+
+function formOptionLabel({ form }: { form: TallyForm }): string {
+ const name = form.name?.trim() ?? '';
+ const label = name.length === 0 ? 'Untitled form' : name;
+
+ switch (form.status) {
+ case 'PUBLISHED':
+ return label;
+ case 'DRAFT':
+ return `${label} (Draft)`;
+ case 'BLANK':
+ return `${label} (Blank)`;
+ default:
+ return label;
+ }
+}
diff --git a/packages/pieces/community/tally/src/lib/triggers/new-submission.ts b/packages/pieces/community/tally/src/lib/triggers/new-submission.ts
index ac103780b6b..a7dcdeee31c 100644
--- a/packages/pieces/community/tally/src/lib/triggers/new-submission.ts
+++ b/packages/pieces/community/tally/src/lib/triggers/new-submission.ts
@@ -17,7 +17,7 @@ export const newSubmissionTrigger = createTrigger({
classification: 'READ',
displayName: 'New Submission',
auth: tallyAuth,
- description: 'Triggers when a form receives a new submission',
+ description: 'Triggers when someone submits the selected form',
aiMetadata: {
description:
'Fires when a respondent submits a Tally form, delivering the completed submission. The payload includes the response, submission, and respondent IDs, the form ID and name, the submission timestamp, and a fields map keyed by question label with each answer (choice/checkbox/dropdown/ranking options resolved to their text and matrix answers mapped to row/column labels). Use to react to new form entries such as contact requests, signups, or survey responses.',
@@ -57,10 +57,16 @@ export const newSubmissionTrigger = createTrigger({
}
},
async test(context) {
- const { questions, submissions } = await tallyApiClient.fetchRecentSubmissions({
- apiKey: context.auth.secret_text,
- formId: context.propsValue.form_id,
- });
+ const [{ questions, submissions }, form] = await Promise.all([
+ tallyApiClient.fetchRecentSubmissions({
+ apiKey: context.auth.secret_text,
+ formId: context.propsValue.form_id,
+ }),
+ tallyApiClient.getForm({
+ apiKey: context.auth.secret_text,
+ formId: context.propsValue.form_id,
+ }),
+ ]);
const questionById = Object.fromEntries(questions.map((q) => [q.id, q]));
@@ -69,7 +75,7 @@ export const newSubmissionTrigger = createTrigger({
submissionId: submission.id,
respondentId: submission.respondentId,
formId: submission.formId,
- formName: '',
+ formName: form.name,
createdAt: submission.submittedAt,
fields: buildSubmissionFields({ submission, questionById }),
}));