← Asana + SWAPI - Star Wars integrations

Get Film with SWAPI - Star Wars API on New Tag Added To Task (Instant) from Asana API

Pipedream makes it easy to connect APIs for SWAPI - Star Wars, Asana and 1200+ other apps remarkably fast.

Trigger workflow on
New Tag Added To Task (Instant) from the Asana API
Next, do this
Get Film with the SWAPI - Star Wars API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜

Trusted by 500,000+ developers from startups to Fortune 500 companies

Adyen logo
Brex logo
Carta logo
Checkr logo
Chameleon logo
DevRev logo
LinkedIn logo
Netflix logo
New Relic logo
OnDeck logo
Replicated logo
Scale AI logo
Teamwork logo
Warner Bros. logo
Xendit logo

Developers Pipedream

Getting Started

This integration creates a workflow with a Asana trigger and SWAPI - Star Wars action. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Select this integration
  2. Configure the New Tag Added To Task (Instant) trigger
    1. Connect your Asana account
    2. Optional- Select a Workspace
    3. Select a Project
    4. Optional- Select one or more Tasks
  3. Configure the Get Film action
    1. Connect your SWAPI - Star Wars account
    2. Select a film
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger

Details

This integration uses pre-built, source-available components from Pipedream's GitHub repo. These components are developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Trigger

Description:Emit new event for each new tag added to a task.
Version:0.1.2
Key:asana-tag-added-to-task

Asana Overview

Using the Asana API, you can build software that integrates with Asana to help
your team track their work. For example, you could build a tool to help your
team plan their work for the week, or a reporting tool to help you track
progress on a project.

Trigger Code

import common from "../common/common.mjs";
const { asana } = common.props;

export default {
  ...common,
  key: "asana-tag-added-to-task",
  type: "source",
  name: "New Tag Added To Task (Instant)",
  description: "Emit new event for each new tag added to a task.",
  version: "0.1.2",
  dedupe: "unique",
  props: {
    ...common.props,
    project: {
      label: "Project",
      description: "Gid of a project.",
      type: "string",
      propDefinition: [
        asana,
        "projects",
        (c) => ({
          workspace: c.workspace,
        }),
      ],
    },
    tasks: {
      optional: true,
      propDefinition: [
        asana,
        "tasks",
        (c) => ({
          project: c.project,
        }),
      ],
    },
  },
  methods: {
    ...common.methods,
    getWebhookFilter() {
      return {
        filters: [
          {
            action: "added",
            resource_type: "task",
          },
        ],
        resource: this.project,
      };
    },
    async emitEvent(event) {
      const { tasks } = this;
      const { events = [] } = event.body || {};

      const promises = events
        .filter(({ resource }) => {
          return tasks?.length
            ? tasks.includes(String(resource.gid))
            : true;
        })
        .map(async (event) => ({
          event,
          task: await this.asana.getTask(event.resource.gid),
          tag: await this.asana.getTag(event.parent.gid),
        }));

      const responses = await Promise.all(promises);

      responses.forEach(({
        event, task, tag,
      }) => {
        const ts = Date.parse(event.created_at);
        this.$emit(tag, {
          id: `${tag.gid}-${ts}`,
          summary: `${tag.name} added to ${task.name}`,
          ts,
        });
      });
    },
  },
};

Trigger Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
AsanaasanaappThis component uses the Asana app.
N/Adb$.service.dbThis component uses $.service.db to maintain state between executions.
N/Ahttp$.interface.httpThis component uses $.interface.http to generate a unique URL when the component is first instantiated. Each request to the URL will trigger the run() method of the component.
WorkspaceworkspacestringSelect a value from the drop down menu.
ProjectprojectstringSelect a value from the drop down menu.
Taskstasksstring[]Select a value from the drop down menu.

Trigger Authentication

Asana uses OAuth authentication. When you connect your Asana account, Pipedream will open a popup window where you can sign into Asana and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Asana API.

Pipedream requests the following authorization scopes when you connect your account:

About Asana

Manage your team's work, projects, & tasks online

Action

Description:Get a film
Version:0.0.13
Key:swapi-get-film

SWAPI - Star Wars Overview

The SWAPI (Star Wars API) provides a wealth of data about the Star Wars
universe to build applications. With the SWAPI, developers can access detailed
Star Wars related data about people, planets, films, species and much more.
From web and mobile applications to data analysis, the possibilities are
limitless.

Here are a few examples of what developers can build using the SWAPI:

  • Create a Star Wars encyclopedia to document the Star Wars universe and its
    characters.
  • Design a custom interactive map to explore the planets of the Star Wars
    universe.
  • Analyze the data to uncover patterns and insights about Star Wars films,
    characters, and species.
  • Design a search engine to query Star Wars related data.
  • Create a mobile app that displays information about the characters, films and
    species in the Star Wars universe.
  • Design a live score system specialized in providing stats related to the Star
    Wars films and characters.

Action Code

const swapi = require("../../swapi.app.js");
const axios = require("axios");

module.exports = {
  key: "swapi-get-film",
  name: "Get Film",
  version: "0.0.13",
  description: "Get a film",
  type: "action",
  props: {
    swapi,
    film: {
      propDefinition: [
        swapi,
        "film",
      ],
    },
  },
  async run() {
    return (await axios({
      url: `https://swapi.dev/api/films/${this.film}`,
    })).data;
  },
};

Action Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI.

LabelPropTypeDescription
SWAPI - Star WarsswapiappThis component uses the SWAPI - Star Wars app.
filmfilmstringSelect a value from the drop down menu.

Action Authentication

The SWAPI - Star Wars API does not require authentication.

About SWAPI - Star Wars

The Star Wars API

More Ways to Connect SWAPI - Star Wars + Asana

Get Film with SWAPI API on Team Added To Organization from Asana API
Asana + SWAPI - Star Wars
 
Try it
Get Film with SWAPI API on Story Added To Project (Instant) from Asana API
Asana + SWAPI - Star Wars
 
Try it
Get Film with SWAPI API on Workspace Added from Asana API
Asana + SWAPI - Star Wars
 
Try it
Get Film with SWAPI API on Task Added To Project (Instant) from Asana API
Asana + SWAPI - Star Wars
 
Try it
Get Film with SWAPI API on Project Added To Workspace (Instant) from Asana API
Asana + SWAPI - Star Wars
 
Try it
New Project Added To Workspace (Instant) from the Asana API

Emit new event for each new project added to a workspace.

 
Try it
Task Added To Project (Instant) from the Asana API

Emits an event for each new task added to a project.

 
Try it
New Story Added To Project (Instant) from the Asana API

Emit new event for each story added to a project.

 
Try it
New Subtask (Instant) from the Asana API

Emit new event for each subtask added to a project.

 
Try it
Task Completed (Instant) from the Asana API

Emits an event for each task completed in a project.

 
Try it
Add Task To Section with the Asana API

Add a task to a specific, existing section. This will remove the task from other sections of the project. See the docs here

 
Try it
Create Project with the Asana API

Create a new project in a workspace or team. See the docs here

 
Try it
Create Subtask with the Asana API

Creates a new subtask and adds it to the parent task. See the docs here

 
Try it
Create Task with the Asana API

Creates a new task. See the docs here

 
Try it
Create Task Comment with the Asana API

Adds a comment to a task. See the docs here

 
Try it

Explore Other Apps

1
-
12
of
1200+
apps by most popular

HTTP / Webhook
HTTP / Webhook
Get a unique URL where you can send HTTP or webhook requests
Node
Node
Anything you can do with Node.js, you can do in a Pipedream workflow. This includes using most of npm's 400,000+ packages.
Beta
Python
Python
Anything you can do in Python can be done in a Pipedream Workflow. This includes using any of the 350,000+ PyPi packages available in your Python powered workflows.
Schedule
Schedule
Trigger workflows on an interval or cron schedule.
Beta
Data Stores
Data Stores
Use Pipedream Data Stores to manage state throughout your workflows.
Telegram Bot
Telegram Bot
Telegram is a cloud-based instant messaging and voice over IP service
OpenAI (ChatGPT)
OpenAI (ChatGPT)
OpenAI is an AI research and deployment company with the mission to ensure that artificial general intelligence benefits all of humanity. They are the makers of popular apps like ChatGPT and DALL·E 2.
Google Sheets
Google Sheets
With Google Sheets, you can create, edit, and collaborate wherever you are
Discord
Discord
Use this app to create a Discord source that emits messages from your guild to a Pipedream workflow.
GitHub
GitHub
Where the world builds software. Millions of developers and companies build, ship, and maintain their software on GitHub—the largest and most advanced development platform in the world.
Formatting
Formatting
Pre-built actions to make formatting and manipulating data within your workflows easier.
Slack
Slack
Slack is a channel-based messaging platform. With Slack, people can work together more effectively, connect all their software tools and services, and find the information they need to do their best work — all within a secure, enterprise-grade environment.