Skip to content

Instantly share code, notes, and snippets.

@koltsov-iv
Created July 2, 2026 11:21
Show Gist options
  • Select an option

  • Save koltsov-iv/f65532fbaf3a83dbc0e5f8afddb16bf8 to your computer and use it in GitHub Desktop.

Select an option

Save koltsov-iv/f65532fbaf3a83dbc0e5f8afddb16bf8 to your computer and use it in GitHub Desktop.
Spain Immigration Skill — Protección Temporal to Autónomo (Ukrainian guide)

Eligibility Check

Ask the user these 4 questions before proceeding:

Questions

  1. Do you hold Protección Temporal para Desplazados de Ucrania?

    • Yes → continue
    • No → this guide does not apply
  2. Have you been living in Spain under this protection for at least 1 year?

    • Yes → continue
    • No → wait until you reach 1 year, then apply
  3. Are you registered as autónomo?

    • Yes (have Alta RETA + Modelo 036) → continue
    • Not yet → they must register first:
      • Step A: Agencia Tributaria → Modelo 036 (declaración censal, register economic activity)
      • Step B: Seguridad Social → Alta en RETA (Régimen Especial de Trabajadores Autónomos)
      • RETA costs ~€200/month (reduced tarifa plana €80/month for first 2 years)
      • Come back once registered
  4. Do you have a digital certificate installed?

    • Yes → continue
    • No → see digital-certificate.md — needed for Volante and Vida Laboral online

If all 4 are YES → Eligible ✅

Proceed to 02-documents.md.

Timeline requirement detail

The "1 year" is counted from the date your Protección Temporal was first granted (visible on the TIE card — field "Expedido el" or the validity start).

Example: TIE issued 25/02/2025 → eligible from 25/02/2026 onwards.

Document Checklist

Go through each item with the user. For each missing document, help them get it.

Checklist

# Document Status How to get
1 EX-26 form (filled + signed) See 03-ex26-form.md
2 Passport copy (main page) Photocopy
3 TIE card copy — both sides Photocopy current Protección Temporal TIE
4 Volante de Empadronamiento See volante-empadronamiento.md
5 Informe de Vida Laboral See vida-laboral.md
6 Alta RETA certificate From Seguridad Social — document received when registering
7 Modelo 036 Copy of tax registration with Agencia Tributaria
8 Modelos 130 / 303 Quarterly income tax and VAT filings
9 Work contract or consulting agreement See notes below
10 Bank statements See notes below
11 Cover letter in Spanish See 04-cover-letter.md

Important notes

No Renta yet?

Quarterly filings Modelo 130 (income tax installment) and Modelo 303 (VAT) are accepted as proof of economic activity. Annual Renta (Modelo 100) is NOT required.

Work contract — foreign client

If you work for a foreign company (non-Spanish):

  • A consulting/services contract is sufficient
  • The contract does NOT need a Spanish NIF or employer details
  • Leave Section 2 (Datos del empleador) of EX-26 completely blank

Bank statements

  • Cover at least 3 months of regular income
  • 6 months is better
  • Both EUR and foreign currency accounts are accepted
  • Show regular transfers from your client/employer

Bring originals + copies

At the appointment, bring both originals and photocopies of everything. Officers scan everything — bring more rather than less.

EX-26 Form — Filling Guide

Download

Official source: https://extranjeros.inclusion.gob.es If the site is down (WAF 403 error), use Wayback Machine:

https://web.archive.org/web/2024/https://extranjeros.inclusion.gob.es/ficheros/Modelos_solicitudes/mod_solicitudes2/26-Formulario_modificacion_de_autorizacion.pdf

Field mapping (Page 1)

Section 1 — Personal data

Field Content
Texto1 Passport number
Texto2 / Texto3 / Texto4 NIE: letter / numbers / letter (e.g. Z / 2935034 / D)
Texto5 First surname (1er Apellido)
Texto6 Second surname (2º Apellido) — leave blank if none
Texto7 First name (Nombre)
Texto8 / Texto9 / Texto10 Date of birth: DD / MM / YYYY
Texto11 City of birth
Texto12 Country of birth
Texto13 Nationality
Texto16 Street name
Texto17 Street number
Texto18 Floor / apartment
Texto19 City
Texto20 Postcode
Texto21 Province
Texto22 Phone number
Texto23 Email address

Section 1 — Checkboxes

Checkbox Meaning
Casilla 6 Sex: H (Hombre = Male)
Casilla 7 Sex: M (Mujer = Female)
Casilla 8 Civil status: S (Soltero = Single)
Casilla 9 Civil status: C (Casado = Married)
Casilla 10 Civil status: V (Viudo = Widowed)
Casilla 11 Civil status: D (Divorciado = Divorced)
Casilla 13 Children at charge: SÍ
Casilla 14 Children at charge: NO

Section 2 — Employer

Leave completely blank if working as autónomo with a foreign client.

Section 4 — Representative (if applying yourself)

Field Content
Texto55 Full name
Texto56 NIE
Texto57–62 Same address as Section 1
Texto63 Phone
Texto64 Email

Section 5 — Type of modification ✅ CRITICAL

Check Casilla 17: "A autorización de residencia y trabajo por cuenta ajena y propia"

This corresponds to Art. 191.3 RD 1155/2024 — the correct option for:

  • Protección Temporal holder
  • ≥ 1 year residence in Spain
  • Registering as autónomo (with or without Spanish employer)

Section 6 — Signature

Must be signed by hand and dated before submission. Cannot be done digitally.

Python script to fill programmatically

from pypdf import PdfReader, PdfWriter
from pypdf.generic import NameObject, BooleanObject

reader = PdfReader("EX-26_formulario.pdf")
writer = PdfWriter()
writer.append(reader)

# --- Fill your data here ---
text_fields = {
    'Texto1': 'FB000000',           # Passport number
    'Texto2': 'Z',                  # NIE letter
    'Texto3': '0000000',            # NIE numbers
    'Texto4': 'X',                  # NIE letter
    'Texto5': 'SURNAME',
    'Texto7': 'FIRST_NAME',
    'Texto8': 'DD', 'Texto9': 'MM', 'Texto10': 'YYYY',
    'Texto11': 'CITY_OF_BIRTH',
    'Texto12': 'UKRAINE',
    'Texto13': 'UKRAINE',
    'Texto16': 'CALLE ...',
    'Texto17': '00',
    'Texto18': '0 A',
    'Texto19': 'MALAGA',
    'Texto20': '29000',
    'Texto21': 'MALAGA',
    'Texto22': '600000000',
    'Texto23': 'email@example.com',
    'Texto55': 'FULL NAME',         # Section 4 (self as representative)
    'Texto56': 'Z0000000X',
    'Texto57': 'CALLE ...',
    'Texto58': '00', 'Texto59': '0 A',
    'Texto60': 'MALAGA', 'Texto61': '29000', 'Texto62': 'MALAGA',
    'Texto63': '600000000',
    'Texto64': 'email@example.com',
}
writer.update_page_form_field_values(writer.pages[0], text_fields)

# Checkboxes to tick
checkboxes_to_tick = [
    'Casilla de verificación6',    # Male
    'Casilla de verificación8',    # Single
    'Casilla de verificación14',   # No children
    'Casilla de verificación17',   # Art. 191.3 — cuenta ajena y propia ✅
]

for page in writer.pages:
    if '/Annots' not in page:
        continue
    for annot in page['/Annots']:
        obj = annot.get_object()
        if obj.get('/T') in checkboxes_to_tick:
            states = obj['/AP']['/N'].keys()
            on_state = [s for s in states if s != '/Off'][0]
            obj[NameObject('/V')] = NameObject(on_state)
            obj[NameObject('/AS')] = NameObject(on_state)

# Ensure PDF viewers render the filled values
acroform = writer._reader.trailer['/Root']['/AcroForm']
acroform[NameObject('/NeedAppearances')] = BooleanObject(True)

with open("EX-26_filled.pdf", "wb") as f:
    writer.write(f)

print("Done — open EX-26_filled.pdf to review")

Install dependency: pip install pypdf

Cover Letter (Carta de Acompañamiento)

Not strictly required but strongly recommended — helps the officer understand the case at a glance.

Template (Spanish)

[CITY], [DATE]

A la Oficina de Extranjería de [PROVINCE]

Asunto: Solicitud de modificación de autorización (Formulario EX-26) — [FULL NAME], NIE [NIE]

Estimados señores/as:

Yo, [FULL NAME], titular del NIE [NIE] y del pasaporte [PASSPORT NUMBER],
nacido/a el [DD/MM/YYYY] en [CITY OF BIRTH], [COUNTRY], con domicilio
actual en [FULL ADDRESS], presento adjunto el formulario EX-26 solicitando
la modificación de mi actual autorización de residencia temporal (Protección
Temporal para Desplazados de Ucrania, expedida el [TIE ISSUE DATE]) a una
autorización de residencia y trabajo, tanto por cuenta ajena como por cuenta
propia, de conformidad con el artículo 191.3 del Reglamento de Extranjería,
al llevar residiendo en España más de un año bajo dicha autorización.

Desde mi inscripción, vengo desarrollando una actividad económica por cuenta
propia (autónomo), debidamente registrada ante la Agencia Tributaria
(Modelo 036) y ante la Seguridad Social (Régimen Especial de Trabajadores
Autónomos), y mantengo asimismo una relación de consultoría continuada con
[CLIENT NAME / "una empresa extranjera"].

Adjunto la siguiente documentación acreditativa:

1. Formulario de solicitud EX-26
2. Copia del pasaporte
3. Copia de la TIE (Tarjeta de Identidad de Extranjero), ambas caras
4. Volante de empadronamiento
5. Informe de vida laboral
6. Alta en el Régimen Especial de Trabajadores Autónomos (RETA)
7. Modelo 036 (declaración censal)
8. Modelos 130 y 303 (pagos fraccionados e IVA, [YEAR])
9. Contrato de consultoría
10. Extractos bancarios

Quedo a su disposición para aportar cualquier documentación o aclaración
adicional que pudiera ser necesaria.

Atentamente,

[FULL NAME]
NIE: [NIE]
Teléfono: [PHONE]
Correo electrónico: [EMAIL]

Tips

  • Date the letter the same day as your appointment
  • List only the documents you are actually submitting
  • Keep it short — one page maximum
  • Print and sign by hand

Booking the Cita Previa

Portal

https://icp.administracionelectronica.gob.es/icpplus/index.html

Steps

  1. Go to the portal above
  2. Select province — e.g. "Málaga"
  3. Click Aceptar
  4. Select procedure: EXTRANJERÍA — Modificación de autorizaciones
  5. Click Aceptar
  6. Enter your details:
    • NIE
    • First name
    • First surname
    • Country of birth
  7. Click Aceptar
  8. Pick the earliest available date and time slot
  9. Enter phone/email for confirmation
  10. Save or print the confirmation — you'll need this at the appointment

Province-specific notes

Málaga

  • The portal sometimes redirects to icpplustie. subdomain for Málaga
  • If you get a WAF "Request Rejected" error, try:
    • Opening the main portal in a private/incognito window
    • Navigating from the homepage rather than a direct URL
    • Trying at a different time of day (early morning works best)

What office to go to

Oficina de Extranjería — NOT the Policía Nacional. In Málaga: C/ Mauricio Moro Pareto, 13, 29006 Málaga

At the appointment

  • Arrive a few minutes early
  • Bring originals + photocopies of ALL documents
  • The officer will scan everything you bring — do not self-filter
  • The cover letter helps the officer understand your case immediately
  • Same-day receipt with expediente number is issued

After submitting

  • Official resolution deadline: 3 months
  • In practice can be much faster (real case: 3 days)
  • You can track status by SMS: send EXPE [expediente number] to 600 12 43 77

After Approval — Getting the New TIE Card

Timeline

Within 1 month of receiving the approval resolution, you must book a Policía Nacional appointment to get the new physical TIE card.

The resolution is legally valid immediately — you can work and travel before the TIE card is issued.

Book the cita

Same portal: https://icp.administracionelectronica.gob.es/icpplus/index.html

  • Province: your province
  • Procedure: POLICIA — Recogida de Tarjeta de Identidad de Extranjero (TIE)

In Málaga specifically select: "POLICIA - RECOGIDA DE TARJETA DE IDENTIDAD DE EXTRANJERO (TIE)" (first option in the list — specifically for collecting a TIE after authorization granted)

Pay the Tasa 790/012 BEFORE the appointment

Fee: approximately €16.29

Pay online: https://sede.policia.gob.es/portalCiudadano/tramites/tasa790012.do

  • Fill in your NIE and personal data
  • Reason code: 012
  • Pay by card or bank transfer
  • Print the stamped receipt — you must bring it

What to bring

Item Notes
Passport Original + photocopy of main page
Old TIE card The Protección Temporal one, original
Approval resolution The PDF you received — printed
1 passport photo 32×26mm, white background, recent
Tasa 790/012 receipt Printed, with payment stamp

Where to go (Málaga)

CNP Málaga Provincial Plaza de Manuel Azaña (TIES/HUELLAS: ZONA 1), 3, Málaga

Digital Certificate (Certificado Digital)

Required for: Volante de Empadronamiento, Informe de Vida Laboral, and many other online government services.

What is it?

A digital certificate is a file installed in your browser that proves your identity to Spanish government websites. It replaces the need to visit offices in person for many documents.

Option 1 — FNMT Ceres Certificate (most common)

Step 1 — Request the certificate

  1. Go to: https://www.sede.fnmt.gob.es/certificados/persona-fisica/obtener-certificado-software
  2. Click "Solicitar Certificado"
  3. Enter your NIE
  4. You'll receive a request code by email

Step 2 — Verify your identity in person

Take the request code + your passport/NIE to one of these offices:

  • Agencia Tributaria (AEAT) — most convenient, many locations
  • Seguridad Social office
  • Some town halls (Ayuntamiento)

In Málaga AEAT: C/ Guadalquivir 4, 29002 Málaga (book cita first at sede.agenciatributaria.gob.es)

Step 3 — Download the certificate

After in-person verification, return to the FNMT site and download the certificate file. Install it in your browser (works in Chrome, Firefox, Safari).

Option 2 — Cl@ve PIN / Cl@ve Permanente

Lighter alternative — no certificate file needed, works with SMS codes.

  • Register at: https://clave.gob.es
  • Requires in-person registration at AEAT or Seguridad Social
  • Works for some services but not all (FNMT certificate is more universal)

Option 3 — Via the Spanish consulate abroad

If you're not yet in Spain, you can request verification at a Spanish consulate. Not applicable for most users of this guide.

Using the certificate

Once installed, when you visit a government portal that requires authentication:

  1. The browser will show a dialog asking you to select a certificate
  2. Select your FNMT certificate
  3. Enter the certificate PIN if prompted

Important: The certificate is tied to the browser/computer where it was installed. Export it as a backup file (.p12) and keep it safe.

Troubleshooting

  • Certificate not showing up: Make sure it's installed in the correct browser. In Chrome: Settings → Privacy → Manage certificates.
  • AutoFirma required: Some portals need the AutoFirma desktop app installed. Download at: https://firmaelectronica.gob.es/Home/Descargas.html
  • MacOS: Works best in Chrome or Firefox. Safari may have issues with some portals.

Frequently Asked Questions

Real questions from real cases.


Q: Do I need a lawyer? No. The EX-26 process is straightforward and can be done independently. AI tools can help you fill the form and draft the cover letter. Total time: ~3 hours.


Q: I don't have a Renta (annual tax return) yet — is that a problem? No. Quarterly filings Modelo 130 (income tax installment) and Modelo 303 (VAT) are accepted as proof of economic activity. Annual Renta is not required.


Q: My client is a foreign company with no Spanish NIF — is that OK? Yes. Leave Section 2 (Datos del empleador) of EX-26 completely blank. A consulting or services contract with a foreign company is sufficient evidence of work.


Q: I only have one quarterly tax declaration — is that enough? Yes. Even a single quarterly filing (130/303) combined with your Alta RETA certificate shows you are actively working as autónomo.


Q: How long does the approval take? The official deadline is 3 months. In practice it can be much faster — one real case received approval in 3 days.


Q: Can I track the status of my application? Yes. Send an SMS with: EXPE [your expediente number] to 600 12 43 77


Q: What does the new permit allow me to do? Work as an employee (cuenta ajena) or self-employed (cuenta propia) anywhere in Spain, in any sector. Valid for 4 years.


Q: Does the authorization take effect before I get the new TIE card? Yes. The resolution document itself is legally valid immediately — you can work and travel as soon as you receive it. You have 1 month to book the TIE card appointment.


Q: I'm in a different city, not Málaga — does this process apply to me? Yes. The legal basis (Art. 191.3 RD 1155/2024 + Instrucción SEM 2/2026) applies across all of Spain. The cita previa portal is the same; select your own province. Office locations will differ.


Q: My Protección Temporal TIE expires soon — should I wait or apply now? Apply now if you've been in Spain ≥ 1 year and are registered as autónomo. Protección Temporal has been extended to 4 March 2027 (Orden INT/96/2026), so your current TIE remains valid during the application process.


Q: I'm engaged but not married — what civil status do I put on EX-26? Soltero (S) — single. Engaged is not a recognized civil status in Spanish immigration forms.


Q: Do I need to bring a photo to the Oficina de Extranjería appointment? Not required for the initial EX-26 submission. You will need a passport photo for the TIE card appointment at Policía Nacional (after approval).


Q: What's the difference between the Oficina de Extranjería and Policía Nacional appointments?

  • Oficina de Extranjería → where you submit the EX-26 application
  • Policía Nacional (Comisaría) → where you go AFTER approval to get the physical TIE card printed

These are two separate appointments at two different places.

/spain-immigration — Spain Immigration Assistant

You are an expert Spanish immigration assistant helping Ukrainian nationals transition from Protección Temporal to a standard Autorización de Residencia Temporal y Trabajo por Cuenta Ajena y Propia.

Based on a real case: applied 29 June 2026 → approved 2 July 2026 (3 days). 4-year permit.

How to use this skill

Run /spain-immigration and tell me where you are in the process:

  1. Check eligibility — not sure if you qualify?
  2. Collect documents — need help getting Volante, Vida Laboral, etc.?
  3. Fill EX-26 form — need help with the form fields?
  4. Cover letter — need a Spanish cover letter?
  5. Book cita previa — need help booking the appointment?
  6. After approval: TIE card — approved, what's next?

Or just describe your situation and I'll guide you from there.

Key facts

  • Form: EX-26, Section 5, checkbox Art. 191.3
  • Duration granted: 4 years (Hoja 55, RD 1155/2024)
  • Legal basis: Art. 191.3 RD 1155/2024 + Instrucción SEM 2/2026
  • No lawyer needed
  • No Renta needed — quarterly 130/303 filings accepted
  • Foreign client OK — leave Section 2 of EX-26 blank

Sub-guides loaded with this skill

  • 01-eligibility.md — eligibility check
  • 02-documents.md — full document checklist
  • 03-ex26-form.md — form filling (manual + Python script)
  • 04-cover-letter.md — Spanish cover letter template
  • 05-cita-previa.md — booking the appointment
  • 06-tie-card.md — TIE card after approval
  • digital-certificate.md — how to get a digital certificate
  • volante-empadronamiento.md — get Volante online step-by-step
  • vida-laboral.md — get Vida Laboral online step-by-step
  • legal-references.md — all laws and articles
  • faq.md — common questions

Always respond in the user's language (Ukrainian 🇺🇦, Spanish 🇪🇸, or English).

Informe de Vida Laboral — Step by Step

The Informe de Vida Laboral is a report from Seguridad Social showing your full employment and self-employment history in Spain. Required for the EX-26 application to prove RETA registration.

Requires: Digital certificate installed in browser (see digital-certificate.md)

Online — Import@SS portal

  1. Go to: https://importass.seg-social.es
  2. Click "Acceder""Con Certificado"
  3. Select your FNMT digital certificate when prompted
  4. Once logged in, find "Informe de Vida Laboral" (also under: Ciudadanos → Informes → Vida Laboral)
  5. Click "Obtener Informe"
  6. Select format: PDF
  7. Download the generated report — it's issued instantly with an electronic reference number

Alternative — sede.seg-social.es

  1. Go to: https://sede.seg-social.gob.es
  2. Search for "Vida Laboral" or go to: Ciudadanos → Informes y certificados → Vida Laboral
  3. Authenticate with digital certificate
  4. Download PDF

What the report shows

  • All periods of employment (cuenta ajena) and self-employment (cuenta propia / RETA)
  • Your RETA registration date — this is the key field
  • Number of days contributed in each regime

What to check before submitting

  • Confirm your Alta RETA date is shown (e.g. "09 ene 2026 – Actual")
  • The report should show "TRABAJADOR AUTÓNOMO" or "RETA"
  • The report includes an electronic reference number — no stamp needed

Notes

  • Valid on the day of issue — get it as close to your appointment as possible
  • If RETA is not showing, contact your Seguridad Social office — there may be a registration delay

Volante de Empadronamiento — Step by Step

The Volante de Empadronamiento is a certificate confirming your registered address (padrón) in Spain. Required for the EX-26 application.

Requires: Digital certificate installed in browser (see digital-certificate.md)

Online — Málaga (Mi Carpeta)

  1. Go to: https://micarpeta.malaga.eu
  2. Click "Acceder con Certificado Digital"
  3. Browser will prompt you to select a certificate — select your FNMT certificate
  4. Once logged in, navigate to "Padrón Municipal""Volante de Empadronamiento Individual"
  5. Select "Individual" (for yourself only)
  6. Click "Solicitar"
  7. The PDF will be generated immediately — download and save it

Online — Other municipalities

Each Ayuntamiento has its own portal. Search for: "sede electrónica [your city] volante empadronamiento"

Most use the same Cl@ve/certificate login system.

In person (if no digital certificate)

Go to your local Ayuntamiento (town hall) with:

  • Passport or TIE card
  • They issue it on the spot, usually free of charge

Notes

  • The Volante is valid for 3 months from issue date — get it close to your appointment
  • If you have recently moved, make sure your current address is registered in the padrón first
  • "Individual" = just for you; "Familiar" = for the whole household
  • The online version has an electronic signature and is accepted without further stamps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment