with BotPenguin and Python?
Adds a new WhatsApp contact to your BotPenguin account. See the documentation
Write Python and use any of the 350k+ PyPi packages available. Refer to the Pipedream Python docs to learn more.
Updates custom attributes for a specific contact in your BotPenguin account.
import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    botpenguin: {
      type: "app",
      app: "botpenguin",
    }
  },
  async run({steps, $}) {
    const data = [
      {
        "profile": {
          "userDetails": {
            "name": "BPTest",
            "contact": {
              "email": "test@example.com",
              "phone": {
                "number": "90123456789",
                "prefix": "91"
              }
            },
            "tags": [],
            "attributes": [],
            "userProvidedName": "BPTest"
          }
        }
      }
    ]
    return await axios($, {
      method: "post",
      url: `https://api.v7.botpenguin.com/inbox/users/import`,
      headers: {
        Authorization: `Bearer ${this.botpenguin.$auth.access_token}`,
        "botid": `${this.botpenguin.$auth.bot_id}`,
        "authtype": `Key`,
      },
      data,
    })
  },
})
Develop, run and deploy your Python code in Pipedream workflows. Integrate seamlessly between no-code steps, with connected accounts, or integrate Data Stores and manipulate files within a workflow
This includes installing PyPI packages, within your code without having to manage a requirements.txt file or running pip.
Below is an example of using Python to access data from the trigger of the workflow, and sharing it with subsequent workflow steps:
def handler(pd: "pipedream"):
  # Reference data from previous steps
  print(pd.steps["trigger"]["context"]["id"])
  # Return data for use in future steps
  return {"foo": {"test":True}}