diff --git a/apps/sim/tools/confluence/create_page.ts b/apps/sim/tools/confluence/create_page.ts index 0ed02f283aa..0a3d3c435a7 100644 --- a/apps/sim/tools/confluence/create_page.ts +++ b/apps/sim/tools/confluence/create_page.ts @@ -109,7 +109,7 @@ export const confluenceCreatePageTool: InternalToolConfig< * picks the space's homepage); its id is a placeholder. */ dryRunOutput: (params) => { - const spaceId = params.spaceId.trim() + const spaceId = String(params.spaceId).trim() return { pageId: dryRunId('page'), title: params.title, diff --git a/apps/sim/tools/dry-run.test.ts b/apps/sim/tools/dry-run.test.ts index 2879bc6e6b7..bb2c5c990c2 100644 --- a/apps/sim/tools/dry-run.test.ts +++ b/apps/sim/tools/dry-run.test.ts @@ -219,6 +219,18 @@ describe('a dry run’s placeholder for an unsent write', () => { expect(returned).toMatchObject({ data: { chat: { id: -1001234 } } }) }) + it('echoes a Confluence space named by a numeric id given as a number', async () => { + const returned = await placeholderFor('confluence_create_page', { + accessToken: SECRET, + domain: 'acme.atlassian.net', + spaceId: 12345, + title: 'Notes', + content: '

x

', + }) + + expect(returned.spaceId).toBe('12345') + }) + it('samples a file list a placeholder cannot hold as empty', async () => { const returned = await placeholderFor('slack_message', { accessToken: SECRET,