# How to find/create external alias source

**URL:** <https://community.developer.atlassian.com/t/how-to-find-create-external-alias-source/90875>\
**Category:** Compass\
**Created:** [April 2, 2025, 10:47pm UTC](https://community.developer.atlassian.com/t/how-to-find-create-external-alias-source/90875 "2025-04-02T22:47:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![KarlLivesey](https://avatars.discourse-cdn.com/v4/letter/k/76d3ee/32.png) [@KarlLivesey](https://community.developer.atlassian.com/u/KarlLivesey)\
**Post date:** [April 2, 2025, 10:47pm UTC](https://community.developer.atlassian.com/t/how-to-find-create-external-alias-source/90875/1 "2025-04-02T22:47:15Z")

</div>

I’m trying to use `syncComponentByExternalAlias` to insert a component, since I won’t usually know the local `componentId`.

I’m attempting to sync using 50 different values for `externalSource`, but I keep getting this error:

> `Variable 'externalSource' has an invalid value: Variable 'externalSource' has coerced Null value for NonNull type 'ID!'`

I’ve searched around but can’t find any clear examples of how to _insert_ using this method—only updates, and even those are scarce.

I tried creating a Data Provider with the same name as the one I’m passing in, but that didn’t help. The only mutation I can see is `unlinkExternalSource`, not one to _link_ or create an `externalSource`, which makes me think I may be missing a step or misunderstanding what `externalSource` is meant to refer to.

Here’s the payload I’m passing in:

```auto
return {
    cloudId: cloudId,
    labels: [type, apiVersion].filter(v => v != null),
    name: name,
    type: CompassComponentType.Library,
    externalAlias: {
        externalId: `${type}/${filename}`,
        externalSource: repository, // This is likely the problem line
        url: url,
    },
};

```

Does anyone know:

- What a valid `externalSource` value looks like?
- Whether `syncComponentByExternalAlias` can actually create components from scratch?
- If there’s a way to “link” an external source before syncing?

Any help would be appreciated!
