Hi,
We have a Forge app and would like to use graph:smartLink as defined there: https://developer.atlassian.com/platform/forge/manifest-reference/modules/teamwork-graph-smart-link/
- When I paste the URL in Confluence, it doesn’t transform into a smart link.
- Even if I click “Display as card”, it doesn’t call our function (no visible invocation in the Forge Tunnel),
- In “Manage apps” → the app → “Connections” → Teamwork Graphs connectors, it doesn’t display the app.
It’s as-if the manifest is not properly recorded. Can anyone tell what I am missing?
- I’m sure I’ve executed “forge deploy” then “forge tunnel” before each experiment,
- I’m sure other Forge functions are executed, since, when we export in PDF, we see our adfExporter invocation (“invocation: 36f0ffd7e42faf5bf07f9b02e95cca40 index.exportDefinitionMacro”),
- No message in the
https://developer.atlassian.com/console, and no warning either inforge deploywhich returns✔ Deployed, - Do we need to list the domain name
example-hello-world.comin some kind of approved networking list, remotes, permission declaration, elsewhere in the manifest than thegraph:smartLink? - Do we need to declare the function as async?
For reference, here’s our manifest.yml:
modules:
graph:smartLink:
- key: sl-test-example-hello-world
icon: https://static.example-hello-world.com/favicon.ico
name: sl-test
function: getEntityByUrl
domains:
- example-hello-world.com
- www.example-hello-world.com
subdomains: true
patterns:
- https:\/\/example-hello-world.com\/123456
- https:\/\/([\w\.-]+\.)?example-hello-world\.com\/([0-9a-zA-Z]{4,128})(?:\/.*)?$
function:
- key: getEntityByUrl
handler: index.myForgeFunction
Then in src/index.ts:
export { myForgeFunction } from "./backend/functions/myForgeFunction";
Then in src/backend/functions/myForgeFunction.ts:
export const myForgeFunction = (payload: SmartLinkPayload): SmartLinkRendering => {
console.error("Displaying a smart link2");
console.error(JSON.stringify(payload));
return {
entities: [
{
identifier: {
url: "https://example-hello-world.com/123456",
... the rest is like the example
https://developer.atlassian.com/platform/forge/build-a-smart-link-app/
Thank you!