I’m trying to implement an integration, and I’m stuck on the Connection label (meaning, it doesn’t show up necessary information).
I’d like to extract data from JWT token I receive from OAuth provider and use it as the Connection label, but I found no documentation on this subject. Is it actually possible?
I think, requesting user additional information, in order to put it into the label, is clumsy, especially when we have params in tokens.
Best regards,
Alexander Mustafin
Best answer by ikbelkirasan
@sashker - Assuming the token is stored in authData.access_token and the connection label is set to {{username}} , try using the code snippet below in the authentication test function to parse the JWT token:
const userData = parseJwt(bundle.authData["access_token"]) // Assuming the token is stored in `access_token`. Calling this function would parse the token
@sashker - Assuming the token is stored in authData.access_token and the connection label is set to {{username}} , try using the code snippet below in the authentication test function to parse the JWT token:
const userData = parseJwt(bundle.authData["access_token"]) // Assuming the token is stored in `access_token`. Calling this function would parse the token
return { username: userData.username }
Early access
Next Gen Zaps
Build and deploy automations from AI tools you already use. With Agentic Management, if anything breaks, the agent diagnoses the issue and proposes a fix.