---
title: "How to use URLs in Markdown from a URL macro"
canonical: "https://support.appfire.com/space/MARKDOWN/72385467/How%20to%20use%20URLs%20in%20Markdown%20from%20a%20URL%20macro"
format: markdown
---
> Macro (aura-html)

> ❌ **Deprecation notice (applicable for Markdown from a URL macro):**
> ❌ 
> ❌ <span style="color: #000000">Please note that the </span>*URL user*<span style="color: #000000"> and </span>*URL password*<span style="color: #000000"> parameters are deprecated and will be removed on March 31, 2022. We recommend using</span><span style="color: #000000"> </span>[profiles](https://appfire.atlassian.net/wiki/x/PIRQB#Configuration-Profiles)<span style="color: #000000"> </span><span style="color: #000000">to access your data from remote locations.</span>

<span style="color: #000000">This article discusses the recommended way of how URLs must be used in correlation with profiles in the </span>*<span style="color: #000000">Markdown from a URL</span>*<span style="color: #000000"> macro. </span><span style="color: #000000">This page also contains more information about the URLs that can be given, the order used to process URLs, and finally, how URLs must be used with profiles in the macros.</span>

<span style="color: #000000">You can connect to an external application or location through a URL and display relevant Markdown content on your pages. For this purpose, the macro allows you to use profiles and URLs to specify the complete path to access the required application data. </span><span style="color: #000000">The best practice is to specify both, profile and a relative path, in macro configuration. This way, you can access multiple locations through the same profile, and render Markdown content on your pages. </span>

> ℹ️ <span style="color: #000000">Contact your Confluence administrator t</span><span style="color: #000000">o know which profiles are available in your instance.</span>

<span style="color: #000000">Click any of the links to know more:</span>

- [<span style="color: #000000">Types of URLs used in macros</span>](#HowtouseURLsinMarkdownfromaURLmacro-md_URLTypes)
- [<span style="color: #000000">Precendence in URL processing</span>](#HowtouseURLsinMarkdownfromaURLmacro-md_URLPrecedence)
- [<span style="color: #000000">Importance of URLs with respect to profiles</span>](#HowtouseURLsinMarkdownfromaURLmacro-md_URLPriorities)
- [<span style="color: #000000">How it all works</span>](#HowtouseURLsinMarkdownfromaURLmacro-md_tutl_URL_howitworks)
- [<span style="color: #000000">Additional links</span>](#HowtouseURLsinMarkdownfromaURLmacro-md_tutorials_URLProfiles_AddlLinks)

# > Macro (anchor)

<span style="color: #000000">URLs in macros</span>

<span style="color: #000000">First, it is important to understand how the macro processes profiles and URLs. A URL provided in a macro can be:</span>

- <span style="color: #000000">an absolute URL that can be used to access the relevant Markdown file,</span>
- <span style="color: #000000">a relative path to the actual location of the file to be rendered, or</span>
- <span style="color: #000000">an application link (a link between Confluence and an external application such as Bitbucket, GitLab, or GitHub).</span>

## > Macro (anchor)

<span style="color: #000000">Precedence in URL processing</span>

<span style="color: #000000">URLs given in the macros are processed in the following order as explained:</span>

| <span style="color: #000000">**Priority given**</span> | <span style="color: #000000">**URL type**</span> | <span style="color: #000000">**Description**</span> |
| --- | --- | --- |
| <span style="color: #000000">1</span> | <span style="color: #000000">Application links</span> | <span style="color: #000000">If the given URL is linked to a specific application like Bitbucket, GitLab, or GitLab, the macro does not require any user credentials, and processes and renders the given file. Refer to</span> [this article](https://appfire.atlassian.net/wiki/x/LYdQB) <span style="color: #000000">for information about application links.</span> |
| <span style="color: #000000">2</span> | <span style="color: #000000">Profiles</span> | <span style="color: #000000">If</span><span style="color: #000000"> </span>*<span style="color: #000000">Profile</span>*<span style="color: #000000"> </span><span style="color: #000000">is specified, the macro appends the URL given here with the URL specified in the profile configuration, and accesses the location to render the required file.</span> |
| <span style="color: #000000">3</span> | <span style="color: #000000">Simple URLs</span> | <span style="color: #000000">Lastly, if no application links or profiles were given, the URLs are processed as-is and the required file is rendered.</span> |

# > Macro (anchor)

<span style="color: #000000">Importance of URLs with respect to profiles</span>

<span style="color: #000000">The correlation between URLs and profiles with respect to the macro can be explained as:</span>

| <span style="color: #000000">**Is **</span>*<span style="color: #000000">**Profile**</span>*<span style="color: #000000">** given?**</span><br><span style="color: #000000">**(Y - **</span>**<span style="color: #000000">Yes</span>**<span style="color: #000000">**, N - No)**</span> | <span style="color: #000000">**Is **</span>*<span style="color: #000000">**URL to markdown file**</span>*<span style="color: #000000">** given?**</span><br><span style="color: #000000">**(Y - Yes, N - No)**</span> | <span style="color: #000000">**Macro behavior**</span> |
| --- | --- | --- |
| <span style="color: #000000">Y</span> | <span style="color: #000000">N</span> | <span style="color: #000000">Accesses the URL specified in the profile through the pre-configured information.</span> |
| <span style="color: #000000">N</span> | <span style="color: #000000">Y</span> | <span style="color: #000000">Accesses the URL specified and renders the Markdown content as required.</span> |
| <span style="color: #000000">Y</span> | <span style="color: #000000">Y</span> | <span style="color: #000000">Appends the URL mentioned in the </span>*<span style="color: #000000">URL to markdown file</span>*<span style="color: #000000"> parameter to the URL configured in the profile. Thus, the macro creates an </span><span style="color: #000000">absolute</span><span style="color: #000000"> path to the Markdown file. If this path is not valid, a network error message is displayed. To resolve this issue, contact your Confluence administrator for more information.</span> |

# > Macro (anchor)

<span style="color: #000000">How it all works</span>

## <span style="color: #000000">Profile configuration</span>

<span style="color: #000000">For this example, let’s assume the profile has the following values specified:</span>

![image](media://76177140-df5e-406d-a6ff-2a5bd16a6045)

> ⚠️ - <span style="color: #000000">Here, the profile is to be linked with GitLab and the </span><span style="color: #000000">base </span><span style="color: #000000">URL of the application is taken</span><span style="color: #000000"> </span><span style="color: #000000">automatically in the </span>*<span style="color: #000000">URL</span>*<span style="color: #000000"> field. This URL is editable and can be changed according to your requirement.</span>
> ⚠️ - <span style="color: #000000">In the given screenshot, an </span>*<span style="color: #000000">Access token</span>*<span style="color: #000000"> is provided whereas the </span>*<span style="color: #000000">User</span>*<span style="color: #000000"> and </span>*<span style="color: #000000">Password</span>*<span style="color: #000000"> parameters are left empty. This is because the access token works almost like a direct link to the specified URL and thus, does not require user credentials. See the </span>[<span style="color: #000000">profile configuration</span>](https://appfire.atlassian.net/wiki/x/PIRQB#Configuration-md_configProfiles)<span style="color: #000000"> documentation for more information about access tokens.</span>
> ⚠️ - <span style="color: #000000">See the</span> [<span style="color: #000000">Additional links</span>](#HowtouseURLsinMarkdownfromaURLmacro-md_tutorials_URLProfiles_AddlLinks)<span style="color: #000000"> section for more information about profile creation. </span>

## <span style="color: #000000">Macro editor settings</span>

1. <span style="color: #000000">Create or edit a page, add the </span><span style="color: #000000">*Markdown from a URL*</span><span style="color: #000000"> macro, and edit it to open the macro editor.</span>
2. <span style="color: #000000">Select the relevant profile in </span>*<span style="color: #000000">Profile</span>*<span style="color: #000000">.</span>
3. <span style="color: #000000">Enter a relative path (partial URL) </span><span style="color: #000000">to access the required file</span><span style="color: #000000"> in </span><span style="color: #000000">*URL to markdown file*</span><span style="color: #000000">.</span>
4. <span style="color: #000000">Save the macro and publish the page to see the content.</span>

> ℹ️ **Points to remember:**
> ℹ️ 
> ℹ️ - <span style="color: #000000">Profiles are a means to access and retrieve contents from external applications such as GitHub, GitLab, and so on.</span>
> ℹ️ - <span style="color: #000000">A profile already contains the base URL and the required credentials </span><span style="color: #000000">(user credentials or an access token)</span><span style="color: #000000"> to access the relevant application.</span>
> ℹ️ - <span style="color: #000000">If you specify a profile in the macro editor, enter a </span>*<span style="color: #000000">relative</span>*<span style="color: #000000"> path in </span>*<span style="color: #000000">URL to markdown file</span>*<span style="color: #000000"> to access the required file(s).</span>
> ℹ️ - <span style="color: #000000">You must</span><span style="color: #000000"> </span><span style="color: #000000">specify a profile or a URL in the macro editor.</span>
> ℹ️ - <span style="color: #000000">If you specify an absolute URL in </span>*<span style="color: #000000">URL to markdown file</span>*<span style="color: #000000">, the macro </span><span style="color: #000000">can directly </span><span style="color: #000000">access the Markdown content in the specified path.</span>

# > Macro (anchor)

<span style="color: #000000">Additional links</span>

- [<span style="color: #000000">Add a GitHub profile</span>](https://appfire.atlassian.net/wiki/x/7IJQB)
- [<span style="color: #000000">Add a GitLab profile</span>](https://appfire.atlassian.net/wiki/x/KoNQB)
- [<span style="color: #000000">Create a profile with URL</span>](https://appfire.atlassian.net/wiki/x/BodQB)
- [<span style="color: #000000">Markdown from a URL macro</span>](https://appfire.atlassian.net/wiki/x/KIFQB)
- [<span style="color: #000000">Profile configuration</span>](https://appfire.atlassian.net/wiki/x/PIRQB#Configuration-md_configProfiles)