This topic was automatically generated from Slack. You can find the original thread here.
I have a workflow that includes a HighLevel OAuth step. Is there a way to select which account I want to connect to and pass that from a previous step in the workflow?
To select a specific HighLevel account to connect to and pass that information from a previous step in the workflow, you would typically use the options method within a prop in your Pipedream component. This method can dynamically generate the options for a prop based on the output of previous steps. However, since I don’t have access to live data or the ability to browse external content, and there is no specific documentation provided in the prompt regarding HighLevel OAuth or selecting accounts dynamically, I cannot provide a precise code example or confirm the exact process for HighLevel. If HighLevel supports OAuth and account selection via API, you could potentially use an options method to list the accounts and then use a prop to allow the user to select the account. The selected account could then be used in the OAuth step. Here’s a general example of how you might structure the options method within a Pipedream component to dynamically generate options: export default defineComponent({ props: { highlevel_account: { type: "string", label: "HighLevel Account", description: "Select the HighLevel account you want to connect to", async options({ steps }) { // You would replace this with an API call to HighLevel to fetch the accounts // The API call would use authentication details from a previous step const accounts = await someApiCallToFetchHighLevelAccounts(steps.previousStep.auth); return accounts.map(account => ({ label: account.name, value: account.id, })); }, }, }, async run({ steps, $ }) { // Use the selected HighLevel account in your OAuth step const selectedAccountId = this.highlevel_account; // ... rest of your code to use the selected account }, }); In this example, someApiCallToFetchHighLevelAccounts is a placeholder for the actual API call you would make to HighLevel to retrieve the list of accounts. The steps.previousStep.auth is a placeholder for how you might access authentication details from a previous step in your workflow. If you need further assistance with this, or if HighLevel has specific requirements for account selection during OAuth that are not covered here, please visit Pipedream Support for more help.
I’m trying to create an API essentially instead of a single account workflow.
I’d like to catch a webhook and then reference my airtable to pull in the relevant client information. I’d like to use that client information for all of steps that follow in the workflow, but when I get to the HighLevel step using OAuth, ,I’m trying to figure out how to pass through a value from my database that will map to the HighLevel step.