How to find "OAuth2 - Authorization Code" action in Pipedream workflow for App Configuration?

This topic was automatically generated from Slack. You can find the original thread here.

GPT is hallucinating when it tells me this right?

“Fill in the required fields under “App Configuration”. For the “Valid OAuth Redirect URIs” field, you’ll need to provide a redirect URI from Pipedream. To get the redirect URI, go to your Pipedream workflow and add the “OAuth2 - Authorization Code” action.”

There is no “OAuth2 - Authorization Code” action that I can find.

yes

it is hallucinating

Marvelous :rolling_on_the_floor_laughing:

I was just talking to someone else about this, but we’re working on a chat bot specific to Pipedream: Slack

what’s the use case you’re trying to solve here?

Building insta access that we discussed last night. The pipedream “build comopnent/GPT” feature gave me:

[edit: Apologies, it was I was talking to about it last night]

"First, you’ll need to create a Pipedream app for Instagram and Shopify. Here’s the code for the Instagram and Shopify apps:

javascript
// Instagram App
export default defineApp({
  type: "app",
  app: "instagram",
  propDefinitions: {
    accessToken: {
      type: "string",
      secret: true,
      label: "Access Token",
      description: "Your Instagram access token.",
    },
  },
  methods: {
    async postImage(imageUrl, caption) {
      return await axios(this, {
        method: "POST",
        url: "https://graph.instagram.com/me/media",
        params: {
          image_url: imageUrl,
          caption,
          access_token: this.accessToken,
        },
      });
    },
  },
});

// Shopify App
export default defineApp({
  type: "app",
  app: "shopify",
  propDefinitions: {
    apiKey: {
      type: "string",
      secret: true,
      label: "API Key",
      description: "Your Shopify API key.",
    },
    apiSecret: {
      type: "string",
      secret: true,
      label: "API Secret",
      description: "Your Shopify API secret.",
    },
    storeDomain: {
      type: "string",
      label: "Store Domain",
      description: "Your Shopify store domain (e.g., [mystore.myshopify.com](http://mystore.myshopify.com)).",
    },
  },
  methods: {
    async getNewReleases() {
      const url = `https://${this.storeDomain}/admin/api/2022-01/products.json`;
      const auth = {
        username: this.apiKey,
        password: this.apiSecret,
      };
      const response = await axios(this, {
        method: "GET",
        url,
        auth,
      });
      return response.products;
    },
  },
});

Now, create a Pipedream component that uses the Instagram and Shopify apps to post images from new releases in your Shopify store:

javascript
import { axios } from "@pipedream/platform";

export default defineComponent({
  props: {
    instagram: {
      type: "app",
      app: "instagram",
    },
    shopify: {
      type: "app",
      app: "shopify",
    },
  },
  async run({ $ }) {
    const newReleases = await this.shopify.getNewReleases();

    for (const product of newReleases) {
      const imageUrl = product.images[0]?.src;
      const caption = `New release: ${product.title} - ${product.vendor}`;

      if (imageUrl) {
        await this.instagram.postImage(imageUrl, caption);
      }
    }
  },
});

This component will fetch new releases from your Shopify store and post the images with a caption to your Instagram account. Note that you’ll need to provide the Instagram access token and Shopify API credentials when configuring the component in Pipedream."

So I fed that back in to standard GPT and thats when it started hallucinating about adding “OAuth2 - Authorization Code” actions

were y’all discussing a custom Shopify OAuth app?

Sorry, no, to clarify it was about getting Instagram API access. The shopify end works fine. The app builder was returning unneeded info there.

Yea we were talking about Instagram app, which is on our radar! Need to jump through some approval hoops